Application crashing without information about crash when transitioning to another view controllerUIStoryboard's instantiateViewControllerWithIdentifier SIGABRT crashiOS - app crashing for specific controllerMKMapView in UITabBarController using swiftHow to call the view controller from another view controller programmatically depending on the response from the remote serverFirebase swift ios login system error Assertion failed/Exec_BAD_INSTRUNCTION (code=EXC_i386_INVOP, subcode=0x0)Why can't segue from within GMSAutocompleteViewController with google autocomplete place pickerusing firebase to save and retrieve user profile dataIBAction causes EXC_BAD_ACCESS in AppDelegateApp running on simulator + physical device suddenly have black screenTableView Controller is hiding the dropshadow of swipemenu in swift 4

Postdoc interview - somewhat positive reply but no news?

Compute the square root of a positive integer using binary search

Is this bar slide trick shown on Cheers real or a visual effect?

Why is the battery jumpered to a resistor in this schematic?

Meaning and structure of headline "Hair it is: A List of ..."

Why do so many people play out of turn on the last lead?

Reducing contention in thread-safe LruCache

Do I need to start off my book by describing the character's "normal world"?

Heyawacky: Ace of Cups

Vegetarian dishes on Russian trains (European part)

Polar contour plot in Mathematica?

Do predators tend to have vertical slit pupils versus horizontal for prey animals?

Subgroup generated by a subgroup and a conjugate of it

What is the opposite of "hunger level"?

Best model for precedence constraints within scheduling problem

The Roommates' Dilemma

The anatomy of an organic infrared generator

How to train a replacement without them knowing?

Output with the same length always

Ending a line of dialogue with "?!": Allowed or obnoxious?

Can I submit a paper computer science conference using an alias if using my real name can cause legal trouble in my original country

Quick destruction of a helium filled airship?

My new Acer Aspire 7 doesn't have a Legacy Boot option, what can I do to get it?

Pocket Clarketech



Application crashing without information about crash when transitioning to another view controller


UIStoryboard's instantiateViewControllerWithIdentifier SIGABRT crashiOS - app crashing for specific controllerMKMapView in UITabBarController using swiftHow to call the view controller from another view controller programmatically depending on the response from the remote serverFirebase swift ios login system error Assertion failed/Exec_BAD_INSTRUNCTION (code=EXC_i386_INVOP, subcode=0x0)Why can't segue from within GMSAutocompleteViewController with google autocomplete place pickerusing firebase to save and retrieve user profile dataIBAction causes EXC_BAD_ACCESS in AppDelegateApp running on simulator + physical device suddenly have black screenTableView Controller is hiding the dropshadow of swipemenu in swift 4






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have two view controllers, LoginViewController and TermsAndPrivacyViewController.



On first view controller, there is a button that has IBAction, which opens TermsAndPrivacyViewController. On TermsAndPrivacyViewController I have web view, that loads url I am passing from LoginViewController. So, this is the code(Login view controller):



 @IBAction func tosAction(_ sender: Any) 

if let vc = UIStoryboard(name: "Login", bundle: nil).instantiateViewController(withIdentifier: kTOSViewControllerIdentifier) as? TermsAndPrivacyViewController

vc.url = URL(string: kTOSUrl)
self.navigationController?.pushViewController(vc, animated: true)





On TermsAndPrivacyViewController, I have this:



override func viewDidLoad() 
super.viewDidLoad()

webView.navigationDelegate = self
if let `url` = url
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true




So, when I hit a button, app crashes SIGABRT message, and nothing else. Also, I don't get any crash report on Firebase Crashlytics (I have detached an app from a debugger first, and produced a crash).



Now, the strange part :/ ... If I put a breakpoint on a first line of tosAction() method, and go step by step (or just let it continue), everything works normally. No crash???



Am I missing something obvious here? What is the reason of crashing? Also, I tried to put Exception Breakpoint but nothing changes. I only get this:



enter image description here



enter image description here



and a console:



console image



so, kinda no information about crash at all.



EDIT



Ok, now the even more strange part :) I just tried app on different phones.



App crashes on iPhone 6s+, iOS 12.1(16B5059d), but it works normally on iPhone 6, iOS 12.0 (16A366)










share|improve this question


























  • Is it crashing on LoginViewController page or in TermsAndPrivacyViewController page ?

    – Badr Filali
    Mar 27 at 13:43











  • I was trying to figure out that, but when it crashes, it goes to first line of AppDelegate (see on pictures) at the moment I tap on a button (on LoginViewController). @BadrFilali

    – Whirlwind
    Mar 27 at 13:44


















1















I have two view controllers, LoginViewController and TermsAndPrivacyViewController.



On first view controller, there is a button that has IBAction, which opens TermsAndPrivacyViewController. On TermsAndPrivacyViewController I have web view, that loads url I am passing from LoginViewController. So, this is the code(Login view controller):



 @IBAction func tosAction(_ sender: Any) 

if let vc = UIStoryboard(name: "Login", bundle: nil).instantiateViewController(withIdentifier: kTOSViewControllerIdentifier) as? TermsAndPrivacyViewController

vc.url = URL(string: kTOSUrl)
self.navigationController?.pushViewController(vc, animated: true)





On TermsAndPrivacyViewController, I have this:



override func viewDidLoad() 
super.viewDidLoad()

webView.navigationDelegate = self
if let `url` = url
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true




So, when I hit a button, app crashes SIGABRT message, and nothing else. Also, I don't get any crash report on Firebase Crashlytics (I have detached an app from a debugger first, and produced a crash).



Now, the strange part :/ ... If I put a breakpoint on a first line of tosAction() method, and go step by step (or just let it continue), everything works normally. No crash???



Am I missing something obvious here? What is the reason of crashing? Also, I tried to put Exception Breakpoint but nothing changes. I only get this:



enter image description here



enter image description here



and a console:



console image



so, kinda no information about crash at all.



EDIT



Ok, now the even more strange part :) I just tried app on different phones.



App crashes on iPhone 6s+, iOS 12.1(16B5059d), but it works normally on iPhone 6, iOS 12.0 (16A366)










share|improve this question


























  • Is it crashing on LoginViewController page or in TermsAndPrivacyViewController page ?

    – Badr Filali
    Mar 27 at 13:43











  • I was trying to figure out that, but when it crashes, it goes to first line of AppDelegate (see on pictures) at the moment I tap on a button (on LoginViewController). @BadrFilali

    – Whirlwind
    Mar 27 at 13:44














1












1








1


1






I have two view controllers, LoginViewController and TermsAndPrivacyViewController.



On first view controller, there is a button that has IBAction, which opens TermsAndPrivacyViewController. On TermsAndPrivacyViewController I have web view, that loads url I am passing from LoginViewController. So, this is the code(Login view controller):



 @IBAction func tosAction(_ sender: Any) 

if let vc = UIStoryboard(name: "Login", bundle: nil).instantiateViewController(withIdentifier: kTOSViewControllerIdentifier) as? TermsAndPrivacyViewController

vc.url = URL(string: kTOSUrl)
self.navigationController?.pushViewController(vc, animated: true)





On TermsAndPrivacyViewController, I have this:



override func viewDidLoad() 
super.viewDidLoad()

webView.navigationDelegate = self
if let `url` = url
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true




So, when I hit a button, app crashes SIGABRT message, and nothing else. Also, I don't get any crash report on Firebase Crashlytics (I have detached an app from a debugger first, and produced a crash).



Now, the strange part :/ ... If I put a breakpoint on a first line of tosAction() method, and go step by step (or just let it continue), everything works normally. No crash???



Am I missing something obvious here? What is the reason of crashing? Also, I tried to put Exception Breakpoint but nothing changes. I only get this:



enter image description here



enter image description here



and a console:



console image



so, kinda no information about crash at all.



EDIT



Ok, now the even more strange part :) I just tried app on different phones.



App crashes on iPhone 6s+, iOS 12.1(16B5059d), but it works normally on iPhone 6, iOS 12.0 (16A366)










share|improve this question
















I have two view controllers, LoginViewController and TermsAndPrivacyViewController.



On first view controller, there is a button that has IBAction, which opens TermsAndPrivacyViewController. On TermsAndPrivacyViewController I have web view, that loads url I am passing from LoginViewController. So, this is the code(Login view controller):



 @IBAction func tosAction(_ sender: Any) 

if let vc = UIStoryboard(name: "Login", bundle: nil).instantiateViewController(withIdentifier: kTOSViewControllerIdentifier) as? TermsAndPrivacyViewController

vc.url = URL(string: kTOSUrl)
self.navigationController?.pushViewController(vc, animated: true)





On TermsAndPrivacyViewController, I have this:



override func viewDidLoad() 
super.viewDidLoad()

webView.navigationDelegate = self
if let `url` = url
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true




So, when I hit a button, app crashes SIGABRT message, and nothing else. Also, I don't get any crash report on Firebase Crashlytics (I have detached an app from a debugger first, and produced a crash).



Now, the strange part :/ ... If I put a breakpoint on a first line of tosAction() method, and go step by step (or just let it continue), everything works normally. No crash???



Am I missing something obvious here? What is the reason of crashing? Also, I tried to put Exception Breakpoint but nothing changes. I only get this:



enter image description here



enter image description here



and a console:



console image



so, kinda no information about crash at all.



EDIT



Ok, now the even more strange part :) I just tried app on different phones.



App crashes on iPhone 6s+, iOS 12.1(16B5059d), but it works normally on iPhone 6, iOS 12.0 (16A366)







swift exception crash storyboard swift4






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 13:31







Whirlwind

















asked Mar 27 at 13:10









WhirlwindWhirlwind

11.7k5 gold badges36 silver badges104 bronze badges




11.7k5 gold badges36 silver badges104 bronze badges















  • Is it crashing on LoginViewController page or in TermsAndPrivacyViewController page ?

    – Badr Filali
    Mar 27 at 13:43











  • I was trying to figure out that, but when it crashes, it goes to first line of AppDelegate (see on pictures) at the moment I tap on a button (on LoginViewController). @BadrFilali

    – Whirlwind
    Mar 27 at 13:44


















  • Is it crashing on LoginViewController page or in TermsAndPrivacyViewController page ?

    – Badr Filali
    Mar 27 at 13:43











  • I was trying to figure out that, but when it crashes, it goes to first line of AppDelegate (see on pictures) at the moment I tap on a button (on LoginViewController). @BadrFilali

    – Whirlwind
    Mar 27 at 13:44

















Is it crashing on LoginViewController page or in TermsAndPrivacyViewController page ?

– Badr Filali
Mar 27 at 13:43





Is it crashing on LoginViewController page or in TermsAndPrivacyViewController page ?

– Badr Filali
Mar 27 at 13:43













I was trying to figure out that, but when it crashes, it goes to first line of AppDelegate (see on pictures) at the moment I tap on a button (on LoginViewController). @BadrFilali

– Whirlwind
Mar 27 at 13:44






I was trying to figure out that, but when it crashes, it goes to first line of AppDelegate (see on pictures) at the moment I tap on a button (on LoginViewController). @BadrFilali

– Whirlwind
Mar 27 at 13:44













3 Answers
3






active

oldest

votes


















1














maybe you use library or framework that not supported by those device.
you must see the error



did you try this?



when the app crashing, in the console press cmd+F and search exception.
now you can see your error



hope to helpful.






share|improve this answer

























  • There is nothing in the console. I mean, almost nothing. It says: libc++abi.dylib: terminating with uncaught exception of type NSException

    – Whirlwind
    Mar 27 at 13:29











  • The same code works on other phones. It is very simple and standard code, that always worked. I wonder if it has something with timing...

    – Whirlwind
    Mar 27 at 13:41











  • you sure that you don't delete IBOutlet or Action without disconnecting form ViewController? in the Main.storyboard right click on your ViewController & see you haven't any warning?

    – Abbas Torabi
    Mar 27 at 13:42












  • Nope. IBOutlet for a button, and its IBAction is there.

    – Whirlwind
    Mar 27 at 13:43











  • so just one things left. I think you use the framework or library that not supported on those device. read you're library's documentation. if it isn't really rum

    – Abbas Torabi
    Mar 27 at 13:48



















0














Maybe you can use segue methods inside your LoginViewController.



 @IBAction func tosAction(_ sender: Any) 
performSegue(withIdentifier: "GoToWeb", sender: nil)

}


And call prepareForSegue



override func prepare(for segue: UIStoryboardSegue, sender: Any?) improve this answer

























  • There is nothing in the console. I mean, almost nothing. It says: libc++abi.dylib: terminating with uncaught exception of type NSException

    – Whirlwind
    Mar 27 at 13:29











  • The same code works on other phones. It is very simple and standard code, that always worked. I wonder if it has something with timing...

    – Whirlwind
    Mar 27 at 13:41











  • you sure that you don't delete IBOutlet or Action without disconnecting form ViewController? in the Main.storyboard right click on your ViewController & see you haven't any warning?

    – Abbas Torabi
    Mar 27 at 13:42












  • Nope. IBOutlet for a button, and its IBAction is there.

    – Whirlwind
    Mar 27 at 13:43











  • so just one things left. I think you use the framework or library that not supported on those device. read you're library's documentation. if it isn't really rum

    – Abbas Torabi
    Mar 27 at 13:48

































  • Oh I tried that too (just forgot to mention)... It crashes in a same way, no matter if I use segue or push a view controller :/

    – Whirlwind
    Mar 27 at 13:55











  • I edit my answer maybe it's come from the binding

    – Badr Filali
    Mar 27 at 14:00











  • I would say all looks good. There is one IBAction and one IBOutlet for a button. As I said, it is strange that this code works good on every other phone, other than iPhone6s+...

    – Whirlwind
    Mar 27 at 14:02









share


And call prepareForSegue



override func prepare(for segue: UIStoryboardSegue, sender: Any?) 
improve this answer















Maybe you can use segue methods inside your LoginViewController.



 @IBAction func tosAction(_ sender: Any) 
performSegue(withIdentifier: "GoToWeb", sender: nil)




And call prepareForSegue



override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if (segue.identifier == "GoToWeb")
let vc = segue.destination as! TermsAndPrivacyViewController
vc.url = "YOUR_URL"



And the code inside TermsAndPrivacyViewController don't change



Edit:



Maybe your not binding well your UIButton, can you verify in the right panel, in the section "Show the connection inspector" if your button is call only once.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 27 at 13:59

























answered Mar 27 at 13:54









Badr FilaliBadr Filali

1172 silver badges13 bronze badges




1172 silver badges13 bronze badges















  • Oh I tried that too (just forgot to mention)... It crashes in a same way, no matter if I use segue or push a view controller :/

    – Whirlwind
    Mar 27 at 13:55











  • I edit my answer maybe it's come from the binding

    – Badr Filali
    Mar 27 at 14:00











  • I would say all looks good. There is one IBAction and one IBOutlet for a button. As I said, it is strange that this code works good on every other phone, other than iPhone6s+...

    – Whirlwind
    Mar 27 at 14:02

















  • Oh I tried that too (just forgot to mention)... It crashes in a same way, no matter if I use segue or push a view controller :/

    – Whirlwind
    Mar 27 at 13:55











  • I edit my answer maybe it's come from the binding

    – Badr Filali
    Mar 27 at 14:00











  • I would say all looks good. There is one IBAction and one IBOutlet for a button. As I said, it is strange that this code works good on every other phone, other than iPhone6s+...

    – Whirlwind
    Mar 27 at 14:02
















Oh I tried that too (just forgot to mention)... It crashes in a same way, no matter if I use segue or push a view controller :/

– Whirlwind
Mar 27 at 13:55





Oh I tried that too (just forgot to mention)... It crashes in a same way, no matter if I use segue or push a view controller :/

– Whirlwind
Mar 27 at 13:55













I edit my answer maybe it's come from the binding

– Badr Filali
Mar 27 at 14:00





I edit my answer maybe it's come from the binding

– Badr Filali
Mar 27 at 14:00













I would say all looks good. There is one IBAction and one IBOutlet for a button. As I said, it is strange that this code works good on every other phone, other than iPhone6s+...

– Whirlwind
Mar 27 at 14:02





I would say all looks good. There is one IBAction and one IBOutlet for a button. As I said, it is strange that this code works good on every other phone, other than iPhone6s+...

– Whirlwind
Mar 27 at 14:02











0














To get further information on this type of crashes, open the Breakpoints menu (or press CMD+8), click the plus icon in the bottom left corner and press Exception Breakpoint.... Right click, then edit. Add an action of the type Debugger Command and enter the following:



enter image description here



Reproduce the crash again, this time the console will output a more useful error message.






share|improve this answer





























    0














    To get further information on this type of crashes, open the Breakpoints menu (or press CMD+8), click the plus icon in the bottom left corner and press Exception Breakpoint.... Right click, then edit. Add an action of the type Debugger Command and enter the following:



    enter image description here



    Reproduce the crash again, this time the console will output a more useful error message.






    share|improve this answer



























      0












      0








      0







      To get further information on this type of crashes, open the Breakpoints menu (or press CMD+8), click the plus icon in the bottom left corner and press Exception Breakpoint.... Right click, then edit. Add an action of the type Debugger Command and enter the following:



      enter image description here



      Reproduce the crash again, this time the console will output a more useful error message.






      share|improve this answer













      To get further information on this type of crashes, open the Breakpoints menu (or press CMD+8), click the plus icon in the bottom left corner and press Exception Breakpoint.... Right click, then edit. Add an action of the type Debugger Command and enter the following:



      enter image description here



      Reproduce the crash again, this time the console will output a more useful error message.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Mar 27 at 14:28









      Jan SchlorfJan Schlorf

      7648 silver badges25 bronze badges




      7648 silver badges25 bronze badges






























          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55378040%2fapplication-crashing-without-information-about-crash-when-transitioning-to-anoth%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript