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

Crash after exiting - when using HW wallet - on MacOS Monterrey #7738

Closed
johnr365 opened this issue Mar 25, 2022 · 17 comments
Closed

Crash after exiting - when using HW wallet - on MacOS Monterrey #7738

johnr365 opened this issue Mar 25, 2022 · 17 comments
Labels
bug 🐞 hw-generic related to hardware wallets, irrespective of manufacturer OS-mac
Milestone

Comments

@johnr365
Copy link

johnr365 commented Mar 25, 2022

Electrum Version: 4.2.0
MacOS Version: 12.2.1

Crash after exiting the app, only when using Hardware wallet prior. Although, just opening the first wallet screen seems to be enough, where it says something to the effect of "I see your HW wallet, confirm you want to open it". Exiting there will generate the crash also.

Error report below:

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

Process:               run_electrum [6766]
Path:                  /Applications/Electrum.app/Contents/MacOS/run_electrum
Identifier:            Electrum
Version:               4.2.0 (???)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2022-03-25 13:24:22.5847 -0300
OS Version:            macOS 12.2.1 (21D62)
Report Version:        12
Bridge OS Version:     6.2 (19P744)
Anonymous UUID:        BFE7A65C-C869-70A3-3D38-A7D9A0AFB10B

Sleep/Wake UUID:       5F1C3010-2F99-4343-BC9C-078D46E1D179

Time Awake Since Boot: 720000 seconds
Time Since Wake:       52 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 4 Illegal instruction: 4
Terminating Process:   exc handler [6766]

Application Specific Information:
Expected typeID 43 (CFRunLoop) does not match actual typeID 0 (<unknown>)


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   CoreFoundation                	    0x7ff81264d3ee _CFAssertMismatchedTypeID + 110
1   CoreFoundation                	    0x7ff81253527f CFRunLoopRemoveSource + 670
2   IOKit                         	    0x7ff814e2d251 IOHIDDeviceUnscheduleFromRunLoop + 108
3   IOKit                         	    0x7ff814e31523 __IOHIDManagerDeviceApplier + 556
4   CoreFoundation                	    0x7ff8124debce __CFSetApplyFunction_block_invoke + 18
5   CoreFoundation                	    0x7ff8124dea3e CFBasicHashApply + 110
6   CoreFoundation                	    0x7ff8124de991 CFSetApplyFunction + 131
7   IOKit                         	    0x7ff814e2ffcb __ApplyToDevices + 105
8   IOKit                         	    0x7ff814e300bb IOHIDManagerUnscheduleFromRunLoop + 75
9   IOKit                         	    0x7ff814e30015 IOHIDManagerClose + 34
10  hid.cpython-39-darwin.so      	       0x1218e1e67 hid_exit + 23
11  hid.cpython-39-darwin.so      	       0x1218e1d89 __pyx_pw_3hid_3hidapi_exit + 9
12  Python                        	       0x1025d42fc cfunction_vectorcall_NOARGS + 252
13  Python                        	       0x10270e691 atexit_callfuncs + 113
14  Python                        	       0x1026b1e2e Py_FinalizeEx + 78
15  Python                        	       0x1026b2cdd Py_Exit + 13
16  Python                        	       0x1026b80fd _PyErr_PrintEx + 1165
17  run_electrum                  	       0x101ab7462 0x101ab5000 + 9314
18  run_electrum                  	       0x101ab77ec 0x101ab5000 + 10220
19  run_electrum                  	       0x101ab5f84 0x101ab5000 + 3972

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

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

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

Thread 4:
0   libsystem_pthread.dylib       	    0x7ff812448fec start_wqthread + 0

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

Thread 6:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	    0x7ff812410aba mach_msg_trap + 10
1   libsystem_kernel.dylib        	    0x7ff812410e2b mach_msg + 59
2   CoreFoundation                	    0x7ff812514af2 __CFRunLoopServiceMachPort + 319
3   CoreFoundation                	    0x7ff8125131cb __CFRunLoopRun + 1325
4   CoreFoundation                	    0x7ff8125125dd CFRunLoopRunSpecific + 563
5   AppKit                        	    0x7ff8150affd8 _NSEventThread + 132
6   libsystem_pthread.dylib       	    0x7ff81244d4f4 _pthread_start + 125
7   libsystem_pthread.dylib       	    0x7ff81244900f thread_start + 15


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000049  rbx: 0x00007ff81285b120  rcx: 0xb4738d4da77f003d  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x00007ff81285c057  rbp: 0x00007ff7be4496c0  rsp: 0x00007ff7be449590
   r8: 0x00007ff7be4492e8   r9: 0x00007ff81285c057  r10: 0x0000000000000000  r11: 0xffffffffabbed591
  r12: 0x00007ff7be4495a0  r13: 0x0000600000338800  r14: 0x0000000000000000  r15: 0x000000000000002b
  rip: 0x00007ff81264d3ee  rfl: 0x0000000000010202  cr2: 0x0000000969f1400a
  
Logical CPU:     6
Error Code:      0x00000000 
Trap Number:     6

Thread 0 instruction stream:
  10 01 00 00 49 89 f6 49-89 ff e8 53 44 f9 ff 48  ....I..I...SD..H
  89 c3 48 85 c0 4c 8d 25-5c d6 20 00 49 0f 44 dc  ..H..L.%\. .I.D.
  4c 89 f7 e8 3a 44 f9 ff-48 85 c0 49 0f 44 c4 48  L...:D..H..I.D.H
  89 04 24 48 8d 15 52 ec-20 00 4c 8d a5 e0 fe ff  ..$H..R. .L.....
  ff be ff 00 00 00 4c 89-e7 4c 89 f9 49 89 d8 4d  ......L..L..I..M
  89 f1 31 c0 e8 65 a2 00-00 4c 89 25 0a c6 66 41  ..1..e...L.%..fA
 [0f]0b 48 8d 05 62 ec 20-00 48 89 05 fa c5 66 41  ..H..b. .H....fA	<==
  0f 0b 48 8d 05 7d ee 20-00 48 89 05 ea c5 66 41  ..H..}. .H....fA
  0f 0b 48 8d 05 6d ee 20-00 48 89 05 da c5 66 41  ..H..m. .H....fA
  0f 0b 48 8d 05 5d ee 20-00 48 89 05 ca c5 66 41  ..H..]. .H....fA
  0f 0b 48 8d 05 ad ed 20-00 48 89 05 ba c5 66 41  ..H.... .H....fA
  0f 0b 48 8d 05 9d ed 20-00 48 89 05 aa c5 66 41  ..H.... .H....fA

Binary Images:
    0x7ff812494000 -     0x7ff812996fff com.apple.CoreFoundation (6.9) <9b112884-be6c-3c7f-9a2a-a47c491105db> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7ff814def000 -     0x7ff814ea4fff com.apple.framework.IOKit (2.0.2) <6882364f-5963-3153-81fd-3d2444c55060> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
       0x1218d9000 -        0x1218e4fff hid.cpython-39-darwin.so (*) <1f7b6716-f66a-36cf-8918-cbf1666bb722> /Applications/Electrum.app/Contents/MacOS/hid.cpython-39-darwin.so
       0x102556000 -        0x1027befff Python (*) <19ae83f6-0fcb-3733-a3cc-e844dd3c64c5> /Applications/Electrum.app/Contents/MacOS/Python
       0x101ab5000 -        0x101abcfff Electrum (4.2.0) <30e06877-f193-355d-806e-fb2b687275f7> /Applications/Electrum.app/Contents/MacOS/run_electrum
    0x7ff812447000 -     0x7ff812452fff libsystem_pthread.dylib (*) <ee564342-d8f2-396d-b642-40092cf34d82> /usr/lib/system/libsystem_pthread.dylib
    0x7ff812410000 -     0x7ff812446fff libsystem_kernel.dylib (*) <c1d58a50-5a4d-3bcb-a1fc-ec0902ce34d3> /usr/lib/system/libsystem_kernel.dylib
    0x7ff814f03000 -     0x7ff815d94fff com.apple.AppKit (6.9) <9d3ab204-4858-3120-b002-5c38b02edec4> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit

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=945.5M resident=0K(0%) swapped_out_or_unallocated=945.5M(100%)
Writable regions: Total=677.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=677.5M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               640K        5 
Activity Tracing                   256K        1 
CG backing stores                 2528K        4 
CG image                          2088K        3 
ColorSync                          240K       28 
CoreAnimation                      176K        7 
CoreGraphics                        12K        2 
CoreUI image data                 1276K        8 
Foundation                          16K        1 
Kernel Alloc Once                    8K        1 
MALLOC                           274.9M      242 
MALLOC guard page                   32K        7 
MALLOC_LARGE (reserved)            384K        1         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                       56.0M        7 
Stack                             11.0M        7 
VM_ALLOCATE                        356K       21 
__DATA                            22.4M      398 
__DATA_CONST                      13.8M      187 
__DATA_DIRTY                       546K      101 
__FONT_DATA                          4K        1 
__GLSLBUILTINS                    5176K        1 
__LINKEDIT                       664.4M       89 
__OBJC_RO                         81.8M        1 
__OBJC_RW                         3136K        3 
__TEXT                           281.1M      404 
__UNICODE                          588K        1 
dyld private memory               1024K        1 
mapped file                      410.0M       35 
shared memory                     1284K       16 
===========                     =======  ======= 
TOTAL                              2.2G     1584 
TOTAL, minus reserved VM space     1.8G     1584 



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

{"app_name":"run_electrum","timestamp":"2022-03-25 13:24:23.00 -0300","app_version":"4.2.0","slice_uuid":"30e06877-f193-355d-806e-fb2b687275f7","build_version":"","platform":1,"bundleID":"Electrum","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.2.1 (21D62)","incident_id":"BD63F8D4-09BF-4F34-9E1E-6502B63FC1C0","name":"run_electrum"}
{
  "uptime" : 720000,
  "procLaunch" : "2022-03-25 13:24:10.8087 -0300",
  "procRole" : "Background",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro16,2",
  "procStartAbsTime" : 728544559590715,
  "coalitionID" : 63279,
  "osVersion" : {
    "train" : "macOS 12.2.1",
    "build" : "21D62",
    "releaseType" : "User"
  },
  "captureTime" : "2022-03-25 13:24:22.5847 -0300",
  "incident" : "BD63F8D4-09BF-4F34-9E1E-6502B63FC1C0",
  "bug_type" : "309",
  "pid" : 6766,
  "procExitAbsTime" : 728556335753742,
  "cpuType" : "X86-64",
  "procName" : "run_electrum",
  "procPath" : "\/Applications\/Electrum.app\/Contents\/MacOS\/run_electrum",
  "bundleInfo" : {"CFBundleShortVersionString":"4.2.0","CFBundleIdentifier":"Electrum"},
  "storeInfo" : {"deviceIdentifierForVendor":"562A05F4-9152-5682-B3C6-1E7FBAC4D6C6","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "Electrum",
  "crashReporterKey" : "BFE7A65C-C869-70A3-3D38-A7D9A0AFB10B",
  "wakeTime" : 52,
  "bridgeVersion" : {"build":"19P744","train":"6.2"},
  "sleepWakeUUID" : "5F1C3010-2F99-4343-BC9C-078D46E1D179",
  "sip" : "enabled",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000001, 0x0000000000000000","rawCodes":[1,0],"type":"EXC_BAD_INSTRUCTION","signal":"SIGILL"},
  "termination" : {"flags":0,"code":4,"namespace":"SIGNAL","indicator":"Illegal instruction: 4","byProc":"exc handler","byPid":6766},
  "asi" : {"CoreFoundation":["Expected typeID 43 (CFRunLoop) does not match actual typeID 0 (<unknown>)"]},
  "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":7636321,"instructionState":{"instructionStream":{"bytes":[16,1,0,0,73,137,246,73,137,255,232,83,68,249,255,72,137,195,72,133,192,76,141,37,92,214,32,0,73,15,68,220,76,137,247,232,58,68,249,255,72,133,192,73,15,68,196,72,137,4,36,72,141,21,82,236,32,0,76,141,165,224,254,255,255,190,255,0,0,0,76,137,231,76,137,249,73,137,216,77,137,241,49,192,232,101,162,0,0,76,137,37,10,198,102,65,15,11,72,141,5,98,236,32,0,72,137,5,250,197,102,65,15,11,72,141,5,125,238,32,0,72,137,5,234,197,102,65,15,11,72,141,5,109,238,32,0,72,137,5,218,197,102,65,15,11,72,141,5,93,238,32,0,72,137,5,202,197,102,65,15,11,72,141,5,173,237,32,0,72,137,5,186,197,102,65,15,11,72,141,5,157,237,32,0,72,137,5,170,197,102,65],"offset":96}},"threadState":{"r13":{"value":105553119643648},"rax":{"value":73},"rflags":{"value":66050},"cpu":{"value":6},"r14":{"value":0},"rsi":{"value":140703439372375,"symbolLocation":7159,"symbol":"_XMLPlistAppendDataUsingBase64.__CFPLDataEncodeTable"},"r8":{"value":140702025814760},"cr2":{"value":40432123914},"rdx":{"value":0},"r10":{"value":0},"r9":{"value":140703439372375,"symbolLocation":7159,"symbol":"_XMLPlistAppendDataUsingBase64.__CFPLDataEncodeTable"},"r15":{"value":43},"rbx":{"value":140703439368480,"symbolLocation":3264,"symbol":"_XMLPlistAppendDataUsingBase64.__CFPLDataEncodeTable"},"trap":{"value":6},"err":{"value":0},"r11":{"value":18446744072295994769},"rip":{"value":140703437214702,"matchesCrashFrame":1},"rbp":{"value":140702025815744},"rsp":{"value":140702025815440},"r12":{"value":140702025815456},"rcx":{"value":13002891913810870333},"flavor":"x86_THREAD_STATE","rdi":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":1807342,"symbol":"_CFAssertMismatchedTypeID","symbolLocation":110,"imageIndex":0},{"imageOffset":660095,"symbol":"CFRunLoopRemoveSource","symbolLocation":670,"imageIndex":0},{"imageOffset":254545,"symbol":"IOHIDDeviceUnscheduleFromRunLoop","symbolLocation":108,"imageIndex":1},{"imageOffset":271651,"symbol":"__IOHIDManagerDeviceApplier","symbolLocation":556,"imageIndex":1},{"imageOffset":306126,"symbol":"__CFSetApplyFunction_block_invoke","symbolLocation":18,"imageIndex":0},{"imageOffset":305726,"symbol":"CFBasicHashApply","symbolLocation":110,"imageIndex":0},{"imageOffset":305553,"symbol":"CFSetApplyFunction","symbolLocation":131,"imageIndex":0},{"imageOffset":266187,"symbol":"__ApplyToDevices","symbolLocation":105,"imageIndex":1},{"imageOffset":266427,"symbol":"IOHIDManagerUnscheduleFromRunLoop","symbolLocation":75,"imageIndex":1},{"imageOffset":266261,"symbol":"IOHIDManagerClose","symbolLocation":34,"imageIndex":1},{"imageOffset":36455,"symbol":"hid_exit","symbolLocation":23,"imageIndex":2},{"imageOffset":36233,"symbol":"__pyx_pw_3hid_3hidapi_exit","symbolLocation":9,"imageIndex":2},{"imageOffset":516860,"symbol":"cfunction_vectorcall_NOARGS","symbolLocation":252,"imageIndex":3},{"imageOffset":1803921,"symbol":"atexit_callfuncs","symbolLocation":113,"imageIndex":3},{"imageOffset":1424942,"symbol":"Py_FinalizeEx","symbolLocation":78,"imageIndex":3},{"imageOffset":1428701,"symbol":"Py_Exit","symbolLocation":13,"imageIndex":3},{"imageOffset":1450237,"symbol":"_PyErr_PrintEx","symbolLocation":1165,"imageIndex":3},{"imageOffset":9314,"imageIndex":4},{"imageOffset":10220,"imageIndex":4},{"imageOffset":3972,"imageIndex":4}]},{"id":7636352,"frames":[{"imageOffset":8172,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":7636371,"frames":[{"imageOffset":8172,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":7636372,"frames":[{"imageOffset":8172,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":7636373,"frames":[{"imageOffset":8172,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":7636374,"frames":[{"imageOffset":8172,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":5}]},{"id":7636386,"name":"com.apple.NSEventThread","frames":[{"imageOffset":2746,"symbol":"mach_msg_trap","symbolLocation":10,"imageIndex":6},{"imageOffset":3627,"symbol":"mach_msg","symbolLocation":59,"imageIndex":6},{"imageOffset":527090,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":319,"imageIndex":0},{"imageOffset":520651,"symbol":"__CFRunLoopRun","symbolLocation":1325,"imageIndex":0},{"imageOffset":517597,"symbol":"CFRunLoopRunSpecific","symbolLocation":563,"imageIndex":0},{"imageOffset":1757144,"symbol":"_NSEventThread","symbolLocation":132,"imageIndex":7},{"imageOffset":25844,"symbol":"_pthread_start","symbolLocation":125,"imageIndex":5},{"imageOffset":8207,"symbol":"thread_start","symbolLocation":15,"imageIndex":5}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64h",
    "base" : 140703435407360,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5255168,
    "uuid" : "9b112884-be6c-3c7f-9a2a-a47c491105db",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1856.107"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703478771712,
    "CFBundleShortVersionString" : "2.0.2",
    "CFBundleIdentifier" : "com.apple.framework.IOKit",
    "size" : 745472,
    "uuid" : "6882364f-5963-3153-81fd-3d2444c55060",
    "path" : "\/System\/Library\/Frameworks\/IOKit.framework\/Versions\/A\/IOKit",
    "name" : "IOKit"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4857892864,
    "size" : 49152,
    "uuid" : "1f7b6716-f66a-36cf-8918-cbf1666bb722",
    "path" : "\/Applications\/Electrum.app\/Contents\/MacOS\/hid.cpython-39-darwin.so",
    "name" : "hid.cpython-39-darwin.so"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4334116864,
    "size" : 2527232,
    "uuid" : "19ae83f6-0fcb-3733-a3cc-e844dd3c64c5",
    "path" : "\/Applications\/Electrum.app\/Contents\/MacOS\/Python",
    "name" : "Python"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4322971648,
    "CFBundleShortVersionString" : "4.2.0",
    "CFBundleIdentifier" : "Electrum",
    "size" : 32768,
    "uuid" : "30e06877-f193-355d-806e-fb2b687275f7",
    "path" : "\/Applications\/Electrum.app\/Contents\/MacOS\/run_electrum",
    "name" : "run_electrum"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703435091968,
    "size" : 49152,
    "uuid" : "ee564342-d8f2-396d-b642-40092cf34d82",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703434866688,
    "size" : 225280,
    "uuid" : "c1d58a50-5a4d-3bcb-a1fc-ec0902ce34d3",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140703479902208,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 15278080,
    "uuid" : "9d3ab204-4858-3120-b002-5c38b02edec4",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2113.30.116"
  }
],
  "sharedCache" : {
  "base" : 140703431860224,
  "size" : 15216836608,
  "uuid" : "0939015d-8308-3e69-b095-bd928f835202"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=945.5M resident=0K(0%) swapped_out_or_unallocated=945.5M(100%)\nWritable regions: Total=677.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=677.5M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               640K        5 \nActivity Tracing                   256K        1 \nCG backing stores                 2528K        4 \nCG image                          2088K        3 \nColorSync                          240K       28 \nCoreAnimation                      176K        7 \nCoreGraphics                        12K        2 \nCoreUI image data                 1276K        8 \nFoundation                          16K        1 \nKernel Alloc Once                    8K        1 \nMALLOC                           274.9M      242 \nMALLOC guard page                   32K        7 \nMALLOC_LARGE (reserved)            384K        1         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       56.0M        7 \nStack                             11.0M        7 \nVM_ALLOCATE                        356K       21 \n__DATA                            22.4M      398 \n__DATA_CONST                      13.8M      187 \n__DATA_DIRTY                       546K      101 \n__FONT_DATA                          4K        1 \n__GLSLBUILTINS                    5176K        1 \n__LINKEDIT                       664.4M       89 \n__OBJC_RO                         81.8M        1 \n__OBJC_RW                         3136K        3 \n__TEXT                           281.1M      404 \n__UNICODE                          588K        1 \ndyld private memory               1024K        1 \nmapped file                      410.0M       35 \nshared memory                     1284K       16 \n===========                     =======  ======= \nTOTAL                              2.2G     1584 \nTOTAL, minus reserved VM space     1.8G     1584 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "60da5e84ab0ca017dace9abf",
      "factorPackIds" : {

      },
      "deploymentId" : 240000008
    },
    {
      "rolloutId" : "607844aa04477260f58a8077",
      "factorPackIds" : {
        "SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
      },
      "deploymentId" : 240000066
    },
    {
      "rolloutId" : "602ad4dac86151000cf27e46",
      "factorPackIds" : {
        "SIRI_DICTATION_ASSETS" : "6193d03f2171a2330e561dfc"
      },
      "deploymentId" : 240000305
    },
    {
      "rolloutId" : "60356660bbe37970735c5624",
      "factorPackIds" : {

      },
      "deploymentId" : 240000027
    },
    {
      "rolloutId" : "601d9415f79519000ccd4b69",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "622657ce37186c771d5404ad"
      },
      "deploymentId" : 240000416
    },
    {
      "rolloutId" : "5ffde50ce2aacd000d47a95f",
      "factorPackIds" : {

      },
      "deploymentId" : 240000123
    },
    {
      "rolloutId" : "5fc94383418129005b4e9ae0",
      "factorPackIds" : {

      },
      "deploymentId" : 240000287
    }
  ],
  "experiments" : [

  ]
}
}

Model: MacBookPro16,2, BootROM 1715.81.2.0.0 (iBridge: 19.16.10744.0.0,0), 4 processors, Quad-Core Intel Core i5, 2 GHz, 16 GB, SMC 
Graphics: Intel Iris Plus Graphics, Intel Iris Plus Graphics, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, LPDDR4X, 3733 MHz, Samsung, K4UBE3D4AA-MGCL
Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, LPDDR4X, 3733 MHz, Samsung, K4UBE3D4AA-MGCL
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x7BF), wl0: Jul 12 2021 18:02:56 version 9.30.464.0.32.5.76 FWID 01-c081cfed
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: T2Bus
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 85.0
Thunderbolt Bus: MacBook Pro, Apple Inc., 85.0
@SomberNight SomberNight added OS-mac hw-generic related to hardware wallets, irrespective of manufacturer labels Mar 25, 2022
@gruve-p
Copy link
Contributor

gruve-p commented Mar 26, 2022

I am able to replicate the crash on macOS. Happens with all hardware devices (ledger nano s, nano x, trezor one, trezor t and keepkey). Crash does not happen on Linux and Windows.

@SomberNight
Copy link
Member

@gruve-p are you also using macos 12 as OP? or does it also happen on older versions?

@gruve-p
Copy link
Contributor

gruve-p commented Mar 26, 2022

@SomberNight

Electrum Version: 4.2.0 and MacOS Version: 12.2.1 -> crash after exiting hardware wallet

Electrum Version: 4.1.5 and MacOS Version: 12.2.1 -> NO crash after exiting hardware wallet

@gruve-p
Copy link
Contributor

gruve-p commented Mar 26, 2022

Building from source (master and 4.2.0 tag on MacOS Version: 12.2.1) -> crash after exiting hardware wallet

@SomberNight
Copy link
Member

Could you test these scenarios:

  • with a Trezor with the "Trezor Bridge" installed -- in this case libusb and hidapi are not used (well, still used for a bit during scan_devices, but not to communicate with the trezor)
  • no hw device connected, just try to scan for devices (so e.g. open a wizard and start creating a standard wallet for a hw device), then close the app

@gruve-p
Copy link
Contributor

gruve-p commented Mar 26, 2022

  • with a Trezor with the "Trezor Bridge" installed -- in this case libusb and hidapi are not used (well, still used for a bit during scan_devices, but not to communicate with the trezor)

crashes

  • no hw device connected, just try to scan for devices (so e.g. open a wizard and start creating a standard wallet for a hw device), then close the app

crashes

@visskiss
Copy link

visskiss commented Apr 2, 2022

Also having this crash.

@accumulator
Copy link
Member

Looking at the crash stacktrace and this commit , it seems that hidapi_exit() could be the culprit here.

Using latest hidapi 0.11.2 might fix this issue.

@accumulator
Copy link
Member

accumulator commented Apr 3, 2022

I reran freeze_packages 184e122 which pulls in 0.11.2

@SomberNight
Copy link
Member

Could someone who can reproduce try to build from master and test with that?

Or alternatively, you can test with the binary built by the CI:
https://cirrus-ci.com/task/5194477139656704
see "Artifacts" near the middle of the page

@Tedeco79
Copy link

I'm getting the same on Monterrey and Mojave 10.14.6
I close the wallet and get : Electrum quit unexpectedly

@SomberNight
Copy link
Member

Could someone who can reproduce try to build from master and test with that?
Or alternatively, you can test with the binary built by the CI

Would be great if someone that can reproduce tested and reported if this is fixed on master now. :)

@gruve-p
Copy link
Contributor

gruve-p commented May 20, 2022

Would be great if someone that can reproduce tested and reported if this is fixed on master now. :)

Building from source (master on MacOS Version: 12.4) -> crash after exiting hardware wallet

@balboah
Copy link

balboah commented May 23, 2022

I'll add that a crash happens even if a HW wallet isn't physically connected, it only needs to be configured in the wallet.

@1korn
Copy link

1korn commented May 23, 2022

Can confirm this issue on Macbook Pro with OSX 12.3.1 (NOT M1) and latest Electrum 4.2.1.

Can also confirm that crash is only happening on exit if you had a wallet connected to a hardware wallet open. (doesnt need to be physically connected)
Does not crash when you start electrum with a wallet that isn't connected to a hww and exit.

@captCovalent
Copy link

Happens to me too on MacOS 12.4. I imported a .json from my MK4 Coldcard.

@SomberNight
Copy link
Member

Ok, I can reproduce. The immediate cause seems to be a regression in recent hidapi versions.
We could roll back to hidapi 0.10.1, which is the last version that can exit cleanly.
Reported trezor/cython-hidapi#142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 hw-generic related to hardware wallets, irrespective of manufacturer OS-mac
Projects
None yet
Development

No branches or pull requests

11 participants