- Home /
Game never goes into play mode in the editor and times out when playing build
This has been on my nerves for five months now and I have tried everything I can think of without destroying the game. The most recent fix I tried is removing unused code/GameObjects from the main player.cs
script and the main scene's hierarchy. That did not work. You may be wondering what I mean by "never goes into play mode". What I mean by that is when I press the enter play mode button, the progress bar will stay there, even OVERNIGHT. When I build it then subsequently play it, it shows the "Made With Unity" Splash then a blank screen and then eventually UnityCrashHandler64.exe
kicks in and shuts it down. I am trying to make a loading screen before I give the prototype build to my playtesters and I'm painfully close. I hope there is a software solution. Because the only thing I can think of that I haven't tried is a RAM upgrade (Yeah I have a sad computer at 8GB RAM) but I am not ready to do that.
If you look in your Task Manager (or similar/better where applicable), is your game using that much RAM first thing upon starting it? Similarly, since you mention playtesters, have any of them attempted and/or successfully run your game at all yet?
Much more typically, though, that sort of long-term hang first thing sounds more like an infinite loop (or potentially just a far-too-long loop, depending on exact circumstances). That doesn't necessarily explain the context of a crash (i.e. UnityCrashHandler), but there's really not a huge amount of information for us to work with yet.
Hi! Apologies for the lack of information. I have not yet sent the files to my team but I will check to see if they can run it. I have not looked at the task manager for the build and I can't remember what the RAM consumption was for the play mode. I'm pretty sure the crash handler kicked in because the application timed out but the question is why did it time out.
I will remove all the scenes except for the main one from the build settings and then rebuild it. You never know what works, am I right? I will get back to you on the RAM usage (in percentages and values) then hopefully we can work this out together.
For the build (the same one I talked about before) the RAM consumption was at an average of 4GB and the total RAM consumption on my PC was on average 95%. Same with the editor (for until I closed it). All the apps I could close were closed.
Now about the new build (a re$$anonymous$$der that it contains just the main scene). First of all, it only took 40 seconds where the previous build took 7 $$anonymous$$utes. Second, it did run on my PC but not very well (it stopped responding almost right away). One of my playtesters reported it ran for 15 seconds with the same amount of RAM
To be clear, is the problem that Windows says it stops responding, or is it specifically crashing?
In brief, Windows checks if something is obviously still updating its render, and will assume it's "not responding", even if it's because the program is working its way through a long loop without being able to update the window's rendering until it's done. Also, it's a really short timeout. Also, it's often triggered sooner by user interaction (i.e. clicking the window).
So, that's why I ask (and reiterate): Is it Windows guessing that it's frozen, or is the executable literally crashing?
As a side note, at 95%+ "Physical Memory" usage, that almost definitely counts as using "all of it", so some/many aspects may/will be a fair bit slower as you hit the swap file a bunch.
Yes @Eno-Khaon, please tell us what an infinite loop would be
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Xcode build fails, How to ? 1 Answer
Different behaviour playmode/build, graphics disappear 0 Answers
Build problem, missing variables 1 Answer
i keep getting compiler errors 1 Answer