libretro / bsnes-mercury

Fork of bsnes with various performance improvements.
GNU General Public License v3.0
47 stars 39 forks source link

crashes when unloading bsnes core #90

Open jakwings opened 3 years ago

jakwings commented 3 years ago

Description

Switching off the emulator (bsnes) crashed RetroArch.

Expected behavior

It should return to the main menu of RetroArch.

Actual behavior

RetroArch crashed.

Steps to reproduce the bug

  1. Load a game with the core (bsnes-mercury Accuracy)
  2. Switch off the emulator

Bisect Results

N/A

It is caused by building on the latest Mac OS (10.15 onwards) and running on an older macos. Could be solved by adding these compile flags? -mmacosx-version-min=10.9 -fno-stack-check -fno-stack-protector (you can google ____chkstk_darwin)

Version/Commit

Environment information

Logs

Dyld Error Message:
  Symbol not found: ____chkstk_darwin
  Referenced from: /Applications/RetroArch.app/Contents/Resources/cores/bsnes_mercury_accuracy_libretro.dylib
  Expected in: /usr/lib/libSystem.B.dylib

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   dyld                            0x00007fff67d8a075 dyld_fatal_error + 1
1   dyld                            0x00007fff67d8d094 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 139
2   libdyld.dylib                   0x00007fff9b763262 dyld_stub_binder + 282
3   ???                             0x00000001268cf2a0 0 + 4941738656
4   bsnes_mercury_accuracy_libretro.dylib   0x0000000126815620 SuperFamicom::Interface::save() + 528
5   bsnes_mercury_accuracy_libretro.dylib   0x00000001268876b1 retro_unload_game + 17
6   com.libretro.RetroArch          0x000000010e99252f 0x10e97c000 + 91439
7   com.libretro.RetroArch          0x000000010e9911d8 0x10e97c000 + 86488
8   com.libretro.RetroArch          0x000000010eacf826 0x10e97c000 + 1390630
9   com.libretro.RetroArch          0x000000010e9f0b01 0x10e97c000 + 477953
10  com.libretro.RetroArch          0x000000010e9938d2 0x10e97c000 + 96466
11  com.libretro.RetroArch          0x000000010e9f8573 0x10e97c000 + 509299
12  com.libretro.RetroArch          0x000000010eb284a0 0x10e97c000 + 1754272
13  com.libretro.RetroArch          0x000000010ea133f1 0x10e97c000 + 619505
14  com.libretro.RetroArch          0x000000010ea1065a 0x10e97c000 + 607834
15  com.libretro.RetroArch          0x000000010e983118 0x10e97c000 + 28952
16  com.apple.Foundation            0x00007fff9d32cdbe __NSThreadPerformPerform + 279
17  com.apple.CoreFoundation        0x00007fff930467e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18  com.apple.CoreFoundation        0x00007fff93025f0c __CFRunLoopDoSources0 + 556
19  com.apple.CoreFoundation        0x00007fff9302542f __CFRunLoopRun + 927
20  com.apple.CoreFoundation        0x00007fff93024e28 CFRunLoopRunSpecific + 296
21  com.apple.HIToolbox             0x00007fff94e4e935 RunCurrentEventLoopInMode + 235
22  com.apple.HIToolbox             0x00007fff94e4e677 ReceiveNextEventCommon + 184
23  com.apple.HIToolbox             0x00007fff94e4e5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
24  com.apple.AppKit                0x00007fff96e57df6 _DPSNextEvent + 1067
25  com.apple.AppKit                0x00007fff96e57226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
26  com.apple.AppKit                0x00007fff96e4bd80 -[NSApplication run] + 682
27  com.apple.AppKit                0x00007fff96e15368 NSApplicationMain + 1176
28  com.libretro.RetroArch          0x000000010e9804ec 0x10e97c000 + 17644