-
Notifications
You must be signed in to change notification settings - Fork 181
Crashes when closing it as a modal #45
Comments
Are these lines called when you dismiss the modal? DZNWebViewController/Source/Classes/DZNWebViewController.m Lines 858 to 862 in e1731d9
PS: You shouldn't have to remove observers yourself. It should do it internally. |
It crashes when I show the modal. And it happens at random times. Sometimes I can show the modal for a particular link 2 or 3 times before eventually crashing. Unfortunately Xcode only says it's crashes at the appdelegate class, so I can't give you anymore information:
|
Try adding an exception breakpoint. Unless you're using a dynamic framework, it should still point out where the exception is being triggered. |
It still showing that same line. I tried to debug step by step and it crashes when i present the viewcontroller.
|
You should try weak referencing webModalNC.. |
Doesn't look like |
I declared webModalNC as weak at the top 'weak var webModalNC: UINavigationController?' and now it's always nil even after initializing the UINavigationController in showSource(). |
Does it need to be a |
|
not sure if i'm doing this right.. https://gist.github.com/jaybuangan/1a8c020ac2b2b213928bc2afa865be22 i took out all the tableview code. basically there's a view in a tableviewcell that when clicked, calls a delegate function "showSource" which is defined in this view controller. It's just passing a URL string. |
Also crashes for me, same scenario as above. I am showng it as a modal, crashes on exit with debugger pointing to AppDelegate. |
i have the same issue while dismiss view controller |
Same issue here, crashing on clients but i cant debug because crashlytics dont give enough info for this crash. Fatal Exception: NSInternalInconsistencyException |
I have a tableview with 3 rows each with a button. When the user clicks on the button it opens up your view controller in a modal. What's weird is that it'll work fine if I open the modal when clicking on the button from the second or third row but when I try to click on the button on the first row it crashes with this error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x126162bf0 of class UINavigationBar was deallocated while key value observers were still registered with it.
<NSKeyValueObservationInfo 0x12607c780> (
<NSKeyValueObservance 0x126016bf0: Observer: 0x126166db0, Key path: hidden, Options: <New: YES, Old: NO, Prior: NO> Context: 0x10023fb18, Property: 0x1261319f0>
<NSKeyValueObservance 0x12606c9d0: Observer: 0x126166db0, Key path: center, Options: <New: YES, Old: NO, Prior: NO> Context: 0x10023fb18, Property: 0x1261325a0>
<NSKeyValueObservance 0x12606cae0: Observer: 0x126166db0, Key path: alpha, Options: <New: YES, Old: NO, Prior: NO> Context: 0x10023fb18, Property: 0x126132ad0>
)'
this is the code i'm using to open the URL:
Do i need to remove observers manually before dismissing the modal?
The text was updated successfully, but these errors were encountered: