SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
85 stars 18 forks source link

Stuck at loading miscellaneous #2351

Closed wenghongz closed 3 years ago

wenghongz commented 3 years ago

Hello, when I launch Unturned everything was loading fine up until loading miscellaneous, it froze and crashes. After looking at the logs only thing I can tell is, it is loading the Elver map, I've tried unsubscribing it, but it subscribes automatically every time I launch the game. Any help help would be appreciated! :)

Client.log

TH3AL3X commented 3 years ago

Can you try to remove all your workshop files?

TH3AL3X commented 3 years ago

Go to your steam, SteamApps,common,workshop etc... "D:\Program Files (x86)\SteamApps\steamapps\workshop\content\304930" 304930 is the appid of unturned, just remove all files of inside

Pd disable cloud data function too, i mean Steam Cloud for Unturned "I'm using different theme of steam, so probably is different" image

wenghongz commented 3 years ago

Go to your steam, SteamApps,common,workshop etc... "D:\Program Files (x86)\SteamApps\steamapps\workshop\content\304930" 304930 is the appid of unturned, just remove all files of inside

Yes, I've deleted it before and had validated game files. Also reinstalling the game too. Thanks for the quick replies.

I've unticked it before this problem have happened before.

TH3AL3X commented 3 years ago

Go to your steam, SteamApps,common,workshop etc... "D:\Program Files (x86)\SteamApps\steamapps\workshop\content\304930" 304930 is the appid of unturned, just remove all files of inside

Yes, I've deleted it before and had validated game files. Also reinstalling the game too. Thanks for the quick replies.

Add me on discord i will try to help you: TERROR#1337

TH3AL3X commented 3 years ago

@SDGNelson we already removed manifest files, workshop stuff, everything and reinstalled the game, and is still downloading elver until we install unturned, and crashing when elver is loading...., tried to without battleye...

Also, userdata too

ghost commented 3 years ago

@SDGNelson we already removed manifest files, workshop stuff, everything and reinstalled the game, and is still downloading elver until we install unturned, and crashing when elver is loading...., tried to without battleye...

Also, userdata too

Mentioned it in unturned discord as well, but I would try old ui. https://store.steampowered.com/news/app/304930/view/4138210213529405842 From the logs alone, it looks like elver loads fine but it never gets past loading the menu ui

wenghongz commented 3 years ago

All above have been done, issue still persist.

SDGNelson commented 3 years ago

Thanks for the log. Sorry for the trouble.

To clarify about why it keeps re-subscribing to the Elver workshop file: by default the game will only subscribe to curated workshop files once (so that you can unsubscribe), but since the game is crashing that file is not getting saved. I will make a note for the next update to save that immediately upon subscribing so that this does not happen.

Does it crash with a Unity popup of the Unturned zombie face, or does it say "program not responding" and fade to white? If the second is the case, then it may be worth clicking "wait for the program to respond" and waiting a minute (if you have not already done so). Since it stops responding when it reaches the menu I also wonder if perhaps an anti-virus or firewall software is blocking the game from refreshing the news / inventory / workshop / etc.

warren39 commented 3 years ago

Remove all files at: SteamApps\steamapps\workshop\content\304930 Start Untuned. And then disable Network Adapter immediately, just don't let it download Elver. Minutes later, the game will load complete without Elver.

wenghongz commented 3 years ago

Thanks @SDGNelson for the reply. Yes, second case is what I'm dealing with right now and I did also wait a few times, 10 minutes is how long I've waited, I don't mind waiting longer if 10 minutes isn't enough. About the antivirus or firewall, I've allow Unturned through firewall and to proof that it is, I've actually setup a Unturned server beforehand to test and one of my friend could join my private server with no issues. Lastly, my pc doesn't have antivirus application besides Windows defender, which someone that helped me with my issue said won't cause much issue to Unturned. I can provide more info if needed, thanks a lot again everyone for the help!

Update: After 30 minutes of waiting, no sign on loading.

wenghongz commented 3 years ago

@warren39 I'll give that a try, but after a lot of input from everyone. They all seem to say that Elver isn't the issue causing Unturned to not load past loading misc. I'll still give it a shot, thanks!

wenghongz commented 3 years ago

Something to note while I was waiting for it to load, it seems to be using up a lot of ram, does it mean that it is actually running instead of crashing? 10gb of ram is its peak, causing my entire pc to slow down.

SDGNelson commented 3 years ago

10 minutes should certainly be far more than enough. Judging from the log it is getting stuck sometime between starting to create the menu UI and finishing creation. (should say "MenuUI ready" when done) Since the inventory, news, and workshop refreshes are started in there my guess is still that one of those requests is being blocked, but I will add some more logging to each for the next patch to narrow down where it is getting stuck in a case like this.

wenghongz commented 3 years ago

Alright, @SDGNelson so is there nothing I can do for now? If so should I close the case? I'm new to Github, so I'm not that sure what to do.

SDGNelson commented 3 years ago

For the meantime there is nothing to be done unless you think of something that might be blocking the game, but this coming Friday hopefully the extra logging in the patch will help narrow down where it is getting stuck.

wenghongz commented 3 years ago

@SDGNelson After the update, it doesn't resubsribe to Elver anymore, but issue still persist. These are the new logs, any help would be appreciated! Thanks in advanced for your time and help.

Unturned Logs Client.log

Unity Logs (there's no crash logs, this is the Player.log) Player.log

Update: After reinstalling Unturned, still stuck at Loading Misc, but this time it doesn't fade to white, its just stuck and eating up 14GB of ram, causing pc to slow down and get stuck.

SDGNelson commented 3 years ago

Interesting that your RAM usage is exploding... in the log it does look like it is getting stuck after requesting the workshop and Steam news, but I wonder if something is wrong with the response. I would still recommend checking if windows defender or firewall is blocking Unturned's web requests. I will check further into what might be going wrong with the requests to eat all that RAM.

wenghongz commented 3 years ago

@SDGNelson I've checked Windows Defender Firewall, both seems to be allowing Unturned. As a reminder I've successfully ran a server with a friend being able to join in. I'm also very clueless about what is interfering with Unturned this badly.

Windows Defender Firewall image

image

SDGNelson commented 3 years ago

The reason running the server would not necessarily affect this is the server is a different process. It does look like Unturned is allowed though... 👀

wenghongz commented 3 years ago

@SDGNelson Understood, does it mean there's no way of verifying the cause for now? If so, should I close this issue? Thanks again for all the help!

SDGNelson commented 3 years ago

Eh I have not really helped since you are still running into the problem. 😞 I am not sure what to suggest yet, but will be experimenting further this week.

SDGNelson commented 3 years ago

Do you remember tinkering around in the Unturned game files before? e.g. Did you ever edit the Status.json file? (that controls a lot of the menu startup so it is a potential issue, but from the sounds of things unlikely)

There is also the possibility that it might be stuck loading some corrupted savedata when opening the menu. For example the character appearance is loaded at that point. I think this is unlikely, but it may be worth temporarily resetting that data:

  1. Disable Steam cloud sync for Unturned
  2. Find your Unturned Steam cloud files at C:\Program Files (x86)\Steam\userdata\ (your steam id) \304930
  3. Temporarily move remote and removecache somewhere else so that this folder is empty. During startup if Steam cloud is disabled this folder should remain empty.

On my end for the next update I have added a bunch of sanity checks to that portion of menu loading, e.g. if the Status.json file were somehow corrupted and requesting an invalid number of announcements. It also looks like the web requests did not have a timeout by default, so there is a 15 second timeout on all of the game web requests for the next update.

SDGNelson commented 3 years ago

In case you are interested in trying early the preview branch has those latest fixes now, otherwise it will be up Friday.

wenghongz commented 3 years ago

@SDGNelson Sorry for the late replies, been busy for the past few days. Today after checking system for updates, found out there's quite some stuff that needs updating. But after the update, I tried running Unturned, still stuck on loading misc, but this time there's a Unity loading thingy with the Unturned Zombie head logo. After Unturned crashes, pc suddenly started acting weird and unresponsive, but became normal after restarting. Below are the logs provided by both Unturned and Unity. To addon I'll try what you suggest in those post. Thanks :)

Unity Player Logs Player.log

Unturned Logs Client.log

wenghongz commented 3 years ago

Do you remember tinkering around in the Unturned game files before? e.g. Did you ever edit the Status.json file? (that controls a lot of the menu startup so it is a potential issue, but from the sounds of things unlikely)

There is also the possibility that it might be stuck loading some corrupted savedata when opening the menu. For example the character appearance is loaded at that point. I think this is unlikely, but it may be worth temporarily resetting that data:

  1. Disable Steam cloud sync for Unturned
  2. Find your Unturned Steam cloud files at C:\Program Files (x86)\Steam\userdata\ (your steam id) \304930
  3. Temporarily move remote and removecache somewhere else so that this folder is empty. During startup if Steam cloud is disabled this folder should remain empty.

On my end for the next update I have added a bunch of sanity checks to that portion of menu loading, e.g. if the Status.json file were somehow corrupted and requesting an invalid number of announcements. It also looks like the web requests did not have a timeout by default, so there is a 15 second timeout on all of the game web requests for the next update.

-I'm 99% positive I have not touched the Status.json file, because it looks complicated af.

-I'll try not lauching Unturned if I can, because it's started to slow down the pc after it crashes. It doesn't make sense, but its seem to be the reason.

-I'll wait until Friday just to be on the safer side.

SDGNelson commented 3 years ago

Great news! Thanks for these logs. It looks like it is running out of memory while building the list of resolution options of all things. Ordinarily this would seem like the random place it happened to run out of memory, but there have been numerous problems with that resolutions API before. e.g. it would crash in the editor a couple years ago, and recently stopped returning sorted results. My guess is that Unity is returning a list of every number combination e.g. 5x3, 6x3, 7x3, and the game runs out of memory while building the UI for it. I will clamp the number of results, and see about workarounds.

ghost commented 3 years ago

It looks like this error has been around for a bit, but just really rare.

image image image

For whatever reason, Unturned includes a "Server_Example.log" file inside of the Logs directory just from installing the game that keeps confusing people, probably doesn't help either that there is an error in it. (and also making people believe the person requesting help has tried to run a server from their unturned install before). Would be nice if it got removed.

SDGNelson commented 3 years ago

@PandahutMiku it might not be specifically this issue, unfortunately there have been a variety of crashes / stuck at "loading misc" over the years because it is the frame before showing the menu. If we are lucky it will fix it for a few other players though.

It looks like the "Server_Example.log" might be another case of Steam not removing a file because the upload process is setup to exclude the Logs folder. :/

ghost commented 3 years ago

@PandahutMiku it might not be specifically this issue, unfortunately there have been a variety of crashes / stuck at "loading misc" over the years because it is the frame before showing the menu. If we are lucky it will fix it for a few other players though.

It looks like the "Server_Example.log" might be another case of Steam not removing a file because the upload process is setup to exclude the Logs folder. :/

I was thinking the "Server_Example.log" could be that, but I deleted it from my files, verified, and steam reported one missing file and put it back.

Searching on steamdb for Unturned Windows 64 Depot shows it too image

It's easy enough just to ask them for their logs/the right log file again though, just figured it would be super easy to remove and avoid some confusion.

Anyway thanks for looking into this, I'll ping the other guy who had the "Loading Misc.." issue earlier today on Friday and see if he's fixed as well.

SDGNelson commented 3 years ago

Oh yikes! You are right, thank you for pointing that out. There should not be logs in the per-platform depots, so I'm not sure what happened there, but I will put some checks in place to make sure that does not happen again.

wenghongz commented 3 years ago

@SDGNelson I'm super glad that I'm finally able to help you out! And thanks to @PandahutMiku for following up on the issue and @TH3AL3X for helping me tons. Really grateful for your help, thanks again!

-Should I close the issue or wait until there's a solution from @SDGNelson

SDGNelson commented 3 years ago

Let's leave it open for now until we know whether the update fixed it. 🤞

SDGNelson commented 3 years ago

Update is out, let me know if it lets you in when you get the chance! If it does work I would be really curious to see the log file afterwards because it will log just how many resolutions were being returned.

ghost commented 3 years ago

Update is out, let me know if it lets you in when you get the chance! If it does work I would be really curious to see the log file afterwards because it will log just how many resolutions were being returned.

The "crazi" guy above who said his friend had the issue, says now his friend can load unturned fine. I asked him for his logs, but he said his friend was already offline and he would get them tomorrow. Regardless, seems to have fixed it! I Will update if he gives the logs.

Edit: The guy sent a screenshot of his logs that said the exact same thing image

SDGNelson commented 3 years ago

Glad to hear that, thanks Miku!

wenghongz commented 3 years ago

It's fixed! 😮 Thanks @SDGNelson for the swift update. Can't wait to play with my little brother tomorrow!

And here are the logs that you wanted, I hope these will help? Thanks again for the huge help! 😄

Unity Player Logs Player.log

Unturned Logs Client.log

SDGNelson commented 3 years ago

Glad to hear it is working for you! It looks like Unity was returning a lot of resolutions, but not as many as I guessed. Perhaps it was the timeout then. Either way, happy that it works! :)

Unity returned 256 recommended resolutions, clamping to 200