Ludeon Forums

RimWorld => Bugs => Topic started by: LeeMortis on July 26, 2016, 07:02:28 AM

Title: Game freezes when pawn sharing bed is downed
Post by: LeeMortis on July 26, 2016, 07:02:28 AM
My current game just locks up at exactly 23h in-game time. It's happened multiple times by now, and I have saved it at 20h, reloaded and every single time it cannot pass the 23h mark. Something is obviously making the game crash, and I thought it would be worth it for you guys to take a look...

I've included the save file and the outputs.log file in a zip called "BuggedSave Landfall Permadeath". Hopefully this can help finding the bug.

PS. Reading the "how to submit" section, it mentions a world save as well as the game save, but there is no world save.... guess that has changed now that the worldmap is created alongside the game?

[attachment deleted by admin - too old]
Title: Re: Game Freezes At Specific Time
Post by: Calahan on July 26, 2016, 08:19:10 AM
I loaded your save twice and both times let the game run until 2h the next day, and did not experience a crash or freeze-up. What did happen though is that a siege (first test) and raid (second test) occurred soon after the clock ticked over to 0h. So I'm wondering if the triggering of these events is causing your game to freeze. I have only limited skills in interpreting the log files, so I'll have to leave that to someone else I'm afraid.

I can post an update of your game save if you want to (try and) continue playing. Would you prefer a siege or a raid? :) Or I can try and catch it at 0h before an event triggers, but in that case the game might still freeze-up on you (although in that case it could help in narrowing down the problem).

Quote from: LeeMortis on July 26, 2016, 07:02:28 AM
PS. Reading the "how to submit" section, it mentions a world save as well as the game save, but there is no world save.... guess that has changed now that the worldmap is created alongside the game?
Thanks for reading that sticky before posting (a lot of people don't), and yes it needs updating because there are no longer world files (as that is now stored in the save file, at least AFAIU it is).
Title: Re: Game Freezes At Specific Time
Post by: LeeMortis on July 26, 2016, 01:58:01 PM
Thanks for having a look.

Strange that it works for you since I tried atleast 10 times to get past the 23h mark, and everytime my game would freeze up. Never had any problems before, even playing on larger maps with up to 20 colonists (and hence - much bigger raids). So I doubt the raid/seige itself was causing it.

I was suspecting it had something to do with the double beds and the guy who needed treatment... since that was a thing that was new for me while playing (first time I actually had two people sleeping together)... but that, like I said, was only based on the fact that it was the only thing different from any previous save.

If you want to post an updated save, right after the event pops in, that could be interesting. Just to see if I can then continue playing without issues.
Title: Re: Game Freezes At Specific Time
Post by: Calahan on July 26, 2016, 02:26:44 PM
Ha, just read you reply and was in the process of creating a save game for you and the game froze for me at 22h :) A Mad Animal event occurred at 21h this time around.

No idea what caused it. Couldn't alt-tab, couldn't access the desktop, and starting task manager via ctrl-alt-del didn't work either. A program unresponsive box came up after a while that allowed me to close the program. But I can confirm that your save did cause a system freeze (at least on one occasion).

Will try again and edit this post with the result.

Edit - Second attempt and another freeze-up, at 0h. No events of any sort this time. Starting to think my computer was trolling me before! Third attempt coming up.

Edit 2 - Third attempt and another freeze, at 23h. This is just making more determined now! (some extra info. I ran it in windowed mode this time with task manager displayed in the background. There was no difference in either CPU or memory usage when the freeze occurs. Going to try running in the background next).

Edit 3 - Well determination can only get you so far (Edit 4 - or not it seems! Full edit 4 incoming) I tried over a dozen times to get through the night, and no luck. It froze every time, with times ranging from 21h-3h. With or without raids, sieges, mad animals, people running from pirates, or no events at all. Tried running in background, windowed, at different game speeds, I have a laptop and tried it with and without a dedicated GPU. None of it made a difference.

On only one occasion did I manage to get to 2h, like I did earlier, but that froze immediately upon hitting 3h. So either the save was working for me earlier when I first tested it, or far more likely, I got lucky and didn't get an early freeze-up, but if I had kept the game running it would have frozen up (in both my earlier tests I stopped at 2h). I even started watching the Pawns to see if there was any pattern that caused the freeze, but I couldn't see anything. Sometimes Weissman collapsed, sometimes he didn't. No particular joy activity seemed to be connected to the freeze either. This looks like something only Tynan (or ison) can solve.

Edit 4 - Success! I think. I don't know exactly what the problem was, but it looks like I found a way around it.

What I did was... (from your original save) changed Shepard's schedule to 24 work, Threlfall and Lish to 24h joy, and Weissman to 24h sleep. I then turned that shared double bed into a medical bed, and ordered Weissman to rest until healed. Weissman dies from an infection no matter what. Tried this half a dozen times and managed to get past 4h each time. I ran two of the games until well into next day One time your base got swarmed by raiders, although Lish took 4 out before they downed him. The other time it became too  much MM due to a manhunter pack.

I couldn't pin down the exact cause of the freeze up. It is either, as your guessed, something to do with your Pawns sharing a bed (one of them due to die might be a factor as well), and Shepard getting into that bed could be a cause of the freeze. Or it is something specific about your schedule that is causing it. Although if I had to place a bet I'd say the likely cause is the shared bed/Pawn dying while sharing a bed, since as you mention this is the only new thing you've come across, so if it was your schedule then it would/should have frozen before.

So if you want to continue your game then you can either load the save you posted, follow the steps I mention (or at least stop Shepard getting into bed until Weissman dies), or I have posted a dropbox link to three saves games. They are from different time lines. One is where a manhunter event occurred the other two are tribal raids. The three save files are in appropriately named folders, along with the current game time (the download also includes your original save file).

https://dl.dropboxusercontent.com/u/97382000/BuggedSave%20Landfall%20Permadeath.zip
Edit 5 (a personal record!!) - Dropbox seems to be having sync trouble, so here's a Mega link as well.
https://mega.nz/#!is43ma7C!h1sK1Wvt899cctTAhPtj8abzAhknzHCUILfspPSNk8o

Let me know how it goes, and/or if you want me to create an alternative save file for you (if the game still freezes for you with my workaround)
Title: Re: Game Freezes At Specific Time
Post by: LeeMortis on July 26, 2016, 03:24:38 PM
Ok... good to know... in a way. Hopefully whatever is happening can be tracked down and fixed so it doesn't happen someone else (or me again...).

Guess I won't have any need for that save then.

Do keep me posted, however. I'm curious to know if this helps you guys iron out a nasty bug.
Title: Re: Game Freezes At Specific Time
Post by: Calahan on July 26, 2016, 03:48:25 PM
Looks like we cross-posted. Check my Edit 4 in my previous post.
Title: Re: Game Freezes At Specific Time
Post by: LeeMortis on July 26, 2016, 04:13:54 PM
Yup. Seems like the double bed is the culprit indeed.

All I did was use the same file I sent you guys, set the unowned single bed to belong to Shepard to prevent her from sharing the bed with Weissman. Weissman died (as I had already expected, of course)...  and I had a raid of tribespeople that I dealt with and now stuffed 3 more prisoners into the tiny prison... guess my new primary focus will be to build a new prison before the riots begin :) ... but I need more people in my group, and the tribespeople were all good looking crew...

Played a full extra day now without the freeze occuring. Guess I won't be getting any double beds until I have a dedicated medical bed from now on (until this has been fixed).
Title: Re: Game Freezes At Specific Time
Post by: Calahan on July 26, 2016, 04:27:03 PM
Glad to hear you managed to get past the freezing point. I hope your Pawns are fully aware of all the trouble they caused! After all this they had better make it off that planet in the greatest ship ever built! :D


I've had Pawns (with no relationship) sleep in double beds in A14 without a problem. So my guess is that it's the bed sharing combined with the illness and/or imminent death that's causing the problem. Either way, it looks like a definite bug, and hopefully your save file will help Tynan squash a bug (assuming he can recreate it).

And hope some new colonists turn up soon, or your prisoners will outnumber you 3:1! Good luck.
Title: Re: Game Freezes At Specific Time
Post by: LeeMortis on July 26, 2016, 05:24:57 PM
Thanks... but, the save was a bust :)

6 prisoners in that tiny cell decided to go for a prison break as I was trying to recover. Shepard, unsurprisingly, went berzerk grieving the loss of Weissman. During this time someone called for help, and I figured I might just as well give it a try and offered sanctuary. She never even made it to base to equip a shotgun before getting killed by the mob following her... turned out she was a slow walker. Top all that off with a "normal" raid as well, and my people didn't stand a chance.

That's what I love about this game, though :) The crap has a tendency to hit the fan real hard sometimes :)
Title: Re: Game Freezes At Specific Time
Post by: milon on July 26, 2016, 08:48:03 PM
Losing Is Fun!TM

But seriously, that double bed thing could be a nasty bug.
Title: Re: Game Freezes At Specific Time
Post by: Tynan on July 29, 2016, 01:57:32 PM
It's definitely a real crash, related to the pawns sharing a bed. Can't figure out the actual cause though, but I'm working on it. Thanks for reporting.
Title: Re: Game freezes when pawn sharing bed is downed
Post by: Tynan on July 29, 2016, 02:15:57 PM
Okay, I've fixed it. Will definitely be uploading a build to Steam today.

(cause: positive infinity mean-time-between lovin' in bed causing the RNG to go into an infinite loop; it assumed the MTB was always finite)