MOLH icon indicating copy to clipboard operation
MOLH copied to clipboard

App Crash Randomly

Open abdallahnh opened this issue 2 years ago • 3 comments

crash summary: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Not possible to remove variable:

After searching for a solution i found this thread: https://developer.apple.com/forums/thread/674689

Did anyone face this crash?

in the thread they mentioned

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.

abdallahnh avatar Sep 20 '22 08:09 abdallahnh

@abdallahnh i don;t recall facing it, could u reproduce it?

MoathOthman avatar Sep 23 '22 08:09 MoathOthman

it is hard to reproduce

abdallahnh avatar Oct 10 '22 10:10 abdallahnh

@abdallahnh i know its late but we had similar crash recently , and it was because of missed up autolayout, so basically resolving the autolayout issues/warning should do it.

MoathOthman avatar Nov 22 '22 11:11 MoathOthman