[Scummvm-tracker] [ScummVM :: Bugs] #15921: MACOS: Crash at start when gif component is disabled

ScummVM :: Bugs trac at scummvm.org
Tue May 6 21:20:44 UTC 2025


#15921: MACOS: Crash at start when gif component is disabled
-------------------+----------------------------
Reporter:  criezy  |      Owner:  (none)
    Type:  defect  |     Status:  new
Priority:  normal  |  Component:  Port: Mac OS X
 Version:          |   Keywords:
    Game:          |
-------------------+----------------------------
 There is a crash when starting ScummVM on macOS if some engines are
 disabled.

 {{{
 AddressSanitizer:DEADLYSIGNAL
 =================================================================
 ==9390==ERROR: AddressSanitizer: BUS on unknown address (pc 0x00000bad4007
 bp 0x00016f989950 sp 0x00016f989720 T0)
 ==9390==The signal is caused by a READ memory access.
 ==9390==Hint: this fault was caused by a dereference of a high value
 address (see register values below).  Disassemble the provided pc to learn
 which register was used.
 ==9338==WARNING: atos failed to symbolize address "0xbad4007"
     #0 0xbad4007  (/Users/criezy/Dev/git/scummvm/scummvm:arm64+0x93ec007)
     #1 0x192152bcc in IIO_Reader::callGetImageCount(CGImageReadSession*,
 IIODictionary*, CGImageSourceStatus*, int*)+0x250
 (ImageIO:arm64e+0x11dbcc)
     #2 0x192042adc in IIOImageSource::updatedCount()+0x154
 (ImageIO:arm64e+0xdadc)
     #3 0x19204b5c4 in CGImageSourceGetCount+0xd8 (ImageIO:arm64e+0x165c4)
     #4 0x18aef6a50 in +[NSBitmapImageRep
 _imagesWithData:hfsFileType:extension:zone:expandImageContentNow:includeAllReps:]+0x184
 (AppKit:arm64e+0x128a50)
     #5 0x18b00e1e8 in +[NSBitmapImageRep imageRepsWithData:]+0x40
 (AppKit:arm64e+0x2401e8)
     #6 0x18b00dab8 in -[NSImage initWithData:]+0x48
 (AppKit:arm64e+0x23fab8)
     #7 0x10db436f0 in +[NSCursor(InvisibleCursor) invisibleCursor]+0x64
 (libSDL2-2.0.0.dylib:arm64+0xcb6f0)
     #8 0x10db4ac68 in -[SDLView resetCursorRects]+0x74
 (libSDL2-2.0.0.dylib:arm64+0xd2c68)
     #9 0x18b4ffcc8 in -[_NSTrackingAreaAKViewHelper
 updateTrackingAreasWithInvalidCursorRects:]+0x118 (AppKit:arm64e+0x731cc8)
     #10 0x18b8a43b0 in _NSViewSubViewMutationSafeApply+0xd8
 (AppKit:arm64e+0xad63b0)
     #11 0x18b4ffd6c in -[_NSTrackingAreaAKViewHelper
 updateTrackingAreasWithInvalidCursorRects:]+0x1bc (AppKit:arm64e+0x731d6c)
     #12 0x18b4fdcc8 in -[_NSTrackingAreaAKManager
 displayCycleUpdateStructuralRegions]+0xac (AppKit:arm64e+0x72fcc8)
     #13 0x18aeb1020 in
 __NSWindowGetDisplayCycleObserverForUpdateStructuralRegions_block_invoke+0x168
 (AppKit:arm64e+0xe3020)
     #14 0x18aeac9f4 in NSDisplayCycleObserverInvoke+0xa4
 (AppKit:arm64e+0xde9f4)
     #15 0x18aeac650 in NSDisplayCycleFlush+0x280 (AppKit:arm64e+0xde650)
     #16 0x18f79f72c in
 CA::Transaction::run_commit_handlers(CATransactionPhase)+0x74
 (QuartzCore:arm64e+0x372c)
     #17 0x18f79e4cc in CA::Transaction::commit()+0x13c
 (QuartzCore:arm64e+0x24cc)
     #18 0x18af30668 in __62+[CATransaction(NSCATransaction)
 NS_setFlushesWithDisplayLink]_block_invoke+0x10c (AppKit:arm64e+0x162668)
     #19 0x18b8ede10 in
 ___NSRunLoopObserverCreateWithHandler_block_invoke+0x3c
 (AppKit:arm64e+0xb1fe10)
     #20 0x1875b1250 in
 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__+0x20
 (CoreFoundation:arm64e+0x7d250)
     #21 0x1875b113c in __CFRunLoopDoObservers+0x214
 (CoreFoundation:arm64e+0x7d13c)
     #22 0x1875b0768 in __CFRunLoopRun+0x304
 (CoreFoundation:arm64e+0x7c768)
     #23 0x1875afe08 in CFRunLoopRunSpecific+0x25c
 (CoreFoundation:arm64e+0x7be08)
     #24 0x191d4affc in RunCurrentEventLoopInMode+0x120
 (HIToolbox:arm64e+0x32ffc)
     #25 0x191d4ac8c in ReceiveNextEventCommon+0xd8
 (HIToolbox:arm64e+0x32c8c)
     #26 0x191d4ab90 in
 _BlockUntilNextEventMatchingListInModeWithFilter+0x48
 (HIToolbox:arm64e+0x32b90)
     #27 0x18ae0896c in _DPSNextEvent+0x290 (AppKit:arm64e+0x3a96c)
     #28 0x18b5fade8 in -[NSApplication(NSEventRouting)
 _nextEventMatchingEventMask:untilDate:inMode:dequeue:]+0x2b8
 (AppKit:arm64e+0x82cde8)
     #29 0x10db40570 in Cocoa_PumpEventsUntilDate+0xbc
 (libSDL2-2.0.0.dylib:arm64+0xc8570)
     #30 0x10db407a4 in Cocoa_PumpEvents+0x34
 (libSDL2-2.0.0.dylib:arm64+0xc87a4)
     #31 0x10da9c4d0 in SDL_PumpEventsInternal+0x3c
 (libSDL2-2.0.0.dylib:arm64+0x244d0)
     #32 0x10da9c600 in SDL_WaitEventTimeout_REAL+0x54
 (libSDL2-2.0.0.dylib:arm64+0x24600)
     #33 0x103b8e714 in SdlEventSource::pollEvent(Common::Event&)
 sdl2-events.cpp:658
     #34 0x108a4e17c in Common::EventDispatcher::dispatch() events.cpp:80
     #35 0x1037838fc in DefaultEventManager::pollEvent(Common::Event&)
 default-events.cpp:83
     #36 0x103272874 in GUI::GuiManager::runLoop() gui-manager.cpp:569
     #37 0x1032946dc in GUI::LauncherDialog::run() launcher.cpp:345
     #38 0x1032aa0e8 in GUI::LauncherChooser::runModal() launcher.cpp:1042
     #39 0x102933aac in launcherDialog() main.cpp:118
     #40 0x10292aef4 in scummvm_main main.cpp:733
     #41 0x102912d90 in main macosx-main.cpp:44
     #42 0x18714a0dc  (<unknown module>)
 }}}

 git bisect blames the following commit:

 {{{
 49e43701d5637cdcd6aa1b2ba2c2bd86cc493cf6 is the first bad commit
 commit 49e43701d5637cdcd6aa1b2ba2c2bd86cc493cf6
 Author: Eugene Sandulenko <sev at scummvm.org>
 Date:   Fri Dec 27 13:19:56 2024 +0100

     CONFIGURE: Turned gif into a component
 }}}

 Having found this I did some more tests and indeed if I enable one of the
 engine that use the gif component (e.g. twine), then the crash goes away.
 So it looks like that at least on my system, if the git component is
 disabled this causes the crash. This is somewhat consistent with the crash
 call stack that seems related to images. But I can't make full sense of
 it.

 System: macOS, M1, sdl 2.30.9
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15921>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list