Crash when loading content twice in a row
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
When loading GBA content twice in a row, the second load crashes RetroArch.
Expected behavior
RetroArch should not crash.
Actual behavior
RetroArch crashes.
Steps to reproduce the bug
- Start RetroArch
- Load content (in my case: Pokemon Emerald with mGBA, but this occurs with any GBA game on any GBA core)
- Run for a few seconds
- Close content
- Load same content again
- Crash
Version/Commit
- RetroArch: RetroArch64 1.9.0_GIT (git version: 6388872) (same issue occurs on RetroArch non-64)
Environment information
- OS: Android 10 (stock Samsung, no CFW or rooting)
- Phone: Samsung Galaxy S9
Logcat
Attached: retroarch-logcat.log
Of note:
2020-10-11 12:14:45.335 10569-10569/? A/DEBUG: pid: 10277, tid: 10344, name: Thread-6 >>> com.retroarch.aarch64 <<<
2020-10-11 12:14:45.345 10569-10569/? A/DEBUG: #02 pc 0000000000302380 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.345 10569-10569/? A/DEBUG: #03 pc 000000000035e890 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.345 10569-10569/? A/DEBUG: #04 pc 00000000002b1f88 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (command_event+5720) (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.345 10569-10569/? A/DEBUG: #05 pc 00000000003001cc /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (rarch_ctl+232) (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #06 pc 00000000003d444c /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #07 pc 00000000003d4d44 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (task_push_load_content_from_playlist_from_menu+524) (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #08 pc 000000000051c194 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #09 pc 000000000034a4e8 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (generic_menu_entry_action+364) (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #10 pc 000000000045e154 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #11 pc 0000000000400824 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #12 pc 000000000034a4e8 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (generic_menu_entry_action+364) (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #13 pc 000000000045e154 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #14 pc 000000000034f854 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (menu_driver_iterate+8292) (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #15 pc 0000000000365a2c /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (runloop_iterate+7088) (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #16 pc 0000000000363cec /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (rarch_main+828) (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.346 10569-10569/? A/DEBUG: #17 pc 00000000004bc704 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.347 10569-10569/? A/DEBUG: #18 pc 00000000003c3ff8 /data/app/com.retroarch.aarch64-pk52Ji3xr0V_Kjf2VTFiXw==/lib/arm64/libretroarch-activity.so (BuildId: 2d877a173a4b6781eb3588e1fe332e1bfd4767c8)
2020-10-11 12:14:45.976 1310-1481/? E/WindowManager: RemoteException occurs on reporting focusChanged, w=Window{784b06 u0 com.retroarch.aarch64/com.retroarch.browser.retroactivity.RetroActivityFuture}
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:575)
at android.view.IWindow$Stub$Proxy.windowFocusChanged(IWindow.java:829)
at com.android.server.wm.WindowState.reportFocusChangedSerialized(WindowState.java:3691)
at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:5268)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.os.HandlerThread.run(HandlerThread.java:67)
at com.android.server.ServiceThread.run(ServiceThread.java:44)
2020-10-11 12:14:46.000 1310-1825/? W/InputDispatcher: channel '784b06 com.retroarch.aarch64/com.retroarch.browser.retroactivity.RetroActivityFuture (server)' ~ Consumer closed input channel or an error occurred. events=0x9, fd=593
2020-10-11 12:14:46.000 1310-1825/? E/InputDispatcher: channel '784b06 com.retroarch.aarch64/com.retroarch.browser.retroactivity.RetroActivityFuture (server)' ~ Channel is unrecoverably broken and will be disposed!
Other information
This problem seems to be specific to GBA cores: gpSP and VBA-M have the same issue. A SNES core, for example, doesn't have this issue: I can close and reload SNES content as many times in a row as I want.
I have placed gba_bios.bin in /RetroArch/system.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Android sequence of loading GBA content, closing it, and loading it again, then inspect the attached logcat around command_event, rarch_ctl, task_push_load_content_from_playlist_from_menu, and the runloop entry points. Trace the second-load crash and verify that GBA content can be closed and reloaded repeatedly without RetroArch crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, c
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100