element-hq / element-ios

A glossy Matrix collaboration client for iOS
https://element.io
GNU Affero General Public License v3.0
1.73k stars 497 forks source link

Crash in RoomInfoListViewModel.viewData.getter #4949

Closed manuroe closed 2 years ago

manuroe commented 3 years ago

In 1.6.1:


Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001030ef0b8
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [22763]
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   Riot                            0x00000001030ef0b8 Swift runtime failure: Unexpectedly found nil while implicitly unwrapping an Optional value + 0 (RoomInfoListViewModel.swift:0)
1   Riot                            0x00000001030ef0b8 RoomInfoListViewModel.viewData.getter + 1008 (RoomInfoListViewModel.swift:48)
2   Riot                            0x00000001030ef008 RoomInfoListViewModel.viewData.getter + 832 (<compiler-generated>:0)
3   Riot                            0x00000001030ea8f0 RoomInfoListViewModel.loadData() + 8 (RoomInfoListViewModel.swift:96)
4   Riot                            0x00000001030ea8f0 RoomInfoListViewModel.process(viewAction:) + 8 (RoomInfoListViewModel.swift:70)
5   Riot                            0x00000001030ea8f0 protocol witness for RoomInfoListViewModelType.process(viewAction:) in conformance RoomInfoListViewModel + 12 (<compiler-generated>:67)
6   Riot                            0x00000001030ea8f0 RoomInfoListViewController.viewDidLoad() + 456 (RoomInfoListViewController.swift:124)
7   Riot                            0x00000001030eaee0 @objc RoomInfoListViewController.viewDidLoad() + 28 (<compiler-generated>:0)
8   UIKitCore                       0x00000001afa163a4 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 104 (UIViewController.m:2376)
9   UIKitCore                       0x00000001afa1a95c -[UIViewController loadViewIfRequired] + 928 (UIViewController.m:3505)
10  UIKitCore                       0x00000001afa1ad3c -[UIViewController view] + 28 (UIViewController.m:3527)
11  UIKitCore                       0x00000001af94f2a0 -[UINavigationController _startCustomTransition:] + 1168 (UINavigationController.m:1943)
12  UIKitCore                       0x00000001af963580 -[UINavigationController _startDeferredTransitionIfNeeded:] + 700 (UINavigationController.m:6953)
13  UIKitCore                       0x00000001af9649b4 -[UINavigationController __viewWillLayoutSubviews] + 164 (UINavigationController.m:7239)
14  UIKitCore                       0x00000001af9479e8 -[UILayoutContainerView layoutSubviews] + 224 (UILayoutContainerView.m:89)
15  UIKitCore                       0x00000001b05df8bc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2544 (UIView.m:17543)
16  QuartzCore                      0x00000001b0a55424 -[CALayer layoutSublayers] + 288 (CALayer.mm:10147)
17  QuartzCore                      0x00000001b0a5bbac CA::Layer::layout_if_needed(CA::Transaction*) + 544 (CALayer.mm:10014)
18  QuartzCore                      0x00000001b0a6716c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 140 (CALayer.mm:2485)
19  QuartzCore                      0x00000001b09af578 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 500 (CAContextInternal.mm:2510)
20  QuartzCore                      0x00000001b09da2c8 CA::Transaction::commit() + 668 (CATransactionInternal.mm:449)
21  QuartzCore                      0x00000001b09db530 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92 (CATransactionInternal.mm:932)
22  CoreFoundation                  0x00000001ad7b9540 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1799)
23  CoreFoundation                  0x00000001ad7b3b70 __CFRunLoopDoObservers + 588 (CFRunLoop.c:1912)
24  CoreFoundation                  0x00000001ad7b410c __CFRunLoopRun + 1012 (CFRunLoop.c:2953)
25  CoreFoundation                  0x00000001ad7b37d0 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3242)
26  GraphicsServices                0x00000001c3ef5570 GSEventRunModal + 160 (GSEvent.c:2259)
27  UIKitCore                       0x00000001b00e02d0 -[UIApplication _run] + 1052 (UIApplication.m:3269)
28  UIKitCore                       0x00000001b00e584c UIApplicationMain + 164 (UIApplication.m:4740)
29  Riot                            0x0000000102fca078 main + 68 (AppDelegate.swift:21)
30  libdyld.dylib                   0x00000001ad492140 start + 4
aringenbach commented 2 years ago

@manuroe Do we have any metrics on the occurrences of this crash ?

It's easy to make a pure technical crash fix, but it doesn't sound good to me, I'm a bit worried about what it implies (membersCount object of room summary seems to be empty)