Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The application crashed with -[NSManagedObjectContext _thereIsNoSadnessLikeTheDeathOfOptimism] when it was launched. #3512

Closed
Cone1989 opened this issue Nov 28, 2024 · 1 comment

Comments

@Cone1989
Copy link

What did you do?

The users just launched my application.

What did you expect to happen?

I expected the application not to crash.

What happened instead?

A CoreData crash occurred within 1 to 3 seconds.

GetStream Environment

GetStream Chat version: 0.64.0
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 18.1
Swift version: 5
Xcode version:
Device:

Additional context

All crashed share stack trace information similar to the following:

Distributor ID: com.apple.AppStore
Hardware Model: iPhone13,4
Version: 18.1.4 (3538)
AppStoreTools: 16B39
AppVariant: 1:iPhone13,4:18
Code Type: ARM-64 (Native)
Role: unknown
Parent Process: launchd [1]

Date/Time: 2024-11-14 22:02:40.6233 +0000
Launch Time: 2024-11-14 22:01:56.1221 +0000
OS Version: iPhone OS 18.1 (22B83)
Release Type: User
Baseband Version: 5.10.01
Report Version: 104

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000019cf9e788
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [2305]

Triggered by Thread: 3

Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x00000001e52ba688 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x00000001e52bdd98 mach_msg2_internal + 80 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001e52bdcb0 mach_msg_overwrite + 424 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001e52bdafc mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x0000000194ef9a84 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2637)
5 CoreFoundation 0x0000000194ef9130 __CFRunLoopRun + 1212 (CFRunLoop.c:3021)
6 CoreFoundation 0x0000000194ef8830 CFRunLoopRunSpecific + 588 (CFRunLoop.c:3434)
7 GraphicsServices 0x00000001e0ed81c4 GSEventRunModal + 164 (GSEvent.c:2196)
8 UIKitCore 0x0000000197a5eeb0 -[UIApplication run] + 816 (UIApplication.m:3844)
9 UIKitCore 0x0000000197b0d5b4 UIApplicationMain + 340 (UIApplication.m:5496)
10 SwiftUI 0x0000000199661f98 closure #1 in KitRendererCommon(
:) + 168 (UIKitApp.swift:68)
11 SwiftUI 0x0000000199642664 runApp(_:) + 100 (UIKitApp.swift:16)
12 SwiftUI 0x0000000199645490 static App.main() + 180 (App.swift:121)
13 MyApp 0x0000000100675914 static AppLauncher.main() + 56 (AppLauncher.swift:0)
14 MyApp 0x0000000100675914 static AppLauncher.$main() + 56 (:10)
15 MyApp 0x0000000100675914 main + 116 (AppLauncher.swift:0)
16 dyld 0x00000001ba8e6ec8 start + 2724 (dyldMain.cpp:1334)

... crash information from other threads

Thread 3 name:
Thread 3 Crashed:
0 CoreData 0x000000019cf9e788 -[NSManagedObjectContext thereIsNoSadnessLikeTheDeathOfOptimism] + 36 (NSManagedObjectContext.m:1477)
1 CoreData 0x000000019cefb2bc -[NSManagedObjectContext save:] + 1876 (NSManagedObjectContext.m:1690)
2 MyApp 0x0000000100dfed0c closure #1 in DatabaseContainer.write(
:completion:) + 1452 (DatabaseContainer.swift:232)
3 MyApp 0x0000000100cdbd84 thunk for @escaping @callee_guaranteed () -> () + 28 (:0)
4 CoreData 0x000000019ce61f80 developerSubmittedBlockToNSManagedObjectContextPerform + 156 (NSManagedObjectContext.m:4002)
5 libdispatch.dylib 0x000000019cbfe0d0 _dispatch_client_callout + 20 (object.m:576)
6 libdispatch.dylib 0x000000019cc056d8 _dispatch_lane_serial_drain + 744 (queue.c:3934)
7 libdispatch.dylib 0x000000019cc061e0 _dispatch_lane_invoke + 380 (queue.c:4025)
8 libdispatch.dylib 0x000000019cc11258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
9 libdispatch.dylib 0x000000019cc10aa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
10 libsystem_pthread.dylib 0x000000021d407c7c _pthread_wqthread + 288 (pthread.c:2696)
11 libsystem_pthread.dylib 0x000000021d404488 start_wqthread + 8

@laevandus
Copy link
Contributor

Hi @Cone1989, we just released 4.67.0 for addressing it. Could you please upgrade to 4.67.0 and if it still happens again, please reopen this issue.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants