JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.97k stars 1.16k forks source link

SnapshotStateObserver crash on IOS #2652

Closed nekzabirov closed 1 year ago

nekzabirov commented 1 year ago

I use StateFlow list and collect it into State compose, sometimes after list updates i got this crash.

Last Exception Backtrace:
0   Shared                          0x104c1d610 ThrowNullPointerException + 160 (RuntimeUtils.kt:15)
1   Shared                          0x104d59d38 kfun:androidx.compose.runtime.collection.IdentityScopeMap.find#internal + 724 (IdentityScopeMap.kt:0)
2   Shared                          0x104d99334 <inlined-out:forEachScopeOf> + 12 (IdentityScopeMap.kt:89)
3   Shared                          0x104d99334 kfun:androidx.compose.runtime.snapshots.SnapshotStateObserver.ObservedScopeMap.recordInvalidation#internal + 1764 (SnapshotStateObserver.kt:432)
4   Shared                          0x104d99334 <inlined-out:<anonymous>> + 1816 (SnapshotStateObserver.kt:44)
5   Shared                          0x104d99334 <inlined-out:forEach> + 2008 (MutableVector.kt:466)
6   Shared                          0x104d99334 <inlined-out:<anonymous>> + 2012 (SnapshotStateObserver.kt:80)
7   Shared                          0x104d99334 <inlined-out:synchronized> + 2020 (Synchronized.kt:175)
8   Shared                          0x104d99334 <inlined-out:synchronized> + 2024 (Synchronization.kt:33)
9   Shared                          0x104d99334 <inlined-out:forEachScopeMap> + 2024 (SnapshotStateObserver.kt:79)
10  Shared                          0x104d99334 kfun:androidx.compose.runtime.snapshots.SnapshotStateObserver.<init>$lambda$1#internal + 2064 (SnapshotStateObserver.kt:43)
11  Shared                          0x104d99334 kfun:androidx.compose.runtime.snapshots.SnapshotStateObserver.$<init>$lambda$1$FUNCTION_REFERENCE$1800.invoke#internal + 2084 (SnapshotStateObserver.kt:40)
12  Shared                          0x104d99334 kfun:androidx.compose.runtime.snapshots.SnapshotStateObserver.$<init>$lambda$1$FUNCTION_REFERENCE$1800.$<bridge-UNNNN>invoke(-1:0;-1:1){}#internal + 2148 (SnapshotStateObserver.kt:40)
13  Shared                          0x104d81b44 <inlined-out:<anonymous>> + 24 (Snapshot.kt:1766)
14  Shared                          0x104d81b44 <inlined-out:fastForEach> + 112 (ListUtils.kt:36)
15  Shared                          0x104d81b44 kfun:androidx.compose.runtime.snapshots.advanceGlobalSnapshot#internal + 452 (Snapshot.kt:1765)
16  Shared                          0x104d7b4f4 kfun:androidx.compose.runtime.snapshots.advanceGlobalSnapshot#internal.143 + 28 (Snapshot.kt:1773)
17  Shared                          0x104d7b4f4 kfun:androidx.compose.runtime.snapshots.Snapshot.Companion#sendApplyNotifications(){} + 472 (Snapshot.kt:569)
18  Shared                          0x104f6fcfc <inlined-out:<anonymous>> + 4 (GlobalSnapshotManager.native.kt:48)
19  Shared                          0x104f6fcfc <inlined-out:<anonymous>> + 272 (Channels.common.kt:104)
20  Shared                          0x104f6fcfc <inlined-out:consume> + 272 (Channels.common.kt:85)
21  Shared                          0x104f6fcfc <inlined-out:consumeEach> + 272 (Channels.common.kt:103)
22  Shared                          0x104f6fcfc kfun:androidx.compose.ui.platform.GlobalSnapshotManager.$ensureStarted$lambda$0COROUTINE$414.invokeSuspend#internal + 416 (GlobalSnapshotManager.native.kt:47)
23  Shared                          0x104c09744 <inlined-out:<anonymous>> + 44 (ContinuationImpl.kt:30)
24  Shared                          0x104c09744 <inlined-out:with> + 44 (Standard.kt:70)
25  Shared                          0x104c09744 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 204 (ContinuationImpl.kt:26)
26  Shared                          0x104cf3bfc <inlined-out:resume> + 24 (Continuation.kt:45)
27  Shared                          0x104cf3bfc <inlined-out:<anonymous>> + 1252 (DispatchedTask.kt:106)
28  Shared                          0x104cf3bfc <inlined-out:withContinuationContext> + 1252 (CoroutineContext.kt:58)
29  Shared                          0x104cf3bfc kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1444 (DispatchedTask.kt:88)
30  Shared                          0x104d06cc8 kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.dispatch$lambda$0#internal + 184 (Dispatchers.kt:26)
31  Shared                          0x104d06cc8 kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1852.invoke#internal + 188 (Dispatchers.kt:25)
32  Shared                          0x104d06cc8 kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1852.$<bridge-UNN>invoke(){}#internal + 228 (Dispatchers.kt:25)
33  Shared                          0x1057c5164 ___6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f7265_knbridge830_block_invoke + 440
34  libdispatch.dylib               0x1d46b44b4 _dispatch_call_block_and_release + 32 (init.c:1518)
35  libdispatch.dylib               0x1d46b5fdc _dispatch_client_callout + 20 (object.m:560)
36  libdispatch.dylib               0x1d46b90c8 _dispatch_queue_override_invoke + 788 (inline_internal.h:2632)
37  libdispatch.dylib               0x1d46c7a6c _dispatch_root_queue_drain + 396 (inline_internal.h:0)
38  libdispatch.dylib               0x1d46c8284 _dispatch_worker_thread2 + 164 (queue.c:7052)
39  libsystem_pthread.dylib         0x219b58dbc _pthread_wqthread + 228 (pthread.c:2631)
40  libsystem_pthread.dylib         0x219b58b98 start_wqthread + 8

Thread 0 name:
Thread 0:
0   Shared                          0x0000000104f60d18 <inlined-out:headToTail> + 980 (NodeChain.kt:554)
1   Shared                          0x0000000104f60d18 <inlined-out:headToTail> + 980 (NodeChain.kt:535)
2   Shared                          0x0000000104f60d18 <inlined-out:headToTail> + 980 (NodeChain.kt:528)
3   Shared                          0x0000000104f60d18 kfun:androidx.compose.ui.node.LayoutNode#dispatchOnPositionedCallbacks(){} + 1672 (LayoutNode.kt:1089)
4   Shared                          0x0000000104f60d18 kfun:androidx.compose.ui.node.OnPositionedDispatcher.dispatchHierarchy#internal + 1812 (OnPositionedDispatcher.kt:53)
5   Shared                          0x0000000104f606d8 kfun:androidx.compose.ui.node.LayoutNode#dispatchOnPositionedCallbacks(){} + 72 (LayoutNode.kt:1083)
6   Shared                          0x0000000104f606d8 kfun:androidx.compose.ui.node.OnPositionedDispatcher.dispatchHierarchy#internal + 212 (OnPositionedDispatcher.kt:53)
7   Shared                          0x0000000104f60da0 <inlined-out:<anonymous>> + 4 (OnPositionedDispatcher.kt:57)
8   Shared                          0x0000000104f60da0 <inlined-out:forEach> + 4 (MutableVector.kt:466)
9   Shared                          0x0000000104f60da0 <inlined-out:forEachChild> + 4 (LayoutNode.kt:149)
10  Shared                          0x0000000104f60da0 kfun:androidx.compose.ui.node.OnPositionedDispatcher.dispatchHierarchy#internal + 1948 (OnPositionedDispatcher.kt:56)
11  Shared                          0x0000000104f4b848 <inlined-out:<anonymous>> + 12 (OnPositionedDispatcher.kt:44)
12  Shared                          0x0000000104f4b848 <inlined-out:forEachReversed> + 12 (MutableVector.kt:498)
13  Shared                          0x0000000104f4b848 kfun:androidx.compose.ui.node.OnPositionedDispatcher#dispatch(){} + 176 (OnPositionedDispatcher.kt:42)
14  Shared                          0x0000000104f4b848 kfun:androidx.compose.ui.node.MeasureAndLayoutDelegate#dispatchOnPositionedCallbacks(kotlin.Boolean){} + 192 (MeasureAndLayoutDelegate.kt:532)
15  Shared                          0x0000000104f4b848 kfun:androidx.compose.ui.node.MeasureAndLayoutDelegate#dispatchOnPositionedCallbacks$default(kotlin.Boolean;kotlin.Int){} + 244 (MeasureAndLayoutDelegate.kt:528)
16  Shared                          0x0000000104f85718 kfun:androidx.compose.ui.platform.SkiaBasedOwner#measureAndLayout(kotlin.Boolean){} + 640 (SkiaBasedOwner.skiko.kt:276)
17  Shared                          0x0000000104f72a34 <inlined-out:<anonymous>> + 4 (ComposeScene.skiko.kt:413)
18  Shared                          0x0000000104f72a34 <inlined-out:forEach> + 616 (_Collections.kt:1851)
19  Shared                          0x0000000104f72a34 <inlined-out:forEachOwner> + 616 (ComposeScene.skiko.kt:196)
20  Shared                          0x0000000104f72a34 <inlined-out:<anonymous>> + 848 (ComposeScene.skiko.kt:413)
21  Shared                          0x0000000104f72a34 <inlined-out:postponeInvalidation> + 884 (ComposeScene.skiko.kt:162)
22  Shared                          0x0000000104f72a34 kfun:androidx.compose.ui.ComposeScene#render(org.jetbrains.skia.Canvas;kotlin.Long){} + 1432 (ComposeScene.skiko.kt:409)
23  Shared                          0x0000000104f72a34 kfun:androidx.compose.ui.native.ComposeLayer.ComponentImpl#onRender(org.jetbrains.skia.Canvas;kotlin.Int;kotlin.Int;kotlin.Long){} + 1616 (ComposeLayer.jsNative.kt:56)
24  Shared                          0x0000000104df7210 kfun:org.jetbrains.skiko.SkiaLayer#draw(org.jetbrains.skia.Canvas){} + 2308 (SkiaLayer.ios.kt:107)
25  Shared                          0x0000000104df7210 kfun:org.jetbrains.skiko.context.MetalContextHandler.$draw$FUNCTION_REFERENCE$1683.invoke#internal + 2344 (MetalContextHandler.kt:12)
26  Shared                          0x0000000104df7210 kfun:org.jetbrains.skiko.context.MetalContextHandler.$draw$FUNCTION_REFERENCE$1683.$<bridge-UNNN>invoke(-1:0){}#internal + 2412 (MetalContextHandler.kt:12)
27  Shared                          0x0000000104ddd8d4 <inlined-out:<anonymous>> + 948 (ContextHandler.kt:52)
28  Shared                          0x0000000104ddd8d4 <inlined-out:apply> + 948 (Standard.kt:83)
29  Shared                          0x0000000104ddd8d4 kfun:org.jetbrains.skiko.context.ContextHandler#draw(){} + 1132 (ContextHandler.kt:50)
30  Shared                          0x0000000104df9278 <inlined-out:<anonymous>> + 16 (MetalRedrawer.ios.kt:88)
31  Shared                          0x0000000104df9278 <inlined-out:autoreleasepool> + 24 (ObjectiveCUtils.kt:22)
32  Shared                          0x0000000104df9278 kfun:org.jetbrains.skiko.redrawer.MetalRedrawer.draw#internal + 116 (MetalRedrawer.ios.kt:86)
33  Shared                          0x0000000104df9368 kfun:org.jetbrains.skiko.redrawer.MetalRedrawer.$<init>$lambda$0COROUTINE$430.invokeSuspend#internal + 160 (MetalRedrawer.ios.kt:43)
34  Shared                          0x0000000104df94e8 kfun:org.jetbrains.skiko.redrawer.MetalRedrawer.$<init>$lambda$0COROUTINE$430.invoke#internal + 192 (MetalRedrawer.ios.kt:41)
35  Shared                          0x0000000104ddb97c kfun:org.jetbrains.skiko.FrameDispatcher.$<init>$lambda$0COROUTINE$429.invokeSuspend#internal + 740 (FrameDispatcher.kt:33)
36  Shared                          0x0000000104c09744 <inlined-out:<anonymous>> + 44 (ContinuationImpl.kt:30)
37  Shared                          0x0000000104c09744 <inlined-out:with> + 44 (Standard.kt:70)
38  Shared                          0x0000000104c09744 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 204 (ContinuationImpl.kt:26)
39  Shared                          0x0000000104cf3bfc <inlined-out:resume> + 24 (Continuation.kt:45)
40  Shared                          0x0000000104cf3bfc <inlined-out:<anonymous>> + 1252 (DispatchedTask.kt:106)
41  Shared                          0x0000000104cf3bfc <inlined-out:withContinuationContext> + 1252 (CoroutineContext.kt:58)
42  Shared                          0x0000000104cf3bfc kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1444 (DispatchedTask.kt:88)
43  Shared                          0x0000000104dde474 kfun:org.jetbrains.skiko.NsQueueDispatcher.dispatch$lambda$0#internal + 184 (Dispatchers.kt:33)
44  Shared                          0x0000000104dde474 kfun:org.jetbrains.skiko.NsQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1675.invoke#internal + 188 (Dispatchers.kt:32)
45  Shared                          0x0000000104dde474 kfun:org.jetbrains.skiko.NsQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1675.$<bridge-UNN>invoke(){}#internal + 228 (Dispatchers.kt:32)
46  Shared                          0x00000001057c4ad4 ___6f72672e6a6574627261696e732e736b696b6f3a736b696b6f_knbridge468_block_invoke + 440
47  libdispatch.dylib               0x00000001d46b44b4 _dispatch_call_block_and_release + 32 (init.c:1518)
48  libdispatch.dylib               0x00000001d46b5fdc _dispatch_client_callout + 20 (object.m:560)
49  libdispatch.dylib               0x00000001d46c47f4 _dispatch_main_queue_drain + 928 (inline_internal.h:2632)
50  libdispatch.dylib               0x00000001d46c4444 _dispatch_main_queue_callback_4CF + 44 (queue.c:7887)
51  CoreFoundation                  0x00000001cd2caa08 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1797)
52  CoreFoundation                  0x00000001cd2ac368 __CFRunLoopRun + 2036 (CFRunLoop.c:3164)
53  CoreFoundation                  0x00000001cd2b11e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390)
54  GraphicsServices                0x00000002060d1368 GSEventRunModal + 164 (GSEvent.c:2196)
55  UIKitCore                       0x00000001cf760d88 -[UIApplication _run] + 888 (UIApplication.m:3726)
56  UIKitCore                       0x00000001cf7609ec UIApplicationMain + 340 (UIApplication.m:5316)
57  libswiftUIKit.dylib             0x00000001d5c102a0 UIApplicationMain(_:_:_:_:) + 104 (UIKit.swift:538)
58  iosApp                          0x00000001048cd3c0 specialized static UIApplicationDelegate.main() + 80 (<compiler-generated>:13)
59  iosApp                          0x00000001048cd3c0 static AppDelegate.$main() + 88 (AppDelegate.swift:0)
60  iosApp                          0x00000001048cd3c0 main + 104
61  dyld                            0x00000001eb5d5948 start + 2504 (dyldMain.cpp:1168)

Thread 1 name:
Thread 1:
0   libsystem_kernel.dylib          0x000000020991c41c __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000219b6006c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001db5dab68 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::r... + 100 (__threading_support:386)
3   Shared                          0x00000001057c5714 void kotlin::RepeatedTimer<kotlin::steady_clock>::Run<kotlin::gc::internal::GCSchedulerDataWithTimer<kotlin::steady_clock>::GCSchedulerDataWithTimer(kotlin::gc::GCSchedulerConfig&, std::__1::functi... + 248
4   Shared                          0x00000001057c59c0 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(kotlin::ScopedThread::attributes, void... + 112
5   libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
6   libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 2 name:
Thread 2:
0   libsystem_kernel.dylib          0x000000020991c41c __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000219b6006c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001db5daacc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:380)
3   Shared                          0x00000001057c8654 std::__1::invoke_result<kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2>::type kotlin::Scop... + 216
4   Shared                          0x00000001057c9a44 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(kotlin::ScopedThread::attributes, kotl... + 104
5   libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
6   libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 3 name:
Thread 3:
0   libsystem_kernel.dylib          0x000000020991bb48 mach_msg2_trap + 8
1   libsystem_kernel.dylib          0x000000020992e008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x000000020992e248 mach_msg_overwrite + 388 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x000000020991c08c mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                  0x00000001cd2aae00 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2639)
5   CoreFoundation                  0x00000001cd2ac044 __CFRunLoopRun + 1232 (CFRunLoop.c:3022)
6   CoreFoundation                  0x00000001cd2b11e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390)
7   Foundation                      0x00000001c76c1818 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8   Foundation                      0x00000001c76c1700 -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420)
9   UIKitCore                       0x00000001cf89588c -[UIEventFetcher threadMain] + 436 (UIEventFetcher.m:1212)
10  Foundation                      0x00000001c76dace8 __NSThread__start__ + 716 (NSThread.m:968)
11  libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
12  libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 4:
0   libsystem_kernel.dylib          0x000000020991c41c __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000219b6006c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   Shared                          0x00000001057e3ccc Worker::waitForQueueLocked(long long, long long*) + 380
3   Shared                          0x00000001057e303c (anonymous namespace)::workerRoutine(void*) + 316
4   libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
5   libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 5:
0   libsystem_kernel.dylib          0x000000020991c41c __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000219b6006c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   Shared                          0x00000001057e3d14 Worker::waitForQueueLocked(long long, long long*) + 452
3   Shared                          0x00000001057e303c (anonymous namespace)::workerRoutine(void*) + 316
4   libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
5   libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 6 name:
Thread 6:
0   libsystem_kernel.dylib          0x000000020991c41c __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000219b6006c _pthread_cond_wait + 1232 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001db5daacc std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:380)
3   Shared                          0x00000001057c9cec std::__1::invoke_result<kotlin::gc::FinalizerProcessor::StartFinalizerThreadIfNone()::$_0>::type kotlin::ScopedThread::Run<kotlin::gc::FinalizerProcessor::StartFinalizerThreadIfNone()::$_0>(kotlin:... + 224
4   Shared                          0x00000001057c9fa8 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(kotlin::ScopedThread::attributes, kotl... + 104
5   libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
6   libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib          0x000000020991bb48 mach_msg2_trap + 8
1   libsystem_kernel.dylib          0x000000020992e008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x000000020992e248 mach_msg_overwrite + 388 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x000000020991c08c mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                  0x00000001cd2aae00 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2639)
5   CoreFoundation                  0x00000001cd2ac044 __CFRunLoopRun + 1232 (CFRunLoop.c:3022)
6   CoreFoundation                  0x00000001cd2b11e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390)
7   CFNetwork                       0x00000001ce5ffbac +[__CFN_CoreSchedulingSetRunnable _run:] + 392 (CoreSchedulingSet.mm:1372)
8   Foundation                      0x00000001c76dace8 __NSThread__start__ + 716 (NSThread.m:968)
9   libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
10  libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib          0x000000020991bb48 mach_msg2_trap + 8
1   libsystem_kernel.dylib          0x000000020992e008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x000000020992e248 mach_msg_overwrite + 388 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x000000020991c08c mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                  0x00000001cd2aae00 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2639)
5   CoreFoundation                  0x00000001cd2ac044 __CFRunLoopRun + 1232 (CFRunLoop.c:3022)
6   CoreFoundation                  0x00000001cd2b11e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390)
7   Foundation                      0x00000001c76c1818 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8   SocketRocket                    0x0000000104a0dad8 -[_SRRunLoopThread main] + 216 (SRWebSocket.m:1905)
9   Foundation                      0x00000001c76dace8 __NSThread__start__ + 716 (NSThread.m:968)
10  libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
11  libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 9 name:
Thread 9:
0   libsystem_kernel.dylib          0x000000020991c6ac select$DARWIN_EXTSN + 8
1   CoreFoundation                  0x00000001cd2fb9d4 __CFSocketManager + 636 (CFSocket.c:1340)
2   libsystem_pthread.dylib         0x0000000219b596cc _pthread_start + 148 (pthread.c:893)
3   libsystem_pthread.dylib         0x0000000219b58ba4 thread_start + 8

Thread 10 name:
Thread 10 Crashed:
0   libsystem_kernel.dylib          0x0000000209922200 __pthread_kill + 8
1   libsystem_pthread.dylib         0x0000000219b5f1ac pthread_kill + 268 (pthread.c:1670)
2   libsystem_c.dylib               0x00000001d4719ca0 abort + 180 (abort.c:118)
3   Shared                          0x00000001057d8d98 konan::abort() + 12
4   Shared                          0x00000001057df2cc (anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1::operator()() const + 36
5   Shared                          0x00000001057df1fc void (anonymous namespace)::$_0::operator()<(anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1>((anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1) + 60
6   Shared                          0x00000001057df060 (anonymous namespace)::terminateWithUnhandledException(ObjHeader*) + 12
7   Shared                          0x00000001057df040 (anonymous namespace)::processUnhandledException(ObjHeader*) + 1236
8   Shared                          0x0000000104cafc88 kfun:kotlinx.coroutines#handleCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 696 (CoroutineExceptionHandler.kt:0)
9   Shared                          0x0000000104ca82f0 kfun:kotlinx.coroutines.StandaloneCoroutine.handleJobException#internal + 52 (Builders.common.kt:196)
10  Shared                          0x0000000104cb86b8 kfun:kotlinx.coroutines.JobSupport.finalizeFinishingState#internal + 3012 (JobSupport.kt:229)
11  Shared                          0x0000000104cbd83c kfun:kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath#internal + 684 (JobSupport.kt:906)
12  Shared                          0x0000000104cbd83c kfun:kotlinx.coroutines.JobSupport.tryMakeCompleting#internal + 1844 (JobSupport.kt:863)
13  Shared                          0x0000000104cbcfa0 <inlined-out:<anonymous>> + 16 (JobSupport.kt:828)
14  Shared                          0x0000000104cbcfa0 <inlined-out:loopOnState> + 16 (JobSupport.kt:177)
15  Shared                          0x0000000104cbcfa0 kfun:kotlinx.coroutines.JobSupport#makeCompletingOnce(kotlin.Any?){}kotlin.Any? + 224 (JobSupport.kt:827)
16  Shared                          0x0000000104ca7384 kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 148 (AbstractCoroutine.kt:100)
17  Shared                          0x0000000104c09888 <inlined-out:<anonymous>> + 368 (ContinuationImpl.kt:43)
18  Shared                          0x0000000104c09888 <inlined-out:with> + 368 (Standard.kt:70)
19  Shared                          0x0000000104c09888 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 528 (ContinuationImpl.kt:26)
20  Shared                          0x0000000104cf3bfc <inlined-out:resume> + 24 (Continuation.kt:45)
21  Shared                          0x0000000104cf3bfc <inlined-out:<anonymous>> + 1252 (DispatchedTask.kt:106)
22  Shared                          0x0000000104cf3bfc <inlined-out:withContinuationContext> + 1252 (CoroutineContext.kt:58)
23  Shared                          0x0000000104cf3bfc kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1444 (DispatchedTask.kt:88)
24  Shared                          0x0000000104d06cc8 kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.dispatch$lambda$0#internal + 184 (Dispatchers.kt:26)
25  Shared                          0x0000000104d06cc8 kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1852.invoke#internal + 188 (Dispatchers.kt:25)
26  Shared                          0x0000000104d06cc8 kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$1852.$<bridge-UNN>invoke(){}#internal + 228 (Dispatchers.kt:25)
27  Shared                          0x00000001057c5164 ___6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f7265_knbridge830_block_invoke + 440
28  libdispatch.dylib               0x00000001d46b44b4 _dispatch_call_block_and_release + 32 (init.c:1518)
29  libdispatch.dylib               0x00000001d46b5fdc _dispatch_client_callout + 20 (object.m:560)
30  libdispatch.dylib               0x00000001d46b90c8 _dispatch_queue_override_invoke + 788 (inline_internal.h:2632)
31  libdispatch.dylib               0x00000001d46c7a6c _dispatch_root_queue_drain + 396 (inline_internal.h:0)
32  libdispatch.dylib               0x00000001d46c8284 _dispatch_worker_thread2 + 164 (queue.c:7052)
33  libsystem_pthread.dylib         0x0000000219b58dbc _pthread_wqthread + 228 (pthread.c:2631)
34  libsystem_pthread.dylib         0x0000000219b58b98 start_wqthread + 8

Thread 11:
0   libsystem_pthread.dylib         0x0000000219b58b90 start_wqthread + 0

Thread 12:
0   libsystem_pthread.dylib         0x0000000219b58b90 start_wqthread + 0

Thread 13:
0   libsystem_pthread.dylib         0x0000000219b58b90 start_wqthread + 0

Thread 14:
0   libsystem_pthread.dylib         0x0000000219b58b90 start_wqthread + 0

Thread 10 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00000001d4773b9f   x5: 0x000000016b6d6550   x6: 0x0000000000000020   x7: 0x0000000000000850
    x8: 0x566a2357913c6557   x9: 0x566a2356fa511557  x10: 0x0000000000000200  x11: 0x000000016b6d60c0
   x12: 0x0000000000000009  x13: 0x0000000186dbcfd4  x14: 0x0000000186dbcfd4  x15: 0x0000000000038800
   x16: 0x0000000000000148  x17: 0x000000016b6d7000  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000009427  x21: 0x000000016b6d70e0  x22: 0x0000000000000001  x23: 0x000000016b6d66c0
   x24: 0x00000001ede4b9e0  x25: 0x000000016b6d6690  x26: 0x000000010844dbf8  x27: 0x0000000106754990
   x28: 0x0000000112a06110   fp: 0x000000016b6d65a0   lr: 0x0000000219b5f1ac
    sp: 0x000000016b6d6580   pc: 0x0000000209922200 cpsr: 0x40000000
   esr: 0x56000080  Address size fault
pjBooms commented 1 year ago

It is the same crash as we observed here -- https://github.com/JetBrains/compose-jb/issues/2547 and are already fixing it. Thank you for your report!

nekzabirov commented 1 year ago

@pjBooms Do u know any solution that I can apply?

pjBooms commented 1 year ago

@nekzabirov we have fixed the issue in master, you may wait for a dev build or build compose yourself. We may port the fix to 1.3.1 if you need it in a stable version

okushnikov commented 4 weeks ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.