Application get crashed due to "SIGABRT" in iPhone? - iphone

I am developing iPad Application and did all orientations. But some times the application get crashed due to "SIGABRT" and this is my error log is,
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [15 nan]'
I have used three table view in the apps, so i have added the labels and images are into the table view cell.And i have displayed all the contents are dynamically and set the frame size is also dynamically. Please help me out
Thanks

You're probable getting somewhere a division by zero operation, if your contents are dynamically set. Try to debug your code.

Related

ARKit crashing in iOS 11.3

Since iOS11.3 I'm getting a significant number of new crash reports from my AR measurement app.
The crash description says:
Exception Type: SIGABRT
Exception Codes: #0 at 0x181b112ec
Crashed Thread: 0
Application Specific Information: *** Terminating app due to uncaught exception 'std::invalid_argument', reason: 'extrinsicTransform must have determinant 1.'
The crash is triggered by this line in my code, which is called on didUpdateFrame
NSArray<ARHitTestResult *> *resultArray = [_arsnView hitTest:position types:ARHitTestResultTypeExistingPlaneUsingExtent | ARHitTestResultTypeEstimatedHorizontalPlane];
According to the crash reporting, it happens to about 10% of the sessions (!!!!). Before iOS11.3, I had <0.1% crashes.
I tried feeding the hitTest with different values for position, including NaN etc, but I'm not able to reproduce the crash.
Any ideas?
Thanks!!
UPDATE 1
I checked that the currentFrame is still valid when calling the hitTest. Despite checking this with if(_arsnView.session.currentFrame), the app still shows the same crash :(
Thanks for your help. I found that checking the trackingState before performing the hitTest, resolves the crash. So basically, I'm checking:
if (_arsnView.session.currentFrame.camera.trackingState!=ARTrackingStateNormal)
{
// do not perform hitTest
}
else
{
// perform hitTest
}
In this example, _arsnView is a property from class ARSCNView
Anyone log a bug for this for 11.3? Getting the same effect trying to test an application with 11.3 on an iPhone X
My apologies for the earlier one, last night I was too sleep deprived.
Anyway, I raised a TSI for Apple, and they came back with the following.
Thank you for contacting Apple Developer Technical Support (DTS).
This a known issue when you perform a hit test and the ARCamera’s tracking state is either .notAvailable or .limited.
<https://developer.apple.com/documentation/arkit/arcamera.trackingstate>
The workaround is simply to not hit test when in either of those tracking states. This is also a best practice.
I hope this information suffices to address your concern to your satisfaction.

All IB outlets seems to have disconnected and app crashes (Xcode)

So I'm having a problem with one of my Xcode projects: It seems like all my IB outlets have disconnected (all I see is the empty circle without the dot in the middle next to the line of code, please see the picture).
empty / hollow circles indicating IB outlets aren't connected
All the IB actions seems to be working regardless, with the exception of one. When I try to tap it, my app crashes and I receive the following error message:
"libc++abi.dylib: terminating with uncaught exception of type NSException"
Also the error seems to be located in the AppDelegate file:
Error message in AppDelegate.swift
Does anyone have any idea what's going on here? It has been a while (a few weeks) since I last worked on this project, if that's at all relevant.
Ignore the unfilled circles; they are not causing a problem.
The crash when you tap is not because of an IBOutlet. It is because that object's IBAction (not shown in your screen shot). That is what you need to work on.
First check all Objects IBAction and IBOutlet or reconnect them. Sometime unfilled circles misguide you.
For better compilation you should have an exception handler in the app. Try below link:
https://www.raywenderlich.com/152276/intermediate-debugging-xcode-8
This will help you to find exact place where you are getting issue.
hope this helps.

iOS 7 migration help - Runs in Simulator, but not on device -- app does not load

Disclaimer: I'm helping out on another developer's code (he didn't have the time and the customer wants it fixed quickly) and so I'm not totally familiar with this code.
So the app is built for iOS 6, is in the App Store, and runs great. Until you try opening it on a device running iOS 7 GM. You see the splash-screen for a moment, then it crashes completely. This is causing problems because none of our users can use the app anymore after updating.
I just got the source code and I have been trying to figure it out. It compiles fine, and even runs in the iOS 7 simulator. (Although, of course, the UI needs to be redesigned for iOS 7.)
Here's where it gets weird: when I run it on my iPhone 5 (iOS 7) from Xcode, the app hangs (just like with the App Store version, of course) -- but it's just so weird, considering that in runs in the Simulator.
Good news is that I have some runtime errors that might help to track down the problem. I ran a search that indicates it could be a missing connection in a xib file, but I didn't find one.
Here is the log. If it helps, I can also include the build warnings.
2013-09-20 20:16:55.455 myappname[2514:60b] * Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
* First throw call stack:
(0x2e3d0e8b 0x386ca6c7 0x2e3d0dcd 0x307d5feb 0x307d5eef 0x307d5e7f 0x30b53517 0x30b6373b 0x30c042f1 0x30b56533 0x307ddf43 0x307d9767 0x30b6b411 0x30b67ed5 0x30be7501 0x30be71a1 0x30c03685 0x30bcf53d 0x30c034bf 0x30b55f3d 0x30b55d19 0x30b55609 0x2ed32143 0x30b55495 0x30b62153 0x30b61bd3 0x30c43e13 0x30c8398b 0x30c83961 0x30c82abf 0x30c82663 0x30c8256f 0x5c4d7 0x30bc7425 0x30bc6e6b 0x30bc14b9 0x30b5bbe7 0x30b5aedd 0x30bc0ca1 0x3303c76d 0x3303c357 0x2e39b77f 0x2e39b71b 0x2e399ee7 0x2e304541 0x2e304323 0x30bbff43 0x30bbb1e5 0x5b485 0x38bc3ab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
Thread 1: signal SIGABRT
I really have no idea what is going on.
Any help would be greatly appreciated :)
try to use preferredContentSize to define view size.

App works on iPhone but crash on iPad simulator stuck with launch image on ipad

I am very new to this and hope I am at the right tread asking the right question.
My app has been in the AppStore for a couple of weeks now and always only worked on iPhone. it was rejected because the App does not run on an iPad. The exact reason it was rejected was:
Reasons for Rejection: 2.10: iPhone apps must also run on iPad without
modification, at iPhone resolution, and at 2X iPhone 3GS resolution
When run on iPad 5 simulator, the following error occurs:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
* First throw call stack:
(0x1ba5022 0xf60cd6 0x1b9233e 0x1b931f0 0x18bc04 0x19724f 0x3c3c 0x18a99b 0x418e 0xfd9d4 0xfdbe0 0x4155 0x15159 0x1433f 0x3b18 0x2b0d 0xc1386 0xc2274 0xd1183 0xd1c38 0xc5634 0x14d0ef5 0x1b79195 0x1addff2 0x1adc8da 0x1adbd84 0x1adbc9b 0xc1c65 0xc3626 0x2a60 0x29c5)
terminate called throwing an exception
What do I need to do in Xcode 4.5.1 to make my app run on an iPad?
Do not insert a nil into an array. If you want to express that there is an "empty" object, use the singleton NSNull: [myArray insertObject: [NSNull null] atIndex: myIndex];.
* EDIT *
In case you did not use such code by intention, you should seek for automatic platform-dependent code. Hot candidates are missing or misconnected outlets or actions, platform-specific bundles, or missing or wrong (i.e. with incorrect IDs) elements in NIB/storyboard. However, without seeing your code, everything is guessing. Try to detect the fault by identifying the last place in the code trace, that belongs to your code (not library/framework code).
For Cordova developers, you will get this error if you supply anything in the "Main Interface" dropdown in the General Project Settings. Always leave this blank if you want to target all platforms with a Cordova app.
You can also click all four orientations if you like. Also make sure "Universal" is selected in the devices dropdown.

NSInvalidArgumentException caused by "<null selector>"

we have an iPhone app in the app store where we see a lot of crashes after an update. These crashes did not occure when testing it before submiting it to the app store and we cannot reproduce the crash on our own devices.
Heres the crash message we get:
'NSInvalidArgumentException', reason: '*** -[MessageHeader ]:unrecognized selector sent to instance 0x4551450'
The source that causes this message is:
[self fireDelegateIfRegisteredMessageId:header.messageID andMessage:message];
The only place where MessageHeader is referenced is "header.messageID" but I am wondering how this selector would become nil. Also that same statement is used on various places above this line and it worked there.
What could cause this problem? Espacility what could cause an selector to become nil except the following code?
SEL selectorTest = nil;
[self performSelector:selectorTest]
I had a similar problem. My problem was a buffer overflow shortly before the line who caused the exception. It was some quick and dirt feature adding and forgot to check it thoroughly.
I used to write 16 Bytes in a 8 Bytes big buffer. The exception uccured only on device and not in simulator or debug builds. It was really an anoying bug.