ml-stable-diffusion icon indicating copy to clipboard operation
ml-stable-diffusion copied to clipboard

Sometimes crashes on macOS when app moves from background to foreground while it's running

Open sindresorhus opened this issue 2 years ago • 1 comments

I haven't been able to reproduce this myself, but I'm seeing some reports in Sentry. According to events in Sentry, it happens the moment the app moves from background to foreground state while it's running.

OS Version: macOS 13.1.0 (22C65)
Report Version: 104

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Crashed Thread: 10

Application Specific Information:
Exception 6, Code 2955694272, Subcode 8

Thread 10 Crashed:
0   libdispatch.dylib               0x3305070c0         dispatch_group_leave.cold.1
1   libdispatch.dylib               0x3304d1358         dispatch_group_leave
2   CoreML                          0x3410d8c48         __53-[MLNeuralNetworkEngine evaluateBatch:options:error:]_block_invoke.326
3   Espresso                        0x35bb2f154         EspressoLight::espresso_plan::submit_ane
4   libdispatch.dylib               0x3304ce9dc         _dispatch_call_block_and_release
5   libdispatch.dylib               0x3304d0504         _dispatch_client_callout
6   libdispatch.dylib               0x3304d7bbc         _dispatch_lane_serial_drain
7   libdispatch.dylib               0x3304d873c         _dispatch_lane_invoke
8   libdispatch.dylib               0x3304e334c         _dispatch_workloop_worker_thread
9   libsystem_pthread.dylib         0x3307d7100         _pthread_wqthread

Thread 0
0   libsystem_kernel.dylib          0x330762d70         mach_msg2_trap
1   libsystem_kernel.dylib          0x3307748a4         mach_msg2_internal
2   libsystem_kernel.dylib          0x33076b5c4         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3307630ec         mach_msg
4   CoreFoundation                  0x33091fbc0         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x33091e4ac         __CFRunLoopRun
6   CoreFoundation                  0x33091d888         CFRunLoopRunSpecific
7   HIToolbox                       0x343715fa0         RunCurrentEventLoopInMode
8   HIToolbox                       0x343715de4         ReceiveNextEventCommon
9   HIToolbox                       0x343715b2c         _BlockUntilNextEventMatchingListInModeWithFilter
10  AppKit                          0x336e67424         _DPSNextEvent
11  AppKit                          0x336e665b4         -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
12  AppKit                          0x336e5a9e4         -[NSApplication run]
13  AppKit                          0x336e31e28         NSApplicationMain
14  SwiftUI                         0x37e0138a8         OUTLINED_FUNCTION_8
15  SwiftUI                         0x37f1c87c0         OUTLINED_FUNCTION_11
16  SwiftUI                         0x37e9ec83c         OUTLINED_FUNCTION_1
17  Amazing AI                      0x202fdf800         [inlined] AppMain.$main (App.swift:49)
18  Amazing AI                      0x202fdf800         main
19  <unknown>                       0x1b00ebe50         <redacted>

Thread 1
0   libsystem_kernel.dylib          0x330766360         __semwait_signal
1   libsystem_c.dylib               0x3305705b0         nanosleep
2   libsystem_c.dylib               0x33057b128         sleep
3   Amazing AI                      0x20312d3e8         monitorCachedData (SentryCrashCachedData.c:144)
4   libsystem_pthread.dylib         0x3307db06c         _pthread_start

Thread 2 name: SentryCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib          0x330762d70         mach_msg2_trap
1   libsystem_kernel.dylib          0x3307748a4         mach_msg2_internal
2   libsystem_kernel.dylib          0x33076b5c4         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3307630ec         mach_msg
4   Amazing AI                      0x203129024         handleExceptions (SentryCrashMonitor_MachException.c:303)
5   libsystem_pthread.dylib         0x3307db06c         _pthread_start

Thread 4 name: io.sentry.app-hang-tracker
0   libsystem_kernel.dylib          0x330766360         __semwait_signal
1   libsystem_c.dylib               0x3305705b0         nanosleep
2   Foundation                      0x3327ca364         +[NSThread sleepForTimeInterval:]
3   Amazing AI                      0x2030dac54         -[SentryANRTracker detectANRs] (SentryANRTracker.m:75)
4   Foundation                      0x33274c470         __NSThread__start__
5   libsystem_pthread.dylib         0x3307db06c         _pthread_start

Thread 5 name: com.apple.NSEventThread
0   libsystem_kernel.dylib          0x330762d70         mach_msg2_trap
1   libsystem_kernel.dylib          0x3307748a4         mach_msg2_internal
2   libsystem_kernel.dylib          0x33076b5c4         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3307630ec         mach_msg
4   CoreFoundation                  0x33091fbc0         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x33091e4ac         __CFRunLoopRun
6   CoreFoundation                  0x33091d888         CFRunLoopRunSpecific
7   AppKit                          0x336f91410         _NSEventThread
8   libsystem_pthread.dylib         0x3307db06c         _pthread_start

Thread 6 name: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib          0x330762d70         mach_msg2_trap
1   libsystem_kernel.dylib          0x3307748a4         mach_msg2_internal
2   libsystem_kernel.dylib          0x33076b5c4         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3307630ec         mach_msg
4   CoreFoundation                  0x33091fbc0         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x33091e4ac         __CFRunLoopRun
6   CoreFoundation                  0x33091d888         CFRunLoopRunSpecific
7   CFNetwork                       0x339b3d500         _CFURLStorageSessionDisableCache
8   Foundation                      0x33274c470         __NSThread__start__
9   libsystem_pthread.dylib         0x3307db06c         _pthread_start

Thread 7 name: H11ANEServicesThread
0   libsystem_kernel.dylib          0x330762d70         mach_msg2_trap
1   libsystem_kernel.dylib          0x3307748a4         mach_msg2_internal
2   libsystem_kernel.dylib          0x33076b5c4         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3307630ec         mach_msg
4   CoreFoundation                  0x33091fbc0         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x33091e4ac         __CFRunLoopRun
6   CoreFoundation                  0x33091d888         CFRunLoopRunSpecific
7   CoreFoundation                  0x3309a47f8         CFRunLoopRun
8   ANEServices                     0x35cf90e74         H11ANE::H11ANEServicesThreadStart
9   libsystem_pthread.dylib         0x3307db06c         _pthread_start

Thread 8
0   libsystem_kernel.dylib          0x330764a1c         __workq_kernreturn
1   libsystem_pthread.dylib         0x3307d714c         _pthread_wqthread

Thread 9
0   libobjc.A.dylib                 0x33010ba1c         protocol_getMethodTypeEncoding_nolock
1   libobjc.A.dylib                 0x33010c2d8         protocol_getMethod_nolock
2   libobjc.A.dylib                 0x33010c1e0         protocol_getMethod
3   libobjc.A.dylib                 0x33010c06c         protocol_getMethodDescription
4   CoreFoundation                  0x330916ef0         __methodDescriptionForSelector
5   CoreFoundation                  0x33093194c         -[NSObject(NSObject) methodSignatureForSelector:]
6   CoreFoundation                  0x33090019c         ___forwarding___
7   CoreFoundation                  0x3308fff70         _CF_forwarding_prep_0
8   Amazing AI                      0x2030c1af8         [inlined] Decoder.decode (Decoder.swift:50)
9   Amazing AI                      0x2030c1af8         Collection.map<T>
10  Amazing AI                      0x2030c09b0         Decoder.decode
11  Amazing AI                      0x2030ced18         [inlined] StableDiffusionPipeline.decodeToImages (StableDiffusionPipeline.swift:196)
12  Amazing AI                      0x2030ced18         StableDiffusionPipeline.Progress.currentImages.getter (StableDiffusionPipeline.swift:228)
13  Amazing AI                      0x2030a5750         SSStableDiffusion.generate (Utilities.swift:150)
14  Amazing AI                      0x2030cdc98         StableDiffusionPipeline.generateImages (StableDiffusionPipeline.swift:133)
15  Amazing AI                      0x2030a91a4         SSStableDiffusion.generate (Utilities.swift:139)
16  libswift_Concurrency.dylib      0x4435d24c4         swift::runJobInEstablishedExecutorContext

Thread 10 Crashed:
0   libdispatch.dylib               0x3305070c0         dispatch_group_leave.cold.1
1   libdispatch.dylib               0x3304d1358         dispatch_group_leave
2   CoreML                          0x3410d8c48         __53-[MLNeuralNetworkEngine evaluateBatch:options:error:]_block_invoke.326
3   Espresso                        0x35bb2f154         EspressoLight::espresso_plan::submit_ane
4   libdispatch.dylib               0x3304ce9dc         _dispatch_call_block_and_release
5   libdispatch.dylib               0x3304d0504         _dispatch_client_callout
6   libdispatch.dylib               0x3304d7bbc         _dispatch_lane_serial_drain
7   libdispatch.dylib               0x3304d873c         _dispatch_lane_invoke
8   libdispatch.dylib               0x3304e334c         _dispatch_workloop_worker_thread
9   libsystem_pthread.dylib         0x3307d7100         _pthread_wqthread

Thread 11
0   libsystem_kernel.dylib          0x330764a1c         __workq_kernreturn
1   libsystem_pthread.dylib         0x3307d714c         _pthread_wqthread

Thread 12 name: H11ANEServicesThread
0   libsystem_kernel.dylib          0x330762d70         mach_msg2_trap
1   libsystem_kernel.dylib          0x3307748a4         mach_msg2_internal
2   libsystem_kernel.dylib          0x33076b5c4         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3307630ec         mach_msg
4   CoreFoundation                  0x33091fbc0         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x33091e4ac         __CFRunLoopRun
6   CoreFoundation                  0x33091d888         CFRunLoopRunSpecific
7   CoreFoundation                  0x3309a47f8         CFRunLoopRun
8   ANEServices                     0x35cf90e74         H11ANE::H11ANEServicesThreadStart
9   libsystem_pthread.dylib         0x3307db06c         _pthread_start

Thread 13 name: H11ANEServicesThread
0   libsystem_kernel.dylib          0x330762d70         mach_msg2_trap
1   libsystem_kernel.dylib          0x3307748a4         mach_msg2_internal
2   libsystem_kernel.dylib          0x33076b5c4         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3307630ec         mach_msg
4   CoreFoundation                  0x33091fbc0         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x33091e4ac         __CFRunLoopRun
6   CoreFoundation                  0x33091d888         CFRunLoopRunSpecific
7   CoreFoundation                  0x3309a47f8         CFRunLoopRun
8   ANEServices                     0x35cf90e74         H11ANE::H11ANEServicesThreadStart
9   libsystem_pthread.dylib         0x3307db06c         _pthread_start

Thread 14
0   libsystem_kernel.dylib          0x330764a1c         __workq_kernreturn
1   libsystem_pthread.dylib         0x3307d714c         _pthread_wqthread

Thread 15
0   libsystem_kernel.dylib          0x330764a1c         __workq_kernreturn
1   libsystem_pthread.dylib         0x3307d714c         _pthread_wqthread

Thread 16
0   libsystem_kernel.dylib          0x330764a1c         __workq_kernreturn
1   libsystem_pthread.dylib         0x3307d714c         _pthread_wqthread

Thread 17
0   libsystem_kernel.dylib          0x330764a1c         __workq_kernreturn
1   libsystem_pthread.dylib         0x3307d714c         _pthread_wqthread

Thread 18
0   libsystem_kernel.dylib          0x330764a1c         __workq_kernreturn
1   libsystem_pthread.dylib         0x3307d714c         _pthread_wqthread



EOF

sindresorhus avatar Dec 28 '22 11:12 sindresorhus

I am hearing this from a few users of mine too.

martinlexow avatar Jan 05 '23 13:01 martinlexow