Post

Replies

Boosts

Views

Activity

Reply to App crashing randomly - Not possible to remove variable
I had a similar issue, resolved it just yesterday. the solution to it was to remove the following call to UIView.appearance().semanticContentAttribute = isRTL ? .forceRightToLeft : .forceLeftToRight /* where `isRTL` is a global computed variable that gets the UI direction of the current `Locale` that I set when the user changes the language. */ whenever the ui language is changed by the user, and to enforce using the correct layout direction I was Swizzling the UIApplication.userInterfaceLayoutDirection to return the proper UI direction according to the selected language. Note: I had a crash just once in over 100 tests, where the other +99 tests the issue was a delay in viewing an already created ViewController vc either by otherVC.present(vc) it, nav.push(vc) it, nav.set([vc]), or nav.pop to vc, meaning if the that vc is just created will not cause any delay but if it was already created and presented before, there will be a delay between viewWillAppear and viewDidAppear for ~200mSec x n times UI direction changes 200mSec is relative to the UI complexity of vc. In that single crash this is the message I got: Thread 1: "Not possible to remove variable: 2247: <unknown var (bug!) with engine as delegate:0x600001c1b6c0>{id: 47987} colIndex:0 from engine <NSISEngine: 0x14dc8fae0>{ delegate:0x14dc99e20 EngineVars: 0: objective{id: 42093} rowIndex:0 1: <bgImage>.Width{id: 41414} rowIndex:1 2: 0x6000020aaee0.posErrorMarker{id: 41958} colIndex:1 3: 0x6000020aaee0.negError{id: 41959} rowIndex:456 4: <bgImage>.Height{id: 41420} rowIndex:1073741824 5: 0x6000020a8ae0.posErrorMarker{id: 41960} colIndex:1073741825 6: 0x6000020a8ae0.negError{id: 41961} rowIndex:1073742291 7: UIImageView:0x14dc502c0.Height{id: 41428} rowIndex:1073741825 8: 0x6000024589b0.marker{id: 41427} colIndex:1073741828 9: UIImageView:0x14dc502c0.Width{id: 41426} colIndex:590 10: 0x6000020ab180.posErrorMarker{id: 41962} colIndex:3 11: 0x6000020ab180.negError{id: 41963} rowIndex:3 12: 0x6000020a8ea0.posErrorMarker{id: 41964} colIndex:1073741832 13: 0x6000020a8ea0.negError{id: 41965} rowIndex:1073741826 14: 0x600002428f50:UISV-amb"
Sep ’21