[StrangePan][2.0.23](macOS 10.15.7) Crash entering train without character with another character in train
Posted: Wed Dec 04, 2024 3:56 am
save reproduction:
start a game. obtain rails, engine, and cargo wagon, place.
Minimal(ish) reproduction:
host game on windows, have a train and a cargo wagon
join game on Mac(attempting to reproduce on another windows computer did not cause the problem)
/c game.players["clientplayername"].character.destroy()
enter wagon as host
(you may leave wagon now if you like?)
(/toggle-heavy-mode doesn't report anything)
enter train engine as client with no character
move the train(sometimes unnecessary)
Attached is a save having created and tested the conditions in team production to minimize the amount of stuff going on, but it originally occurred and is also reliably reproduced in freeplay.
Other testing results:
Entering a train with a cargo wagon with no character was enough to cause the crash on several occasions, even if no one else was driving
Entering without the wagon attached and driving around was fine.
Attaching the wagon afterward was also fine, and the train became immune to the problem.
All of these results were inconsistent, but the minimal(ish) test has worked every time on a new map.
Excessive Context: My son loves the old sandbox mode and often has me put in the commands to make it work in 2.0 and now space age. He was playing on mom's imac and I was hosting. We were driving trains around our new world together just fine(no cheating allowed), but then he wanted his character destroyed(having hands is a kind of cheating, isn't it?), and he decided to drive the train again. he was driving a train around fine. I got in the train and he drove me around, and then he decided I could have the train so he left. Soon he changed his mind, but when he got back in, factorio froze and never unfroze again. We repeated the process a few times before we realized what was causing the problem, and he quickly got tired of my exhaustive tests to reproduce the issue precisely, so I carried on on my own while he pretended to do chores. Somewhere in the process I also updated the game, previously it was 2.0.21.
P.S. I have a game going on with myself on knowing what the actual problem is when reporting bugs in code I haven't seen, so it would be very fun for me to find out what code change needed to happen. Here's my wild unsupported and unnecessarily detailed prediction (ok, I read the stack trace, log also attached): The pointer to something involving the characters in the train is being freed as the train moves. Because there is a character, the memory still has to be freed, but because the last player to join has no character, it frees the pointers through the chain in the wrong order, and since it was a previously freed pointer, windows ignores it, but mac throws a fit. Linux has the same problem.
start a game. obtain rails, engine, and cargo wagon, place.
Minimal(ish) reproduction:
host game on windows, have a train and a cargo wagon
join game on Mac(attempting to reproduce on another windows computer did not cause the problem)
/c game.players["clientplayername"].character.destroy()
enter wagon as host
(you may leave wagon now if you like?)
(/toggle-heavy-mode doesn't report anything)
enter train engine as client with no character
move the train(sometimes unnecessary)
Attached is a save having created and tested the conditions in team production to minimize the amount of stuff going on, but it originally occurred and is also reliably reproduced in freeplay.
Other testing results:
Entering a train with a cargo wagon with no character was enough to cause the crash on several occasions, even if no one else was driving
Entering without the wagon attached and driving around was fine.
Attaching the wagon afterward was also fine, and the train became immune to the problem.
All of these results were inconsistent, but the minimal(ish) test has worked every time on a new map.
Excessive Context: My son loves the old sandbox mode and often has me put in the commands to make it work in 2.0 and now space age. He was playing on mom's imac and I was hosting. We were driving trains around our new world together just fine(no cheating allowed), but then he wanted his character destroyed(having hands is a kind of cheating, isn't it?), and he decided to drive the train again. he was driving a train around fine. I got in the train and he drove me around, and then he decided I could have the train so he left. Soon he changed his mind, but when he got back in, factorio froze and never unfroze again. We repeated the process a few times before we realized what was causing the problem, and he quickly got tired of my exhaustive tests to reproduce the issue precisely, so I carried on on my own while he pretended to do chores. Somewhere in the process I also updated the game, previously it was 2.0.21.
P.S. I have a game going on with myself on knowing what the actual problem is when reporting bugs in code I haven't seen, so it would be very fun for me to find out what code change needed to happen. Here's my wild unsupported and unnecessarily detailed prediction (ok, I read the stack trace, log also attached): The pointer to something involving the characters in the train is being freed as the train moves. Because there is a character, the memory still has to be freed, but because the last player to join has no character, it frees the pointers through the chain in the wrong order, and since it was a previously freed pointer, windows ignores it, but mac throws a fit. Linux has the same problem.