Closed Rokvach closed 3 years ago
I don't see how switching the character could cause the crash. Pity that the report doesn't have the line numbers. I went through the code and didn't spot anything that would crash. But clearly there is something. I also tried to switch to characters that were in middle of returning a suit or an extinguisher. Couldn't repro.
I was on a scooter outside right beside the sub when I heard knife sounds and saw on the chat "What do you think you are doing?" I thought to myself: "Is the bot attacking one of the pets with a knife?" so I switched to see what was going on, but the game crashed before I could see anything.
I wasn't able to reproduce the issue still, tested by going for a swim with a scooter and switching characters as well as ordered a bot to fight intruders gave him knifes and spawned in a crawler and switched to the bot while it was attacking and done attacking the crawler.
Just keep the eyes open for the issue and hope that we can get another log with the line numbers. Then it should be easier to fix. It doesn't seem to be too frequent, as it's so difficult to reproduce.
@itchyOwl Got a crash report with line numbers now: https://github.com/Regalis11/Barotrauma/issues/4252
Fixed in Regalis11/Barotrauma-development@4ba5647.
Thanks to the almost correct line numbers, I was able to reproduce the crash.
Steps: 1) control a bot and equip a diving suit 2) spawn the bot outside so that it won't take the suit off (don't use the hold position command) 3) type "freecam" 4) teleport the bot inside a ruins 5) if the hull inside the ruins is flooding, lower the water level using the console command "water" and pressing right mouse button. 6) the game should crash when the bot is not fully in water:
Tested, working correctly. Closing.
Reported by JP on Discord
No known ways to reproduce, speculating that its caused when switching to a bot while the bot is in process of unequipping a diving suit or a fire extinguisher when they don't need it anymore.