Opened 16 months ago
Last modified 16 months ago
#13250 new defect
TOON: Toonstruck hangs when entering air vent through staircase and bathroom
|Reported by:||mutetus||Owned by:|
After getting rid of the crocodiles guarding the bathroom door, entering the bathroom from the staircase room and then trying to enter air vent often freezes the game to a state with only music playing and options menu accessible. Seems to work normally every time when loading saved game with Drew in the bathroom, when entering the bathroom from air vent, or clicking right mouse button on the air vent, but when entering bathroom from stairway, reproduction rate is 4/5.
See video: https://youtu.be/mvPTPjSVGlw
- Get rid of the bathroom guards
- Walk to staircase
- Walk to bathroom
- Click on air vent and wait until Drew walks there and is supposed to start changing to the fly costume
Scummvm 2.5.1, Windows 10
Change History (3)
by , 16 months ago
comment:1 by , 16 months ago
comment:2 by , 16 months ago
I could be wrong, but I think what happens is that Character::walkTo() gets called again, while the first call is still inside the while loop moving it to its desired destination. The loop from the inner call terminates because you reach the desired destination, but the loop from the outer call probably doesn't.
If so, the outer loop needs to be terminated. But I haven't yet found out where it gets stuck, so maybe I'm barking up the wrong tree here...
Edit: I was wrong, it did cancel the outer loop. There were two spots in the code where it could do this, and I was looking at the wrong one.
I was able to reproduce it, if I clicked on the air vent while Drew was still walking into the room from outside. Then it happened on the first try. If I waited for him to stop walking first, I wasn't able to reproduce it at all.