superlistapp / super_native_extensions

Native drag & drop, clipboard access and context menu.
MIT License
461 stars 84 forks source link

[super_drag_and_drop] on macOS crashes unexpectedly on app close #407

Closed felixdollack closed 3 months ago

felixdollack commented 3 months ago

Running a minimal sample on macOS (Sonoma 14.5, Flutter 3.22.2, super_drag_and_drop 0.8.18) and immediately closing it leads to the following error:

thread '<unnamed>' panicked at /Users/runner/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:26:
cannot access a Thread Local Storage value during or after destruction: AccessError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Running with export RUST_BACKTRACE=full does not add any useful information

thread '<unnamed>' panicked at /Users/runner/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:26:
cannot access a Thread Local Storage value during or after destruction: AccessError
stack backtrace:

Expected: Closing the application does not throw an unexpected error.

Device crash log:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               dnd_bug [45974]
Path:                  /Users/USER/Documents/*/dnd_bug.app/Contents/MacOS/dnd_bug
Identifier:            com.example.dndBug
Version:               1.0.0 (1)
Code Type:             ARM-64 (Native)
Parent Process:        dart [45543]
Responsible:           Terminal [4932]
User ID:               501

Date/Time:             2024-08-06 00:02:39.0836 +0900
OS Version:            macOS 14.5 (23F79)
Report Version:        12
Anonymous UUID:        51285A8E-ACDA-925C-5F75-08D47E3E507C

Sleep/Wake UUID:       B0EC44EA-9847-4889-B420-7CDB5A1DC3A4

Time Awake Since Boot: 630000 seconds
Time Since Wake:       9 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   dnd_bug [45974]

Application Specific Information:
abort() called

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                 0x1836aea60 __pthread_kill + 8
1   libsystem_pthread.dylib                0x1836e6c20 pthread_kill + 288
2   libsystem_c.dylib                      0x1835f3a30 abort + 180
3   super_native_extensions                0x10141257c panic_abort::__rust_start_panic::abort::h12ab019378bdfacb + 12
4   super_native_extensions                0x101412570 __rust_start_panic + 12
5   super_native_extensions                0x1014305f4 rust_panic + 12
6   super_native_extensions                0x1014305c8 std::panicking::rust_panic_with_hook::h9a203750b31cd1a0 + 1020
7   super_native_extensions                0x10142ecec std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::hdaaf0fe153f83741 + 72
8   super_native_extensions                0x10142eca4 std::sys::backtrace::__rust_end_short_backtrace::h9707fd9889c9a825 + 12
9   super_native_extensions                0x10142ffbc rust_begin_unwind + 44
10  super_native_extensions                0x1014019bc core::panicking::panic_fmt::h917f46a42f1cc9f0 + 48
11  super_native_extensions                0x101402b24 core::result::unwrap_failed::h8c331a959606d5c2 + 92
12  super_native_extensions                0x10144ea68 core::result::Result$LT$T$C$E$GT$::expect::he26bf71b688a034f + 48
13  super_native_extensions                0x101432ed4 _$LT$alloc..rc..Rc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hf444304eaad0614f + 124
14  super_native_extensions                0x101430df4 _$LT$hashbrown..raw..RawTable$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hf1edea255a89cb31 + 48
15  super_native_extensions                0x1014326bc _$LT$alloc..rc..Rc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::h739353cee7c25a92 + 48
16  super_native_extensions                0x10143dfac core::ptr::drop_in_place$LT$irondash_message_channel..async_method_handler..RegisteredAsyncMethodHandler$LT$super_native_extensions..drop_manager..DropManager$GT$$GT$::hb21433ad3561f6ea + 32
17  super_native_extensions                0x10143d3f8 core::ptr::drop_in_place$LT$core..option..Option$LT$$LP$alloc..boxed..Box$LT$dyn$u20$core..any..Any$GT$$C$usize$RP$$GT$$GT$::hd32d06f171d7d083 + 28
18  super_native_extensions                0x10143d730 _$LT$super_native_extensions..context..Context$u20$as$u20$core..ops..drop..Drop$GT$::drop::h30cbb932902854aa + 392
19  super_native_extensions                0x1014373b0 core::ptr::drop_in_place$LT$super_native_extensions..context..Context$GT$::hc345758ce68a3138 + 12
20  super_native_extensions                0x101422b48 std::sys::thread_local::guard::apple::enable::run_dtors::h2e75a0c9be01e3e6 + 124
21  dyld                                   0x18336d2ac invocation function for block in dyld4::RuntimeState::_finalizeListTLV(void*) + 56
22  dyld                                   0x18336d214 dyld4::RuntimeState::_finalizeListTLV(void*) + 116
23  libsystem_c.dylib                      0x1835a4068 exit + 36
24  AppKit                                 0x187231a8c -[NSApplication terminate:] + 2048
25  FlutterMacOS                           0x1046df9cc __61-[FlutterEngineTerminationHandler initWithEngine:terminator:]_block_invoke + 96
26  FlutterMacOS                           0x1046dfff0 __81-[FlutterEngineTerminationHandler requestApplicationTermination:exitType:result:]_block_invoke + 452
27  FlutterMacOS                           0x1046e8ccc -[FlutterEngine sendOnChannel:message:binaryReply:]::$_11::__invoke(unsigned char const*, unsigned long, void*) + 108
28  FlutterMacOS                           0x104f6d858 std::_fl::__function::__func<fml::internal::CopyableLambda<flutter::EmbedderPlatformMessageResponse::Complete(std::_fl::unique_ptr<fml::Mapping, std::_fl::default_delete<fml::Mapping>>)::$_0>, std::_fl::allocator<fml::internal::CopyableLambda<flutter::EmbedderPlatformMessageResponse::Complete(std::_fl::unique_ptr<fml::Mapping, std::_fl::default_delete<fml::Mapping>>)::$_0>>, void ()>::operator()() + 104
29  FlutterMacOS                           0x104f71a70 flutter::EmbedderTaskRunner::PostTask(unsigned long long) + 652
30  FlutterMacOS                           0x104f5b230 FlutterEngineRunTask + 36
31  FlutterMacOS                           0x1046e8128 -[FlutterEngine runTaskOnEmbedder:] + 56
32  FlutterMacOS                           0x1046e82dc __60-[FlutterEngine postMainThreadTask:targetTimeInNanoseconds:]_block_invoke + 64
33  libdispatch.dylib                      0x183534750 _dispatch_call_block_and_release + 32
34  libdispatch.dylib                      0x1835363e8 _dispatch_client_callout + 20
35  libdispatch.dylib                      0x183544bb8 _dispatch_main_queue_drain + 988
36  libdispatch.dylib                      0x1835447cc _dispatch_main_queue_callback_4CF + 44
37  CoreFoundation                         0x183807ad4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
38  CoreFoundation                         0x1837c5258 __CFRunLoopRun + 1996
39  CoreFoundation                         0x1837c4434 CFRunLoopRunSpecific + 608
40  HIToolbox                              0x18df6819c RunCurrentEventLoopInMode + 292
41  HIToolbox                              0x18df67fd8 ReceiveNextEventCommon + 648
42  HIToolbox                              0x18df67d30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
43  AppKit                                 0x187023d68 _DPSNextEvent + 660
44  AppKit                                 0x187819808 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
45  AppKit                                 0x18701709c -[NSApplication run] + 476
46  AppKit                                 0x186fee2e0 NSApplicationMain + 880
47  dnd_bug                                0x100e406dc main + 12 (AppDelegate.swift:5)
48  dyld                                   0x18335e0e0 start + 2360

Thread 1:
0   libsystem_pthread.dylib                0x1836e1d20 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib                0x1836e1d20 start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib                0x1836e1d20 start_wqthread + 0

Thread 4:: com.apple.NSEventThread
0   libsystem_kernel.dylib                 0x1836a61f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1836b8b24 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1836aee34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib                 0x1836a6578 mach_msg + 24
4   CoreFoundation                         0x1837c6680 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x1837c4f44 __CFRunLoopRun + 1208
6   CoreFoundation                         0x1837c4434 CFRunLoopRunSpecific + 608
7   AppKit                                 0x18714e188 _NSEventThread + 144
8   libsystem_pthread.dylib                0x1836e6f94 _pthread_start + 136
9   libsystem_pthread.dylib                0x1836e1d34 thread_start + 8

Thread 5:
0   libsystem_pthread.dylib                0x1836e1d20 start_wqthread + 0

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00000001013fdd0c   x5: 0x0000000000000002   x6: 0x0000000101402f78   x7: 0x0000000000000403
    x8: 0x7c6ba28def7b8ea1   x9: 0x7c6ba28c042982a1  x10: 0x000000010142feac  x11: 0x0000000000000008
   x12: 0x000000016efc0e29  x13: 0x0000000000000001  x14: 0x00000000000007fb  x15: 0x0000000099a65002
   x16: 0x0000000000000148  x17: 0x00000001f58d5928  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x00000001eb520c00  x21: 0x0000000000000103  x22: 0x00000001eb520ce0  x23: 0x0000000000000000
   x24: 0x0000000101481d18  x25: 0x00000001836ef040  x26: 0x000000010147e3b0  x27: 0x00000001836ef040
   x28: 0x0000000000000028   fp: 0x000000016efc1070   lr: 0x00000001836e6c20
    sp: 0x000000016efc1050   pc: 0x00000001836aea60 cpsr: 0x40001000
   far: 0x0000000000000000  esr: 0x56000080  Address size fault

Binary Images:
       0x1010b0000 -        0x1010b3fff io.flutter.flutter.app (1.0) <4bc59f1f-8afd-3213-b536-7df60f76a9f7> /Users/USER/Documents/*/dnd_bug.app/Contents/Frameworks/App.framework/Versions/A/App
       0x101090000 -        0x10109bfff libobjc-trampolines.dylib (*) <9381bd6d-84a5-3c72-b3b8-88428afa4782> /usr/lib/libobjc-trampolines.dylib
       0x1012cc000 -        0x1012d7fff org.cocoapods.device-info-plus (0.0.1) <45d83b70-8b96-39cb-8539-a4b5f9cfc7b8> /Users/USER/Documents/*/dnd_bug.app/Contents/Frameworks/device_info_plus.framework/Versions/A/device_info_plus
       0x1012f0000 -        0x1012f3fff org.cocoapods.irondash-engine-context (0.0.1) <c05d212d-a2b0-31ac-9577-28834f20a0aa> /Users/USER/Documents/*/dnd_bug.app/Contents/Frameworks/irondash_engine_context.framework/Versions/A/irondash_engine_context
       0x1013f8000 -        0x101477fff org.cocoapods.super-native-extensions (0.0.1) <695b68e3-0a39-376d-8939-6c3b1f922c0b> /Users/USER/Documents/*/dnd_bug.app/Contents/Frameworks/super_native_extensions.framework/Versions/A/super_native_extensions
       0x1046d0000 -        0x106c0bfff io.flutter.flutter-macos (1.0) <4c4c4458-5555-3144-a147-65d3d7fc9de6> /Users/USER/Documents/*/dnd_bug.app/Contents/Frameworks/FlutterMacOS.framework/Versions/A/FlutterMacOS
       0x100e3c000 -        0x100e43fff com.example.dndBug (1.0.0) <008bfccf-0cb0-3752-81e1-29a2c42ddecf> /Users/USER/Documents/*/dnd_bug.app/Contents/MacOS/dnd_bug
       0x1836a5000 -        0x1836dfffb libsystem_kernel.dylib (*) <9b8b53f9-e2b6-36df-98e9-28d8fca732f2> /usr/lib/system/libsystem_kernel.dylib
       0x1836e0000 -        0x1836ecfff libsystem_pthread.dylib (*) <386b0fc1-7873-3328-8e71-43269fd1b2c7> /usr/lib/system/libsystem_pthread.dylib
       0x18357d000 -        0x1835fbff7 libsystem_c.dylib (*) <05b44e93-dffc-3bd8-90ab-fd97cb73f171> /usr/lib/system/libsystem_c.dylib
       0x183358000 -        0x1833e0a17 dyld (*) <37bbc384-0755-31c7-a808-0ed49e44dd8e> /usr/lib/dyld
       0x186fea000 -        0x188326fff com.apple.AppKit (6.9) <61f710be-9132-3cc2-883d-066365fba1ad> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x183532000 -        0x183579fff libdispatch.dylib (*) <502762ee-7aa7-306c-9dbd-88981a86bb78> /usr/lib/system/libdispatch.dylib
       0x183748000 -        0x183c20fff com.apple.CoreFoundation (6.9) <84b539d5-22c9-3f8c-84c8-903e9c7b8d29> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x18df35000 -        0x18e1f8fff com.apple.HIToolbox (2.1.1) <7db6c397-563f-3756-908c-e25b019a1848> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x1836ed000 -        0x183712ff7 libdyld.dylib (*) <e49303e9-66a8-39d6-a917-e9ea8c42c63f> /usr/lib/system/libdyld.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=1.9G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.9G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               128K        1 
Activity Tracing                   256K        1 
CG image                           208K        6 
ColorSync                          544K       26 
CoreAnimation                      512K       32 
CoreGraphics                        32K        2 
CoreUI image data                 1504K       11 
Foundation                          16K        1 
Kernel Alloc Once                   32K        1 
MALLOC                             1.9G       57 
MALLOC guard page                  192K       12 
STACK GUARD                       56.1M        6 
Stack                             10.6M        6 
VM_ALLOCATE                       19.4M       10 
__AUTH                            1429K      259 
__AUTH_CONST                      23.5M      441 
__CTF                               824        1 
__DATA                             9.9M      432 
__DATA_CONST                      22.7M      450 
__DATA_DIRTY                      1297K      139 
__FONT_DATA                          4K        1 
__LINKEDIT                       545.2M        8 
__OBJC_RO                         71.9M        2 
__OBJC_RW                         2199K        1 
__TEXT                           580.7M      468 
dyld private memory                272K        2 
mapped file                      177.8M       27 
shared memory                      864K       14 
===========                     =======  ======= 
TOTAL                              3.3G     2417 

-----------
Full Report
-----------

{"app_name":"dnd_bug","timestamp":"2024-08-06 00:02:40.00 +0900","app_version":"1.0.0","slice_uuid":"008bfccf-0cb0-3752-81e1-29a2c42ddecf","build_version":"1","platform":1,"bundleID":"com.example.dndBug","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.5 (23F79)","roots_installed":0,"name":"dnd_bug","incident_id":"3BDBA977-9083-43BE-BEB6-7FF2925E6900"}
{
  "uptime" : 630000,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "Mac14,9",
  "coalitionID" : 1575,
  "osVersion" : {
    "train" : "macOS 14.5",
    "build" : "23F79",
    "releaseType" : "User"
  },
  "captureTime" : "2024-08-06 00:02:39.0836 +0900",
  "codeSigningMonitor" : 1,
  "incident" : "3BDBA977-9083-43BE-BEB6-7FF2925E6900",
  "pid" : 45974,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2024-08-05 23:46:50.6497 +0900",
  "procStartAbsTime" : 15173453782480,
  "procExitAbsTime" : 15178348435098,
  "procName" : "dnd_bug",
  "procPath" : "\/Users\/USER\/Documents\/*\/dnd_bug.app\/Contents\/MacOS\/dnd_bug",
  "bundleInfo" : {"CFBundleShortVersionString":"1.0.0","CFBundleVersion":"1","CFBundleIdentifier":"com.example.dndBug"},
  "storeInfo" : {"deviceIdentifierForVendor":"1BF40AA0-148C-511B-AB5C-EADC3FFB89D0","thirdParty":true},
  "parentProc" : "dart",
  "parentPid" : 45543,
  "coalitionName" : "com.apple.Terminal",
  "crashReporterKey" : "51285A8E-ACDA-925C-5F75-08D47E3E507C",
  "responsiblePid" : 4932,
  "responsibleProc" : "Terminal",
  "codeSigningID" : "com.example.dndBug",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570425861,
  "codeSigningValidationCategory" : 10,
  "codeSigningTrustLevel" : 4294967295,
  "instructionByteStream" : {"beforePC":"fyMD1f17v6n9AwCRW+D\/l78DAJH9e8Go\/w9f1sADX9YQKYDSARAA1A==","atPC":"AwEAVH8jA9X9e7+p\/QMAkVDg\/5e\/AwCR\/XvBqP8PX9bAA1\/WcAqA0g=="},
  "wakeTime" : 9,
  "sleepWakeUUID" : "B0EC44EA-9847-4889-B420-7CDB5A1DC3A4",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
  "termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"dnd_bug","byPid":45974},
  "asi" : {"libsystem_c.dylib":["abort() called"]},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":14210311,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":4315929868,"symbolLocation":264,"symbol":"core::fmt::write::h954b9bc3133b7744"},{"value":2},{"value":4315950968,"symbolLocation":232,"symbol":"core::fmt::num::imp::fmt_u64::h3f6bf385cd230518"},{"value":1027},{"value":8965438213703044769},{"value":8965438205460054689},{"value":4316135084,"symbolLocation":172,"symbol":"std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h6eb20bd29048832b"},{"value":8},{"value":6156979753},{"value":1},{"value":2043},{"value":2577813506},{"value":328},{"value":8414648616},{"value":0},{"value":6},{"value":8242990080,"symbolLocation":0,"symbol":"_main_thread"},{"value":259},{"value":8242990304,"symbolLocation":224,"symbol":"_main_thread"},{"value":0},{"value":4316470552,"symbolLocation":0,"symbol":"_MergedGlobals.6712"},{"value":6500053056,"symbolLocation":0,"symbol":"tlv_get_addr"},{"value":4316455856,"symbolLocation":15672,"symbol":"log::LOG_LEVEL_NAMES::h0f5808b16a6391c0"},{"value":6500053056,"symbolLocation":0,"symbol":"tlv_get_addr"},{"value":40}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6500019232},"cpsr":{"value":1073745920},"fp":{"value":6156980336},"sp":{"value":6156980304},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6499789408,"matchesCrashFrame":1},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":39520,"symbol":"__pthread_kill","symbolLocation":8,"imageIndex":7},{"imageOffset":27680,"symbol":"pthread_kill","symbolLocation":288,"imageIndex":8},{"imageOffset":485936,"symbol":"abort","symbolLocation":180,"imageIndex":9},{"imageOffset":107900,"symbol":"panic_abort::__rust_start_panic::abort::h12ab019378bdfacb","symbolLocation":12,"imageIndex":4},{"imageOffset":107888,"symbol":"__rust_start_panic","symbolLocation":12,"imageIndex":4},{"imageOffset":230900,"symbol":"rust_panic","symbolLocation":12,"imageIndex":4},{"imageOffset":230856,"symbol":"std::panicking::rust_panic_with_hook::h9a203750b31cd1a0","symbolLocation":1020,"imageIndex":4},{"imageOffset":224492,"symbol":"std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::hdaaf0fe153f83741","symbolLocation":72,"imageIndex":4},{"imageOffset":224420,"symbol":"std::sys::backtrace::__rust_end_short_backtrace::h9707fd9889c9a825","symbolLocation":12,"imageIndex":4},{"imageOffset":229308,"symbol":"rust_begin_unwind","symbolLocation":44,"imageIndex":4},{"imageOffset":39356,"symbol":"core::panicking::panic_fmt::h917f46a42f1cc9f0","symbolLocation":48,"imageIndex":4},{"imageOffset":43812,"symbol":"core::result::unwrap_failed::h8c331a959606d5c2","symbolLocation":92,"imageIndex":4},{"imageOffset":354920,"symbol":"core::result::Result$LT$T$C$E$GT$::expect::he26bf71b688a034f","symbolLocation":48,"imageIndex":4},{"imageOffset":241364,"symbol":"_$LT$alloc..rc..Rc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hf444304eaad0614f","symbolLocation":124,"imageIndex":4},{"imageOffset":232948,"symbol":"_$LT$hashbrown..raw..RawTable$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hf1edea255a89cb31","symbolLocation":48,"imageIndex":4},{"imageOffset":239292,"symbol":"_$LT$alloc..rc..Rc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::h739353cee7c25a92","symbolLocation":48,"imageIndex":4},{"imageOffset":286636,"symbol":"core::ptr::drop_in_place$LT$irondash_message_channel..async_method_handler..RegisteredAsyncMethodHandler$LT$super_native_extensions..drop_manager..DropManager$GT$$GT$::hb21433ad3561f6ea","symbolLocation":32,"imageIndex":4},{"imageOffset":283640,"symbol":"core::ptr::drop_in_place$LT$core..option..Option$LT$$LP$alloc..boxed..Box$LT$dyn$u20$core..any..Any$GT$$C$usize$RP$$GT$$GT$::hd32d06f171d7d083","symbolLocation":28,"imageIndex":4},{"imageOffset":284464,"symbol":"_$LT$super_native_extensions..context..Context$u20$as$u20$core..ops..drop..Drop$GT$::drop::h30cbb932902854aa","symbolLocation":392,"imageIndex":4},{"imageOffset":258992,"symbol":"core::ptr::drop_in_place$LT$super_native_extensions..context..Context$GT$::hc345758ce68a3138","symbolLocation":12,"imageIndex":4},{"imageOffset":174920,"symbol":"std::sys::thread_local::guard::apple::enable::run_dtors::h2e75a0c9be01e3e6","symbolLocation":124,"imageIndex":4},{"imageOffset":86700,"symbol":"invocation function for block in dyld4::RuntimeState::_finalizeListTLV(void*)","symbolLocation":56,"imageIndex":10},{"imageOffset":86548,"symbol":"dyld4::RuntimeState::_finalizeListTLV(void*)","symbolLocation":116,"imageIndex":10},{"imageOffset":159848,"symbol":"exit","symbolLocation":36,"imageIndex":9},{"imageOffset":2390668,"symbol":"-[NSApplication terminate:]","symbolLocation":2048,"imageIndex":11},{"imageOffset":63948,"symbol":"__61-[FlutterEngineTerminationHandler initWithEngine:terminator:]_block_invoke","symbolLocation":96,"imageIndex":5},{"imageOffset":65520,"symbol":"__81-[FlutterEngineTerminationHandler requestApplicationTermination:exitType:result:]_block_invoke","symbolLocation":452,"imageIndex":5},{"imageOffset":101580,"symbol":"-[FlutterEngine sendOnChannel:message:binaryReply:]::$_11::__invoke(unsigned char const*, unsigned long, void*)","symbolLocation":108,"imageIndex":5},{"imageOffset":9033816,"symbol":"std::_fl::__function::__func<fml::internal::CopyableLambda<flutter::EmbedderPlatformMessageResponse::Complete(std::_fl::unique_ptr<fml::Mapping, std::_fl::default_delete<fml::Mapping>>)::$_0>, std::_fl::allocator<fml::internal::CopyableLambda<flutter::EmbedderPlatformMessageResponse::Complete(std::_fl::unique_ptr<fml::Mapping, std::_fl::default_delete<fml::Mapping>>)::$_0>>, void ()>::operator()()","symbolLocation":104,"imageIndex":5},{"imageOffset":9050736,"symbol":"flutter::EmbedderTaskRunner::PostTask(unsigned long long)","symbolLocation":652,"imageIndex":5},{"imageOffset":8958512,"symbol":"FlutterEngineRunTask","symbolLocation":36,"imageIndex":5},{"imageOffset":98600,"symbol":"-[FlutterEngine runTaskOnEmbedder:]","symbolLocation":56,"imageIndex":5},{"imageOffset":99036,"symbol":"__60-[FlutterEngine postMainThreadTask:targetTimeInNanoseconds:]_block_invoke","symbolLocation":64,"imageIndex":5},{"imageOffset":10064,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":12},{"imageOffset":17384,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":12},{"imageOffset":76728,"symbol":"_dispatch_main_queue_drain","symbolLocation":988,"imageIndex":12},{"imageOffset":75724,"symbol":"_dispatch_main_queue_callback_4CF","symbolLocation":44,"imageIndex":12},{"imageOffset":785108,"symbol":"__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__","symbolLocation":16,"imageIndex":13},{"imageOffset":512600,"symbol":"__CFRunLoopRun","symbolLocation":1996,"imageIndex":13},{"imageOffset":508980,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":13},{"imageOffset":209308,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":14},{"imageOffset":208856,"symbol":"ReceiveNextEventCommon","symbolLocation":648,"imageIndex":14},{"imageOffset":208176,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":76,"imageIndex":14},{"imageOffset":236904,"symbol":"_DPSNextEvent","symbolLocation":660,"imageIndex":11},{"imageOffset":8583176,"symbol":"-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":700,"imageIndex":11},{"imageOffset":184476,"symbol":"-[NSApplication run]","symbolLocation":476,"imageIndex":11},{"imageOffset":17120,"symbol":"NSApplicationMain","symbolLocation":880,"imageIndex":11},{"imageOffset":18140,"sourceLine":5,"sourceFile":"AppDelegate.swift","symbol":"main","imageIndex":6,"symbolLocation":12},{"imageOffset":24800,"symbol":"start","symbolLocation":2360,"imageIndex":10}]},{"id":14215611,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}],"threadState":{"x":[{"value":6157545472},{"value":5123},{"value":6157008896},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6157545472},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6499999008},"far":{"value":0}}},{"id":14215612,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}],"threadState":{"x":[{"value":6158118912},{"value":8195},{"value":6157582336},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6158118912},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6499999008},"far":{"value":0}}},{"id":14215617,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}],"threadState":{"x":[{"value":6158692352},{"value":19715},{"value":6158155776},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6158692352},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6499999008},"far":{"value":0}}},{"id":14215654,"name":"com.apple.NSEventThread","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":213318140690432},{"value":0},{"value":213318140690432},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":49667},{"value":0},{"value":1},{"value":49667},{"value":131862},{"value":0},{"value":0},{"value":18446744073709551569},{"value":8414632704},{"value":0},{"value":4294967295},{"value":2},{"value":213318140690432},{"value":0},{"value":213318140690432},{"value":6159261800},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6499830564},"cpsr":{"value":4096},"fp":{"value":6159261648},"sp":{"value":6159261568},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6499754484},"far":{"value":0}},"frames":[{"imageOffset":4596,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":7},{"imageOffset":80676,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":7},{"imageOffset":40500,"symbol":"mach_msg_overwrite","symbolLocation":476,"imageIndex":7},{"imageOffset":5496,"symbol":"mach_msg","symbolLocation":24,"imageIndex":7},{"imageOffset":517760,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":13},{"imageOffset":511812,"symbol":"__CFRunLoopRun","symbolLocation":1208,"imageIndex":13},{"imageOffset":508980,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":13},{"imageOffset":1458568,"symbol":"_NSEventThread","symbolLocation":144,"imageIndex":11},{"imageOffset":28564,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":8},{"imageOffset":7476,"symbol":"thread_start","symbolLocation":8,"imageIndex":8}]},{"id":14215655,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}],"threadState":{"x":[{"value":6179696640},{"value":0},{"value":6179160064},{"value":0},{"value":278532},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6179696640},"esr":{"value":0,"description":" Address size fault"},"pc":{"value":6499999008},"far":{"value":0}}}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4312465408,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "io.flutter.flutter.app",
    "size" : 16384,
    "uuid" : "4bc59f1f-8afd-3213-b536-7df60f76a9f7",
    "path" : "\/Users\/USER\/Documents\/*\/dnd_bug.app\/Contents\/Frameworks\/App.framework\/Versions\/A\/App",
    "name" : "App",
    "CFBundleVersion" : "1.0"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4312334336,
    "size" : 49152,
    "uuid" : "9381bd6d-84a5-3c72-b3b8-88428afa4782",
    "path" : "\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4314677248,
    "CFBundleShortVersionString" : "0.0.1",
    "CFBundleIdentifier" : "org.cocoapods.device-info-plus",
    "size" : 49152,
    "uuid" : "45d83b70-8b96-39cb-8539-a4b5f9cfc7b8",
    "path" : "\/Users\/USER\/Documents\/*\/dnd_bug.app\/Contents\/Frameworks\/device_info_plus.framework\/Versions\/A\/device_info_plus",
    "name" : "device_info_plus",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4314824704,
    "CFBundleShortVersionString" : "0.0.1",
    "CFBundleIdentifier" : "org.cocoapods.irondash-engine-context",
    "size" : 16384,
    "uuid" : "c05d212d-a2b0-31ac-9577-28834f20a0aa",
    "path" : "\/Users\/USER\/Documents\/*\/dnd_bug.app\/Contents\/Frameworks\/irondash_engine_context.framework\/Versions\/A\/irondash_engine_context",
    "name" : "irondash_engine_context",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4315906048,
    "CFBundleShortVersionString" : "0.0.1",
    "CFBundleIdentifier" : "org.cocoapods.super-native-extensions",
    "size" : 524288,
    "uuid" : "695b68e3-0a39-376d-8939-6c3b1f922c0b",
    "path" : "\/Users\/USER\/Documents\/*\/dnd_bug.app\/Contents\/Frameworks\/super_native_extensions.framework\/Versions\/A\/super_native_extensions",
    "name" : "super_native_extensions",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4369219584,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "io.flutter.flutter-macos",
    "size" : 39043072,
    "uuid" : "4c4c4458-5555-3144-a147-65d3d7fc9de6",
    "path" : "\/Users\/USER\/Documents\/*\/dnd_bug.app\/Contents\/Frameworks\/FlutterMacOS.framework\/Versions\/A\/FlutterMacOS",
    "name" : "FlutterMacOS",
    "CFBundleVersion" : "1.0"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4309893120,
    "CFBundleShortVersionString" : "1.0.0",
    "CFBundleIdentifier" : "com.example.dndBug",
    "size" : 32768,
    "uuid" : "008bfccf-0cb0-3752-81e1-29a2c42ddecf",
    "path" : "\/Users\/USER\/Documents\/*\/dnd_bug.app\/Contents\/MacOS\/dnd_bug",
    "name" : "dnd_bug",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6499749888,
    "size" : 241660,
    "uuid" : "9b8b53f9-e2b6-36df-98e9-28d8fca732f2",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6499991552,
    "size" : 53248,
    "uuid" : "386b0fc1-7873-3328-8e71-43269fd1b2c7",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6498537472,
    "size" : 520184,
    "uuid" : "05b44e93-dffc-3bd8-90ab-fd97cb73f171",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6496288768,
    "size" : 559640,
    "uuid" : "37bbc384-0755-31c7-a808-0ed49e44dd8e",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6559801344,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 20172800,
    "uuid" : "61f710be-9132-3cc2-883d-066365fba1ad",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2487.60.105"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6498230272,
    "size" : 294912,
    "uuid" : "502762ee-7aa7-306c-9dbd-88981a86bb78",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6500417536,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5083136,
    "uuid" : "84b539d5-22c9-3f8c-84c8-903e9c7b8d29",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "2503.1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6676500480,
    "CFBundleShortVersionString" : "2.1.1",
    "CFBundleIdentifier" : "com.apple.HIToolbox",
    "size" : 2899968,
    "uuid" : "7db6c397-563f-3756-908c-e25b019a1848",
    "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox",
    "name" : "HIToolbox"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6500044800,
    "size" : 155640,
    "uuid" : "e49303e9-66a8-39d6-a917-e9ea8c42c63f",
    "path" : "\/usr\/lib\/system\/libdyld.dylib",
    "name" : "libdyld.dylib"
  }
],
  "sharedCache" : {
  "base" : 6495535104,
  "size" : 4220698624,
  "uuid" : "3406ad1b-2469-30eb-9863-5dce861e6dea"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=1.9G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.9G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               128K        1 \nActivity Tracing                   256K        1 \nCG image                           208K        6 \nColorSync                          544K       26 \nCoreAnimation                      512K       32 \nCoreGraphics                        32K        2 \nCoreUI image data                 1504K       11 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                             1.9G       57 \nMALLOC guard page                  192K       12 \nSTACK GUARD                       56.1M        6 \nStack                             10.6M        6 \nVM_ALLOCATE                       19.4M       10 \n__AUTH                            1429K      259 \n__AUTH_CONST                      23.5M      441 \n__CTF                               824        1 \n__DATA                             9.9M      432 \n__DATA_CONST                      22.7M      450 \n__DATA_DIRTY                      1297K      139 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       545.2M        8 \n__OBJC_RO                         71.9M        2 \n__OBJC_RW                         2199K        1 \n__TEXT                           580.7M      468 \ndyld private memory                272K        2 \nmapped file                      177.8M       27 \nshared memory                      864K       14 \n===========                     =======  ======= \nTOTAL                              3.3G     2417 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "4aed78c233ca1786aa84b2c5af78312e4a77efed",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "654439cdafbf5b61207873a9",
      "factorPackIds" : {

      },
      "deploymentId" : 240000004
    },
    {
      "rolloutId" : "632c763c58740028737bfdd2",
      "factorPackIds" : {
        "SIRI_DIALOG_ASSETS" : "64a57d23fa6fd41b2353e2ae"
      },
      "deploymentId" : 240000034
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "c47ab4cc-c9c3-4b5d-a87c-e2433ce02597",
      "experimentId" : "6639bc6ba73d460582162323",
      "deploymentId" : 400000006
    },
    {
      "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8",
      "experimentId" : "6643969b3099cf28e049862f",
      "deploymentId" : 400000007
    }
  ]
}
}

Model: Mac14,9, BootROM 10151.121.1, proc 10:6:4 processors, 16 GB, SMC 
Graphics: Apple M2 Pro, Apple M2 Pro, Built-In
Display: Color LCD, 3024 x 1964 Retina, Main, MirrorOff, Online
Memory Module: LPDDR5, Hynix
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4388), wl0: Apr  4 2024 20:57:11 version 23.30.58.0.41.51.138 FWID 01-baea9d27
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.

Edit 1: Add RUST_BACKTRACE=full output

felixdollack commented 3 months ago

The code at rust/library/std/src/thread/local.rs:260:26 mentions that the function will panic if the destructor is running. @knopp, is there a way to avoid this or catch/ignore the error when I am closing the flutter app?

    /// Acquires a reference to the value in this TLS key.
    ///  
    /// This will lazily initialize the value if this thread has not referenced
    /// this key yet.
    ///
    /// # Panics
    ///
    /// This function will `panic!()` if the key currently has its
    /// destructor running, and it **may** panic if the destructor has
    /// previously been run for this thread.
    #[stable(feature = "rust1", since = "1.0.0")]
    pub fn with<F, R>(&'static self, f: F) -> R
    where
        F: FnOnce(&T) -> R,
    {
        self.try_with(f).expect(
            "cannot access a Thread Local Storage value \
             during or after destruction",
        )
    }
alexvoina commented 3 months ago

encountering the same issue

alexvoina commented 3 months ago

any updates here? this is polluting our sentry @felixdollack did you manage to find a fix?

felixdollack commented 3 months ago

@alexvoina the problem seems to be resolved by upgrading to version 0.8.19