iOS: Scrolling TableView leads to NSException without details - ios

I have a tableview and get the error
libc++abi.dylib: terminating with uncaught exception of type NSException
if I start scrolling the table. If I jump to other table position with help of the section indices on the right there is no problem. Only the scrolling causes the crash.
What is really weired is that I do not get any further infos. Non of the threads points to my code and I tried it with XCode 8 and XCode 8.1 beta 2.
Usually XCode tells me what the problem is. Also I made sure that all indices are in its bounds, etc.
Any idea how to debug this?

Related

Thread 1: Signal sigabrt. No idea how to solve this

Launching a calculator app I'm making following along Lynda's "Programming for Non-Programmers" course. Literally launching the simulator for the first time, and I get this error message in my AppDelegate.swift code section:
Thread 1: Signal sigabrt
My debugger reads:
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
This is all greek to me. Any help is much appreciated!
This could be a few things. In your view controller, there should be three buttons on the top. Right click on the left one and it will show you a list of IBOutlet connections. Delete any that have an alert triangle next to them. If that doesn't solve your problem, try reading a little further up in your debugger to see if it says anything that gives more detail.

'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN' exception

My app throws the following exception error after I press a UIButton which changes from a 'play' image to a 'pause' image. It doesn't always happen immediately, sometimes it happens when I pop to my root viewcontroller.
Note: It only happens in iOS 9.x, while in iOS 10.x works perfectly
After hours of experimenting and searching, I discovered that the error was produced, because I was using vector pdf images in my project for that specific UIButton. As soon as I replaced them with their equivalent png files, the exception stopped occurring.
(Note: if someone finds out why this happens please post it)

iOS App crashes after migrating to swift3 during navigation

I have migrated my project to Swift3 and after conversion the app crashes whenever I click on any button which loads a new screen. The crash happens in the assembly code so am not able to figure out what's the issue. Control leaves the existing class then goes to assembly language and then crash just before loading the new screen.
This is the error message am getting
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_SwiftValue pointSize]: unrecognized selector sent to instance 0x61000005fb00'
Crash is not happening in any specific code so its difficult identify the error. Please help me to figure this out.
You maybe have a outlet from your storyboard (label, textfield, uiButton...) that is not map anymore in your controller. You should check each component to see if you didn't delete the reference in the controller and no in the storyboard...

How do I identify where a "NSArrayM was mutated while being enumerated" is coming from

I sometimes get this error:
*** Terminating app due to uncaught exception 'NSGenericException', reason:
'*** Collection <__NSArrayM: 0x170057580> was mutated while being enumerated.'
I understand that I'm mutating an array while using fast enumeration, but I can't figure out how to identify where this issue is happening. The stack trace shows me absolutely nothing, and other than just randomly setting breakpoints and guessing until I find it, I can't figure out a good way to zero in on where this is happening.
Is there some kind of breakpoint magic I can do so the compiler shows me where this happens? Or can I use NSZombies to somehow identify this? Any help would be much appreciated.
See how to set an exception breakpoint:
https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html
But in the latest Xcode you only need to do these steps:
In the bottom-left corner of the breakpoints navigator, click the Add button.
Choose Add Exception Breakpoint.
You then get this in the breakpoint navigator
Your code will now break when the exception is thrown rather than when it is caught. You should be able to navigate the call stack to see where in your code the exception is occurring.

creating a simple Master Detail (Split View) app for iPad in Xcode 4.2

Can anyone help in creating a simple Master Detail (Split View) app for iPad in Xcode 4.2?
I managed to get this done quite easily using previous version of xcode, but in xcode4.2, similar code is giving me the error
Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:]: row (0) beyond bounds (0) for section (0).'
* First throw call stack:
i just can't find Master Detail iPad tutorials for xcode 4.2 on the web.
I want to try learning storyboarding and the new features so reverting to a previous version is not really what i want.
Will appreciate any one's help!
On the story board, click on the tableView and change the content to:
Dynamic Prototypes

Resources