home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.55k stars 302 forks source link

Crashes first time on startup #2781

Closed wwelles closed 3 months ago

wwelles commented 4 months ago

Device model, version and app version

Model Name: MacBook Pro (Retina, 13-inch, Late 2013) macOS Version: 10.15.7 App Version: 2023.7 (471) Safari Version: N/A

Home Assistant Core Version

2024.4

Describe the bug

Process:               Home Assistant [57614]
Path:                  /Applications/Home Assistant.app/Contents/MacOS/Home Assistant
Identifier:            Home Assistant
Version:               2023.12 (2023.499)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Home Assistant [57614]
User ID:               501

Date/Time:             2024-05-21 14:50:01.132 -0600
OS Version:            Mac OS X 10.15.7 (19H2026)
Report Version:        12
Anonymous UUID:        EB7AFE4C-B160-30BD-C23E-4397A651C75A

Sleep/Wake UUID:       1D1F8474-0020-422A-A0DA-0F87D2D09A0B

Time Awake Since Boot: 530000 seconds
Time Since Wake:       350000 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [57614]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.cocoapods.Realm             0x00000001043d2f54 realm::Array::insert(unsigned long, long long) + 532
1   org.cocoapods.Realm             0x0000000104436f62 realm::Group::create_empty_group() + 114
2   org.cocoapods.Realm             0x000000010443420f realm::Group::attach(unsigned long, bool, bool) + 191
3   org.cocoapods.Realm             0x0000000104595952 realm::Transaction::Transaction(std::__1::shared_ptr<realm::DB>, realm::SlabAlloc*, realm::DB::ReadLockInfo&, realm::DB::TransactStage) + 466
4   org.cocoapods.Realm             0x0000000104421e59 std::__1::shared_ptr<realm::Transaction> (anonymous namespace)::make_transaction_ref<std::__1::shared_ptr<realm::DB>, realm::SlabAlloc*, realm::DB::ReadLockInfo&, realm::DB::TransactStage>(std::__1::shared_ptr<realm::DB>&&, realm::SlabAlloc*&&, realm::DB::ReadLockInfo&, realm::DB::TransactStage&&) + 89
5   org.cocoapods.Realm             0x000000010441da77 realm::DB::start_write(bool) + 311
6   org.cocoapods.Realm             0x00000001046e310d realm::_impl::RealmCoordinator::open_db() + 1565
7   org.cocoapods.Realm             0x00000001046e4043 realm::_impl::RealmCoordinator::do_get_realm(realm::RealmConfig&&, std::__1::shared_ptr<realm::Realm>&, std::__1::optional<realm::VersionID>, realm::util::CheckedUniqueLock&) + 51
8   org.cocoapods.Realm             0x00000001046e3f50 realm::_impl::RealmCoordinator::get_realm(realm::RealmConfig, std::__1::optional<realm::VersionID>) + 464
9   org.cocoapods.Realm             0x0000000104777c47 realm::Realm::get_shared_realm(realm::RealmConfig) + 151
10  org.cocoapods.Realm             0x0000000104397b94 +[RLMRealm realmWithConfiguration:queue:error:] + 1309
11  org.cocoapods.RealmSwift        0x0000000104d052d0 0x104c91000 + 475856
12  org.cocoapods.RealmSwift        0x0000000104d0577b 0x104c91000 + 477051
13  io.robbie.HomeAssistant.Shared  0x000000010529bcec 0x1051bb000 + 920812
14  io.robbie.HomeAssistant         0x00000001037f3105 0x1036f9000 + 1024261
15  io.robbie.HomeAssistant         0x00000001037f348f 0x1036f9000 + 1025167
16  io.robbie.HomeAssistant         0x00000001037eba42 0x1036f9000 + 993858
17  com.apple.UIKitCore             0x00007fff6e79bc1b -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 166
18  com.apple.UIKitCore             0x00007fff6e79b527 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 5775
19  com.apple.UIKitCore             0x00007fff6e79891f -[UIApplication _runWithMainScene:transitionContext:completion:] + 1319
20  com.apple.UIKitCore             0x00007fff6e798328 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 179
21  com.apple.UIKitCore             0x00007fff6f3064d7 -[UIApplication _compellApplicationLaunchToCompleteUnconditionally] + 59
22  com.apple.UIKitCore             0x00007fff6e771a8b -[UIApplication _run] + 747
23  com.apple.UIKitCore             0x00007fff6e7661ef UIApplicationMain + 2114
24  io.robbie.HomeAssistant         0x00000001037f1efa 0x1036f9000 + 1019642
25  libdyld.dylib                   0x00007fff67d2acc9 start + 1

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

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

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

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

Thread 5:: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib          0x00007fff67e6bdea mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff67e6c160 mach_msg + 60
2   com.apple.CoreFoundation        0x00007fff2e0a6135 __CFRunLoopServiceMachPort + 247
3   com.apple.CoreFoundation        0x00007fff2e0a4c02 __CFRunLoopRun + 1319
4   com.apple.CoreFoundation        0x00007fff2e0a407e CFRunLoopRunSpecific + 462
5   com.apple.Foundation            0x00007fff30743c48 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
6   com.apple.Foundation            0x00007fff307f17bf -[NSRunLoop(NSRunLoop) runUntilDate:] + 103
7   com.apple.UIKitCore             0x00007fff6e76778e -[UIEventFetcher threadMain] + 138
8   com.apple.Foundation            0x00007fff3073c222 __NSThread__start__ + 1064
9   libsystem_pthread.dylib         0x00007fff67f2f109 _pthread_start + 148
10  libsystem_pthread.dylib         0x00007fff67f2ab8b thread_start + 15

Thread 6:
0   libsystem_pthread.dylib         0x00007fff67f2ab68 start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib         0x00007fff67f2ab68 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000040800000019  rbx: 0x0000000600000003  rcx: 0x0000000104279000  rdx: 0x00000001043d1c64
  rdi: 0x0000d3ea5646437f  rsi: 0x0000000004000008  rbp: 0x00007ffeec504cd0  rsp: 0x00007ffeec504c80
   r8: 0x000000010836a010   r9: 0x0000000004000090  r10: 0x0000000000002700  r11: 0x0000000000000000
  r12: 0x0000000004000090  r13: 0x00007f9210f1e420  r14: 0x0000000000000000  r15: 0x01000007feedfacf
  rip: 0x00000001043d2f54  rfl: 0x0000000000010202  cr2: 0x00000001043d2d40

Logical CPU:     1
Error Code:      0x00000000
Trap Number:     13

Binary Images:
       0x1036f9000 -        0x10387431f +io.robbie.HomeAssistant (2023.12 - 2023.499) <3579843B-3B85-335F-9ADA-306B24B7233C> /Applications/Home Assistant.app/Contents/MacOS/Home Assistant
       0x103924000 -        0x103a22617 +org.cocoapods.Alamofire (5.6.4 - 1) <3FA1E890-FA7F-362F-BEBC-6E236B49384A> /Applications/Home Assistant.app/Contents/Frameworks/Alamofire.framework/Versions/A/Alamofire
       0x103a8a000 -        0x103a95233 +org.cocoapods.CPDAcknowledgements (1.0.0 - 1) <3CD91D9A-385E-3DF6-A981-F7E74090E4B3> /Applications/Home Assistant.app/Contents/Frameworks/CPDAcknowledgements.framework/Versions/A/CPDAcknowledgements
       0x103ab1000 -        0x103ac66b7 +org.cocoapods.CallbackURLKit (2.3.0 - 1) <9FE6AF7F-E76E-3C10-85FF-75F6B6F0AE8A> /Applications/Home Assistant.app/Contents/Frameworks/CallbackURLKit.framework/Versions/A/CallbackURLKit
       0x103ae7000 -        0x103b026cf +org.cocoapods.ColorPickerRow (1.3.3 - 1) <C19971A2-AE43-350D-B233-

*----- removed due to length *-----

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: 330313
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=835.8M resident=0K(0%) swapped_out_or_unallocated=835.8M(100%)
Writable regions: Total=573.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=573.5M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
CG image                             8K        1 
CoreGraphics                         8K        1 
Foundation                           4K        1 
Kernel Alloc Once                    8K        1 
MALLOC                           176.5M       30 
MALLOC guard page                   32K        7 
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
SQLite page cache                   64K        1 
STACK GUARD                       56.0M        8 
Stack                             11.6M        8 
VM_ALLOCATE                       64.4M        9 
__DATA                            57.9M      615 
__DATA_CONST                      13.6M      119 
__DATA_DIRTY                         48        1 
__FONT_DATA                          4K        1 
__LINKEDIT                       398.5M       77 
__OBJC_RO                         32.3M        1 
__OBJC_RW                         1908K        2 
__TEXT                           437.6M      596 
__UNICODE                          564K        1 
mapped file                       50.7M       15 
shared memory                      640K       15 
===========                     =======  ======= 
TOTAL                              1.6G     1512 
TOTAL, minus reserved VM space     1.3G     1512 

Model: MacBookPro11,1, BootROM 433.140.2.0.0, 2 processors, Dual-Core Intel Core i5, 2.4 GHz, 4 GB, SMC 2.16f68
Graphics: kHW_IntelIrisItem, Intel Iris, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343235533641465236412D50422020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343235533641465236412D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x112), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1615.7)
Bluetooth: Version 7.0.6f8, 3 services, 25 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SD0128F, 121.33 GB
USB Device: USB 3.0 Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: SteelSeries Rival 3
USB Device: SteelSeries Apex 3
Thunderbolt Bus: MacBook Pro, Apple Inc., 17.2

To Reproduce Just launch app

Expected behavior Not crash

Screenshots

Additional context

wwelles commented 4 months ago

Something to add, I just tried the previous stable version (2023.7) which worked.

bgoncal commented 4 months ago

Looks something related to realm memory corruption, we don't support this version of the app anymore but I'll try to help, did you try to reinstall the app?

wwelles commented 4 months ago

I'd use the newest but unfortunately I'm using an older Mac that's stuck < Macos 12.

I did not try to reinstall it, however I installed the version previous to that as mentioned minutes before your message which you might have missed.

bgoncal commented 4 months ago

I'd use the newest but unfortunately I'm using an older Mac that's stuck < Macos 12.

I did not try to reinstall it, however I installed the version previous to that as mentioned minutes before your message which you might have missed.

Oh, missed that, but the latest should be working too, if you feel like reinstalling and trying let me know if it works, otherwise I hope the build you have works well for you