libretro / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
68 stars 73 forks source link

Crash upon leaving a game #217

Open Lamarqe opened 3 years ago

Lamarqe commented 3 years ago

Build: kodi libretro, MGBA v0.8.4

Whenever I leave a game in kodi, kodi crashes with a segfault within game.libretro.mgba.so

(gdb) bt full

0 0x00000000 in ()

1 0x55d49d38 in GBDestroy () at /usr/lib/kodi/addons/game.libretro.mgba/game.libretro.mgba.so

2 0x55d48f10 in _GBCoreDeinit () at /usr/lib/kodi/addons/game.libretro.mgba/game.libretro.mgba.so

3 0x55d74a82 in retro_unload_game () at /usr/lib/kodi/addons/game.libretro.mgba/game.libretro.mgba.so

4 0x55dce6b6 in UnloadGame () at /usr/lib/kodi/addons/game.libretro/game.libretro.so.1.1.1

5 0x012e3ae8 in KODI::GAME::CGameClient::CloseFile() ()

6 0x010aa28a in KODI::RETRO::CRetroPlayer::CloseFile(bool) ()

7 0x00fd9654 in CApplicationPlayer::ClosePlayer() ()

8 0x00fc0456 in CApplication::StopPlaying() ()

9 0x00fccb38 in CApplication::OnAction(CAction const&) ()

10 0x00fcda88 in CApplication::ExecuteXBMCAction(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::shared_ptr const&) ()

11 0x00fd00ae in CApplication::OnMessage(CGUIMessage&) ()

12 0x00e914a8 in CGUIWindowManager::SendMessage(CGUIMessage&) ()

13 0x00e323d4 in CGUIAction::ExecuteActions(int, int, std::shared_ptr const&) const ()

14 0x00e3b396 in CGUIButtonControl::OnClick() ()

15 0x00e3b8d0 in CGUIButtonControl::OnAction(CAction const&) ()

16 0x00e8d874 in CGUIWindow::OnAction(CAction const&) ()

17 0x00e95490 in CGUIWindowManager::HandleAction(CAction const&) const ()

18 0x00e95632 in CGUIWindowManager::OnAction(CAction const&) const ()

19 0x00fcc608 in CApplication::OnAction(CAction const&) ()

20 0x00e0a9f6 in CInputManager::HandleKey(CKey const&) ()

21 0x00e0bd12 in CInputManager::OnEvent(XBMC_Event&) ()

22 0x00fcd3ee in CApplication::HandlePortEvents() ()

23 0x00fcd54c in CApplication::FrameMove(bool, bool) ()

24 0x00e91bce in CGUIWindowManager::ProcessRenderLoop(bool) ()

25 0x00e4ea38 in CGUIDialog::Open_Internal(bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) ()

26 0x00e4eb22 in CGUIDialog::Open(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) ()

27 0x010a2aea in KODI::RETRO::CGameWindowFullScreen::TriggerOSD() ()

28 0x010a2fb2 in KODI::RETRO::CGameWindowFullScreen::OnAction(CAction const&) ()

29 0x00e954d0 in CGUIWindowManager::HandleAction(CAction const&) const ()

30 0x00e95632 in CGUIWindowManager::OnAction(CAction const&) const ()

31 0x00fcc608 in CApplication::OnAction(CAction const&) ()

32 0x00e0a9f6 in CInputManager::HandleKey(CKey const&) ()

33 0x00e0bd12 in CInputManager::OnEvent(XBMC_Event&) ()

34 0x00fcd3ee in CApplication::HandlePortEvents() ()

35 0x00fcd54c in CApplication::FrameMove(bool, bool) ()

36 0x010364b6 in CXBApplicationEx::Run(CAppParamParser const&) ()

37 0x00dce560 in XBMC_Run ()

38 0x009b6820 in main ()

Sorry for providing limited additional information. The crash occurs on a raspberry pi 3, using OSMC media center. MGBA addon has been installed as a regular addon in kodi 18. If you could explain where/how to get a debug build of game.libretro.mgba.so, I would be happy to provide more detailed information about the crash. The crash seems to occur independently of the game that is used. I tried with Super Mario Land and Zelda, resulting in the same 100% reproducible call stack

endrift commented 3 years ago

I don't seem to be able to reproduce this with a debug build on regular Android RetroArch, and I'm not sure how Kodi builds their mGBA core.

Lamarqe commented 3 years ago

I never tested it on Android. Admittedly, I switched by now from Kodi to Lakka when using Libretro. So I could not even say if this issue has been fixed in Kodi since then.