Opened 2 months ago
Last modified 2 months ago
#16538 pending defect (pending)
BACKENDS: MACOS: showFileBrowser crash on OSX 10.6 (SDL 2)
| Reported by: | barracuda156 | Owned by: | barracuda156 |
|---|---|---|---|
| Priority: | normal | Component: | Port: Mac OS X |
| Version: | Keywords: | ||
| Cc: | barracuda156 | Game: |
Description
Clicking Add game leads to the app crashing with bus error:
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000007 0x90e32dac in pthread_mutex_lock () (gdb) bt #0 0x90e32dac in pthread_mutex_lock () #1 0x0356b7e8 in ccCleaner () #2 0x919a15a8 in __CFDictionaryApplyFunction_block_invoke_1 () #3 0x91a7cc78 in CFBasicHashApply () #4 0x919a2a64 in CFDictionaryApplyFunction () #5 0x0356b758 in removeColorSpaceFromCaches () #6 0x0356ff90 in CGNotificationCenterPostNotification () #7 0x0356b57c in csFinalize () #8 0x919dff60 in _CFRelease () #9 0x03548a64 in ccFinalize () #10 0x919dff60 in _CFRelease () #11 0x91a7c754 in __CFBasicHashStandardCallback () #12 0x91a7ffc8 in CFBasicHashRemoveValue () #13 0x919a34ec in CFDictionaryRemoveValue () #14 0x03513ebc in initialize () #15 0x03513640 in createColorTransform () #16 0x0353aaa4 in CGColorTransformCreateMutable () #17 0x03550d68 in CGBitmapColorTransformCreate () #18 0x1aa936d8 in __CGBitmapContextDelegateCreate () #19 0x03550b34 in createBitmapContext () #20 0x0355057c in CGBitmapContextCreate () #21 0x03182e04 in CGBitmapContextCreate () #22 0x02a4914c in +[NSCGImageSnapshotRep _lockFocusForCreatingSnapshot:withRect:context:hints:flipped:] () #23 0x02a47200 in +[NSCGImageSnapshotRep lockFocusForCreatingSnapshotWithRect:context:hints:flipped:] () #24 0x02588824 in -[NSImage _lockFocusOnRepresentation:rect:context:hints:flipped:] () #25 0x02579760 in __-[NSImage lockFocusWithRect:context:hints:flipped:]_block_invoke_1 () #26 0x0257aa14 in -[NSImage _usingBestRepresentationForRect:context:hints:body:] () #27 0x025796d0 in -[NSImage lockFocusWithRect:context:hints:flipped:] () #28 0x02588620 in -[NSImage lockFocusFlipped:] () #29 0x0263c7c4 in -[NSNavScopeView _plusImage:] () #30 0x0263b2a8 in -[NSNavScopeView _updatePlusButtonImage] () #31 0x0263c008 in -[NSNavScopeView _createPlusButtonIsRequired] () #32 0x02639dfc in -[NSNavScopeView setPlusButtonAction:target:] () #33 0x02646ff8 in -[NSNavView _setupSearchParts] () #34 0x02645fe0 in -[NSNavView awakeFromNib] () #35 0x91a63924 in -[NSSet makeObjectsPerformSelector:] () #36 0x02576a64 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] () #37 0x0264f328 in -[NSNib instantiateNibWithExternalNameTable:] () #38 0x0264f090 in -[NSNib instantiateNibWithOwner:topLevelObjects:] () #39 0x02646aa0 in +[NSNavView navView] () #40 0x026eb2e0 in -[NSSavePanel(NSSavePanelLayout) _initContentView] () #41 0x026e4220 in -[NSSavePanel initWithContentRect:styleMask:backing:defer:] () #42 0x026e91c8 in +[NSSavePanel _crunchyRawUnbonedPanel] () #43 0x0020806c in MacOSXDialogManager::showFileBrowser () #44 0x000a9598 in GUI::BrowserDialog::runModal () #45 0x000d3e08 in GUI::LauncherDialog::addGame () #46 0x0013be90 in GUI::DropdownButtonWidget::handleMouseUp () #47 0x000b5410 in GUI::Dialog::handleMouseUp () #48 0x000c4d6c in GUI::GuiManager::runLoop () #49 0x000ce31c in GUI::LauncherChooser::runModal () #50 0x0005fd0c in launcherDialog () #51 0x00064914 in scummvm_main () #52 0x00e47cbc in main ()
$ scummvm -v 2026-02-11 04:41:40.066 scummvm[29992:903] *** __NSAutoreleaseNoPool(): Object 0x624acc0 of class NSCFString autoreleased with no pool in place - just leaking 2026-02-11 04:41:40.072 scummvm[29992:903] *** __NSAutoreleaseNoPool(): Object 0x624b180 of class NSConcreteData autoreleased with no pool in place - just leaking ScummVM 2026.1.0 Using SDL backend with SDL 2.32.10 Features compiled in: TAINTED Vorbis FLAC MP3 TiMidity RGB zLib FluidSynth Theora VPX AAC FreeType2 FriBiDi JPEG PNG taskbar cloud libcurl ENet SDL2 TinyGL OpenGL (with shaders) OpenGL desktop only
$ uname -a Darwin Sergey-Fedorovs-Mac.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:34:44 PDT 2011; root:xnu-1504.15.3~1/RELEASE_PPC Power Macintosh
Change History (5)
comment:1 by , 2 months ago
comment:2 by , 2 months ago
| Owner: | set to |
|---|---|
| Resolution: | → pending |
| Status: | new → pending |
comment:3 by , 2 months ago
| Component: | Common → Port: Mac OS X |
|---|
comment:4 by , 2 months ago
@barracuda156: What I could suggest (as it looks like you're already building this yourself), is to test the following commits, from earliest (bottom) to newest (top).
<https://github.com/dwatteau/scummvm/commits/fix/macosx-dialogs-panel-main-thread/backends/dialogs/macosx> (only the 2026 ones)
And then tell me which is the earliest commit fixing the issue (if it does fix it).
The Feb 14, 2026 commits haven't been pushed to main ScummVM repo yet. (I need more tests and review before submitting it as a PR.)
(The NSAutoreleasePool commit is a test for the warning you've reported in scummvm -v output. Not such if it's fixing it, or if the showOpenPanel: changes alone are already fixing this as well.)
Thanks.
comment:5 by , 2 months ago
| Summary: | Bus error on powerpc-darwin: KERN_PROTECTION_FAILURE at address: 0x00000007 in pthread_mutex_lock → BACKENDS: MACOS: showFileBrowser crash on OSX 10.6 (SDL 2) |
|---|

I'm not sure to understand where your ScummVM build comes from? Custom build?
The official PowerPC build for OSX cannot say it runs "SDL 2.32.10": that's not what I'm using for the builds. So it looks like you're running something else. What is it?
Darwin 10.8.0 is Snow Leopard, no? Snow Leopard has no official PowerPC layer, just Rosetta 1 to run PPC apps on Intel, AFAIK. Well, there's this "Sorbet Leopard", but if you're running ScummVM on a very custom setup, it needs to be detailed in the bug reports (sw_vers, saying that you're running a modified OSX if that's so, origin of your build and such).
Thanks.