Went for the no-potato Director's Cut, Windows version. I have a good PC build, so that shouldn't be where the problem lies. From the sound of it, it must be something in the code.
No idea how you're coding these functions and in what order things run, so this is a totally generic and random bit of advice from the top of my head, but if things potentially freeze up because something moves on before something else is correctly finished, maybe (if you're not yet) work with co-routines that yield until things elsewhere have finished up? It's not like the game crashes, it doesn't technically "freeze" in that sense, it just doesn't do anything with my input at those points.