supertuxkart / stk-code

The code base of supertuxkart
Other
4.46k stars 1.05k forks source link

Some crashes when starting easter egg ghost replay #3458

Open deveee opened 5 years ago

deveee commented 5 years ago

From google play console:

backtrace:
  #00  pc 000000000078c49c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN5World4initEv+564)
  #01  pc 00000000007b3e28  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN13WorldWithRank4initEv+28)
  #02  pc 00000000007a284c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN11LinearWorld4initEv+24)
  #03  pc 00000000007b8680  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN13EasterEggHunt4initEv+32)
  #04  pc 00000000005c3060  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN11RaceManager13startNextRaceEv+1100)
  #05  pc 00000000005c37a8  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN11RaceManager19startWatchingReplayERKSsi+1232)
  #06  pc 00000000008c81a8  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN21GhostReplayInfoDialog12processEventERKSs+460)
  #07  pc 000000000080518c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN9GUIEngine12EventHandler15sendEventToUserEPNS_6WidgetERSsi+452)
  #08  pc 0000000000805a88  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN9GUIEngine12EventHandler17onWidgetActivatedEPNS_6WidgetEi+1192)
  #09  pc 0000000000805fe8  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN9GUIEngine12EventHandler10onGUIEventERKN3irr6SEventE+820)
  #10  pc 0000000000806360  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN9GUIEngine12EventHandler7OnEventERKN3irr6SEventE+652)
  #11  pc 00000000009e7524  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui15CGUIEnvironment7OnEventERKNS_6SEventE+64)
  #12  pc 0000000000a75d58  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui15CGUIModalScreen7OnEventERKNS_6SEventE+152)
  #13  pc 0000000000a49568  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui10CGUIWindow7OnEventERKNS_6SEventE+120)
  #14  pc 0000000000a6453c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui10CGUIButton7OnEventERKNS_6SEventE+112)
  #15  pc 0000000000a6465c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui10CGUIButton7OnEventERKNS_6SEventE+400)
  #16  pc 00000000009ed018  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui15CGUIEnvironment17postEventFromUserERKNS_6SEventE+224)
  #17  pc 00000000009b1c3c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr14CIrrDeviceStub17postEventFromUserERKNS_6SEventE+88)
  #18  pc 000000000094f288  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr17CIrrDeviceAndroid11handleTouchEP11AInputEvent+600)
  #19  pc 00000000009aa2e4  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so
  #20  pc 0000000000949f58  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so
  #21  pc 000000000039a508  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN8MainLoop3runEv+1772)
  #22  pc 000000000034663c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (main+2328)
  #23  pc 000000000039ac88  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (android_main+72)
  #24  pc 00000000009aa7fc  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so
  #25  pc 0000000000066a20  /system/lib64/libc.so (_ZL15__pthread_startPv+36)
  #26  pc 000000000001ee64  /system/lib64/libc.so (__start_thread+68)

And second crash:

backtrace:
  #00  pc 000000000078c49c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN5World4initEv+564)
  #01  pc 00000000007b3e28  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN13WorldWithRank4initEv+28)
  #02  pc 00000000007a284c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN11LinearWorld4initEv+24)
  #03  pc 00000000007b8680  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN13EasterEggHunt4initEv+32)
  #04  pc 00000000005c3060  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN11RaceManager13startNextRaceEv+1100)
  #05  pc 00000000005c454c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN11RaceManager8startNewEb+3192)
  #06  pc 00000000005c52fc  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN11RaceManager15startSingleRaceERKSsib+200)
  #07  pc 0000000000693174  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN13RaceResultGUI13eventCallbackEPN9GUIEngine6WidgetERKSsi+1260)
  #08  pc 0000000000805104  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN9GUIEngine12EventHandler15sendEventToUserEPNS_6WidgetERSsi+316)
  #09  pc 0000000000805b08  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN9GUIEngine12EventHandler17onWidgetActivatedEPNS_6WidgetEi+1320)
  #10  pc 0000000000805fe8  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN9GUIEngine12EventHandler10onGUIEventERKN3irr6SEventE+820)
  #11  pc 0000000000806360  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN9GUIEngine12EventHandler7OnEventERKN3irr6SEventE+652)
  #12  pc 00000000009e7524  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui15CGUIEnvironment7OnEventERKNS_6SEventE+64)
  #13  pc 0000000000a6465c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui10CGUIButton7OnEventERKNS_6SEventE+400)
  #14  pc 00000000009ed018  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr3gui15CGUIEnvironment17postEventFromUserERKNS_6SEventE+224)
  #15  pc 00000000009b1c3c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr14CIrrDeviceStub17postEventFromUserERKNS_6SEventE+88)
  #16  pc 000000000094f288  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN3irr17CIrrDeviceAndroid11handleTouchEP11AInputEvent+600)
  #17  pc 00000000009aa2e4  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so
  #18  pc 0000000000949f58  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so
  #19  pc 000000000039a508  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (_ZN8MainLoop3runEv+1772)
  #20  pc 000000000034663c  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (main+2328)
  #21  pc 000000000039ac88  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so (android_main+72)
  #22  pc 00000000009aa7fc  /data/app/org.supertuxkart.stk_beta-w3MxW_ve9hpFYNCOso0_JA==/lib/arm64/libmain.so
  #23  pc 0000000000066a20  /system/lib64/libc.so (_ZL15__pthread_startPv+36)
  #24  pc 000000000001ee64  /system/lib64/libc.so (__start_thread+68)

And it crashed in world.cpp:203:

deve@deve:/home/Dokumenty/programowanie/supertuxkart/supertuxkart-builds/0.9.4-beta$ addr2line -f -p -i -e SuperTuxKart-git20180915-aarch64-libmain.so 000000000078c49c
_ZN5World4initEv w /home/Dokumenty/android/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/atomicity.h:53
 (inlined by) ?? w /home/Dokumenty/android/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/atomicity.h:96
 (inlined by) ?? w /home/Dokumenty/android/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/shared_ptr_base.h:133
 (inlined by) ?? w /home/Dokumenty/android/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/shared_ptr_base.h:673
 (inlined by) ?? w /home/Dokumenty/android/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/shared_ptr_base.h:912
 (inlined by) ?? w /home/Dokumenty/android/android-ndk-r12b/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/shared_ptr.h:103
 (inlined by) ?? w /home/Dokumenty/programowanie/supertuxkart/supertuxkart-git/android-aarch64/../src/replay/replay_play.hpp:167
 (inlined by) _ZN5World4initEv w /home/Dokumenty/programowanie/supertuxkart/supertuxkart-git/android-aarch64/./../src/modes/world.cpp:203

And it's for git version from 20180915.

Alayan-stk-2 commented 5 years ago

So, it crashes on m_karts.push_back(ReplayPlay::get()->getGhostKart(k));

Which is computed earlier by gk = ReplayPlay::get()->getNumGhostKart();

It works fine with an old egg hunt replay ; however I can reproduce the crash with a newly recorded one. So most probably an issue in the replay data making the game think there are more ghosts in there than there really is.

It appears to be very inconsistent (I can't reproduce it anymore), and the replay files themselves look ok after further inspection...

Alayan-stk-2 commented 5 years ago

I got a crash with a time-trial replay, not sure what's happening, but it may not be specific to egg hunt replays.

EDIT : unrelated to this issue. It's caused by unsetSquash EDIT : Fixed

deveee commented 5 years ago

I had one crash when I compared two ghosts and I used "watch only" feature. But it happened only once for me.

Maybe valgrind could say something useful if you can reproduce it...

And anyway something is broken, because if I start "watch only" with novice difficulty I have 0/7 eggs and if I start as supertux I have 0/8.

And sorry for a crash in unsetSquash, it was too late and I didn't test carefully.

Alayan-stk-2 commented 5 years ago

Different difficulties have different egg placement in egg hunt mode, so that one has 0/7 and the other 0/8 is to be expected.

However, this may make the comparison weird, as watching it you'll only see the eggs for one of the difficulties (or maybe, for a 3rd different one ! - compare a novice and intermediate replay after having selected expert).

The only two real options I see are a)allowing to view eggs of both difficulty at the same time with some color coding ; b)disabling the comparison of replays with a different difficulty (for egg hunt replays only).

While a) has some appeal, b) is definitely the easier option ; to be done alongside #3382

deveee commented 5 years ago

It's non-reproducible and didn't happen for a long time, so postpone till later.