ITzTravelInTime / TINU

TINU: The open tool to create bootable macOS installers.
GNU General Public License v2.0
492 stars 37 forks source link

Crash on Launch (Monterey, Beta 9) #18

Closed 23d1 closed 2 years ago

23d1 commented 3 years ago

The app crashes when trying to launch on macOS 12 (Beta 9).

Process:               TINU [51013]
Path:                  /Applications/TINU.app/Contents/MacOS/TINU
Identifier:            org.pietrocaruso.TINU
Version:               3.0 RELEASE CANDIDATE 3 (103)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2021-10-09 11:05:53.0930 -0700
OS Version:            macOS 12.0 (21A5543b)
Report Version:        12
Bridge OS Version:     6.0 (19P50542a)
Anonymous UUID:        74C57713-30FE-6674-2759-A7CF31C8115E

Sleep/Wake UUID:       308D05E0-9A7E-4F81-99C8-89344040D5CB

Time Awake Since Boot: 23000 seconds
Time Since Wake:       1778 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 [51013]

ID   Vend/Dev
aa38 73bf1002
Seconds Ago   ID   Type
    69000.0   aa38 Attach
    68000.0   aa38 Eject
    68000.0   aa38 EjectFinalize
    68000.0   aa38 EjectFinalized
    68000.0   aa38 Detach

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   TINU                                   0x10f949b66 specialized static SIP.actualStatus.getter + 1478
1   TINU                                   0x10f94891e protocol witness for static SimulatableDetectable.actualStatus.getter in conformance SIP + 14
2   TINU                                   0x10f947e46 static SimulatableDetectable.status.getter + 182
3   TINU                                   0x10f7ff15d ChooseSideViewController.viewDidAppear() + 765
4   TINU                                   0x10f8042ab @objc ChooseSideViewController.viewDidAppear() + 43
5   AppKit                              0x7ff81c5e2895 -[NSViewController _sendViewDidAppear] + 41
6   AppKit                              0x7ff81cd17fd2 -[NSView _windowDidOrderOnScreen] + 67
7   AppKit                              0x7ff81cd18068 -[NSView _windowDidOrderOnScreen] + 217
8   AppKit                              0x7ff81c5daf8b -[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] + 2040
9   AppKit                              0x7ff81c5da43c -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 135
10  AppKit                              0x7ff81c5d9419 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 289
11  AppKit                              0x7ff81c5d9295 -[NSWindow orderWindow:relativeTo:] + 152
12  AppKit                              0x7ff81c5cde48 -[NSWindow makeKeyAndOrderFront:] + 60
13  QuickLookUI                         0x7ffa3617bfb6 -[QLSeamlessDocumentOpener showWindow:contentFrame:withBlock:] + 130
14  AppKit                              0x7ff81c6d61d3 -[NSWindowController showWindow:] + 672
15  AppKit                              0x7ff81c46699a NSApplicationMain + 995
16  TINU                                   0x10f76b52d main + 13
17  dyld                                   0x11d3454d5 start + 421

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

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

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

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

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000200000003  rbx: 0xe000000000000000  rcx: 0xfffffffe00000000  rdx: 0x0000000000000003
  rdi: 0x00006000021a2d58  rsi: 0x0000000200000003  rbp: 0x00007ff7b0797f80  rsp: 0x00007ff7b0797f10
   r8: 0x00007ff85c9613a0   r9: 0x0000000000000090  r10: 0x00000000000007fb  r11: 0x00005ffef28237b0
  r12: 0x00007ff85c9cc968  r13: 0x00007ff7b0797f20  r14: 0xd000000000000017  r15: 0x8000000000000000
  rip: 0x000000010f949b66  rfl: 0x0000000000010246  cr2: 0x00007ff85b05a540

Logical CPU:     6
Error Code:      0x00000000 
Trap Number:     6

Thread 0 instruction stream:
  ce 04 00 48 89 de 31 d2-4c 89 f9 4d 89 fd e8 c7  ...H..1.L..M....
  29 00 00 48 89 df e8 c1-7a 01 00 31 c0 80 3d ba  )..H....z..1..=.
  3c 06 00 00 75 06 8b 05-ae 3c 06 00 48 8d 65 d8  <...u....<..H.e.
  5b 41 5c 41 5d 41 5e 41-5f 5d c3 48 8d 3d a0 39  [A\A]A^A_].H.=.9
  06 00 48 8d 35 b1 ee ff-ff e8 72 7b 01 00 80 3d  ..H.5.....r{...=
  89 3c 06 00 00 0f 84 67-fa ff ff e9 6f fa ff ff  .<.....g....o...
 [0f]0b 0f 0b 66 0f 1f 44-00 00 83 ff 7f 7f 21 ff  ....f..D......!. <==
  cf 83 ff 3f 77 68 55 48-89 e5 b0 01 48 8d 0d 5f  ...?whUH....H.._
  00 00 00 48 63 14 b9 48-01 ca 5d ff e2 31 c0 c3  ...Hc..H..]..1..
  81 ff ff 01 00 00 7e 1b-81 ff 00 02 00 00 74 35  ......~.......t5
  81 ff 00 04 00 00 74 30-81 ff 00 08 00 00 75 2e  ......t0......u.
  b0 0b c3 81 ff 80 00 00-00 74 20 81 ff 00 01 00  .........t .....

Binary Images:
       0x10f767000 -        0x10f98efff org.pietrocaruso.TINU (3.0 RELEASE CANDIDATE 3) <38967f9c-b69b-3b8b-8371-9ccabf2a5b88> /Applications/TINU.app/Contents/MacOS/TINU
    0x7ff81c463000 -     0x7ff81d2ecfff com.apple.AppKit (6.9) <e680649a-14df-3843-ab10-0e4dfcd77654> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x7ffa360df000 -     0x7ffa36202fff com.apple.QuickLookUIFramework (5.0) <ccd33338-1d0a-3e4c-a81e-1878d4afb066> /System/Library/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI
       0x11d340000 -        0x11d3abfff dyld (*) <0fc1161d-234a-3882-8160-4e110aaefb7e> /usr/lib/dyld
    0x7ff8199b4000 -     0x7ff8199bffff libsystem_pthread.dylib (*) <b8298a2d-2637-30a9-910e-7ba9c7dffccd> /usr/lib/system/libsystem_pthread.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.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
ColorSync                          216K       24 
CoreServices                        92K        1 
Foundation                          16K        1 
Kernel Alloc Once                    8K        1 
MALLOC                           278.3M       45 
MALLOC guard page                   48K       10 
MALLOC_MEDIUM (reserved)         720.0M        6         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                       56.0M        5 
Stack                             10.0M        5 
VM_ALLOCATE                         20K        5 
__DATA                            27.5M      452 
__DATA_CONST                      27.3M      296 
__DATA_DIRTY                      1507K      192 
__FONT_DATA                          4K        1 
__LINKEDIT                       637.9M        9 
__OBJC_RO                         81.5M        1 
__OBJC_RW                         3120K        2 
__TEXT                           451.0M      474 
__UNICODE                          588K        1 
dyld private memory               1024K        1 
mapped file                      138.8M       18 
shared memory                      784K       17 
===========                     =======  ======= 
TOTAL                              2.8G     1569 
TOTAL, minus reserved VM space     1.7G     1569 
ITzTravelInTime commented 3 years ago

So the crash log says it's a crash from the SIP detection system, so something broke there with the new beta, this will require me to update to the latest Monterey and debug the app. Also try my other app, that's called MenuBarSIPDetector to see if it crashes too, if it does it means that that's the actual issue, since it shares the SIP detection library with TINU.

Also using the io registry explorer app you can try look for csr-active-config and tell me the exact value for that io registry entry. That value is the actual SIP value stored in nvram, it could help me debug the issue for your specific case.

Also try to set the SIP to either fully enabled or fully disabled, that could help fixing your issue perhaps.

ITzTravelInTime commented 3 years ago

So i am currently updating both my monterey installation and my Xcode install so i can debug the issue for myself.

I will keep you posted with updates.

ITzTravelInTime commented 3 years ago

UPDATE: The app didn't crash on my on my macbook pro with SIP Disabled, so i am thinking it might not be a problem with your specific computer, so follow the steps i wrote in the first reply and tell me what's you sip value.

Schermata 2021-10-10 alle 17 37 44
ITzTravelInTime commented 3 years ago

so i found a piece of code that could perhaps cause your crash if SIP can't be detected, so i updated the source code to try and fix that, if want to see if that fixes your issue i can upload a binary to let you try the fix.

ITzTravelInTime commented 2 years ago

I will mark this issue as closed since there hasn't been any activity here that confirms or deny that the bug has been fixed.