rwengine / openrw

OpenRW "Open ReWrite" is an un-official open source recreation of the classic Grand Theft Auto III game executable
http://openrw.org
GNU General Public License v3.0
1.92k stars 172 forks source link

Crash on "A Ride In The Park" mission start #506

Open ghost opened 6 years ago

ghost commented 6 years ago
0  0x0000555555967046 in ModelFrame::getDefaultTranslation (this=0x555500000001) at /home/user/openrw/rwlib/source/data/Clump.hpp:55
1  0x0000555555a03ae7 in VehicleObject::getSeatEntryDoor (this=0x55557c7fe240, seat=0) at /home/user/openrw/rwengine/src/objects/VehicleObject.cpp:623
2  0x0000555555953778 in Activities::EnterVehicle::update (this=0x55557ccc2890, character=0x555579cd4500, controller=0x555579cd4480) at /home/user/openrw/rwengine/src/ai/CharacterController.cpp:203
3  0x0000555555952dcb in CharacterController::updateActivity (this=0x555579cd4480) at /home/user/openrw/rwengine/src/ai/CharacterController.cpp:38
4  0x0000555555953212 in CharacterController::update (this=0x555579cd4480, dt=0.0166666675) at /home/user/openrw/rwengine/src/ai/CharacterController.cpp:107
5  0x0000555555957fc7 in PlayerController::update (this=0x555579cd4480, dt=0.0166666675) at /home/user/openrw/rwengine/src/ai/PlayerController.cpp:291
6  0x00005555559ee9db in CharacterObject::tick (this=0x555579cd4500, dt=0.0166666675) at /home/user/openrw/rwengine/src/objects/CharacterObject.cpp:264
7  0x00005555558f25c4 in RWGame::tick (this=0x7fffffff7c00, dt=0.0166666675) at /home/user/openrw/rwgame/RWGame.cpp:530
8  0x00005555558f213d in RWGame::run (this=0x7fffffff7c00) at /home/user/openrw/rwgame/RWGame.cpp:453
9  0x00005555558da342 in main (argc=1, argv=0x7fffffffe708) at /home/user/openrw/rwgame/main.cpp:17

same happens with "Patriot Playground"

ghost commented 6 years ago

It's one of these missions which requires to be in car. Doesn't check if you are inside, just tries to dereference. (and if you are not crashes)

It's not a bug, just mission menu should create vehicle or tell about needed one. (Edit: it is, see discussion below)

see: https://github.com/Lighnat0r/GTA-III-SCM-Converted/blob/aa120220618c4c1314d319bc6210071437d14662/08_4x4_2.sc

ghost commented 6 years ago

I was starting this mission normally [entering the car at the park].

ghost commented 6 years ago

Backtrace suggests that something is wrong with door object apparently

ghost commented 6 years ago

If you create other vehicle, enter and start mission via menu, game doesn't crash.

Entering jeep causes: https://gist.github.com/ShFil119/030f7a084ea58625d35ad1e6235d301f

Looks like vehicle is destroyed before mission starts. Btw asan is super helpful. :)

ghost commented 6 years ago

If it is destroyed during mission start, maybe it does not count as player vehicle, but as traffic vehicle, so script clears it from the world.

ghost commented 6 years ago

00da needs to be reimplemented