Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 6, 2010, 05:46 AM   #1
seepel
macrumors 6502
 
Join Date: Dec 2009
Tracking down EXC_BAD_ACCESS

I have an app that when run normally crashes silently, nothing printed to the console whatsoever. When run in build and debug I finally get that familiar EXC_BAD_ACCESS at the bottom (nothing shows up with bt though), along with some nonsense that I can't decipher in the debugger window. I've tried to find the problem with NSLog, but as far as I can tell all my functions get hit and finish. I've also tried turning on NSZombies, nut I don't think I fully understand this process. There is a lot of code, and I'm not sure where the problem is so I'm not posting it, but I am wondering if anyone has any good strategies for this kind of thing?
__________________
Free iOS App that turns your music library into an info graphic.
Phonographic
seepel is offline   0 Reply With Quote
Old Jul 6, 2010, 07:23 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Can you post the nonsense you can't understand from the debugger?
robbieduncan is offline   0 Reply With Quote
Old Jul 6, 2010, 07:31 AM   #3
seepel
Thread Starter
macrumors 6502
 
Join Date: Dec 2009
Quote:
Originally Posted by robbieduncan View Post
Can you post the nonsense you can't understand from the debugger?
Well here's the back trace (which for some reason I didn't see before...) and the debugger just seems to have a bunch of memory locations I can click through, not sure what to do with them though. Now it suddenly appears to be a problem with core data.. but still quite cryptic to me.

Code:
(gdb) bt
#0  0x02b50c97 in objc_msgSend ()
#1  0x04b74f30 in ?? ()
#2  0x0296c012 in __CFArrayReleaseValues ()
#3  0x0294aed0 in _CFRelease ()
#4  0x0278b999 in -[_PFManagedObjectReferenceQueue _processReferenceQueue:] ()
#5  0x027bd54a in _performRunLoopAction ()
#6  0x029a3a52 in __CFRunLoopDoObservers ()
#7  0x02970345 in CFRunLoopRunSpecific ()
#8  0x0296f8a8 in CFRunLoopRunInMode ()
#9  0x032b289d in GSEventRunModal ()
#10 0x032b2962 in GSEventRun ()
#11 0x002e2372 in UIApplicationMain ()
#12 0x00002a08 in main (argc=2, argv=0xbfffef54) at /Users/slynch/Documents/src/Pigeon/main.m:14
__________________
Free iOS App that turns your music library into an info graphic.
Phonographic
seepel is offline   0 Reply With Quote
Old Jul 6, 2010, 10:04 AM   #4
PhoneyDeveloper
macrumors 68030
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
http://www.sealiesoftware.com/blog/a...c_msgSend.html
PhoneyDeveloper is offline   0 Reply With Quote
Old Jul 6, 2010, 12:31 PM   #5
seepel
Thread Starter
macrumors 6502
 
Join Date: Dec 2009
So I tracked down the problem, and of course, I over released an object. I set an object contained in an autoreleased object, to autorelease again and it got all messed up. Although I didn't learn anything about debugging, I simply used the old NSLog method...
__________________
Free iOS App that turns your music library into an info graphic.
Phonographic
seepel is offline   0 Reply With Quote
Old Jul 6, 2010, 01:45 PM   #6
themoonisdown09
macrumors 601
 
themoonisdown09's Avatar
 
Join Date: Nov 2007
Location: Georgia, USA
Quote:
Originally Posted by seepel View Post
So I tracked down the problem, and of course, I over released an object. I set an object contained in an autoreleased object, to autorelease again and it got all messed up. Although I didn't learn anything about debugging, I simply used the old NSLog method...
The easiest way to track down EXC_BAD_ACCESS errors is by turning on Zombies. Read this post to find out how to do that. It sure has helped me.
themoonisdown09 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: EXC_BAD_ACCESS problem larswik iPhone/iPad Programming 0 Jan 27, 2014 08:33 PM
Best easy way to debug EXC_BAD_ACCESS code 1 moonman239 iPhone/iPad Programming 25 Nov 6, 2013 11:18 PM
EXC_BAD_ACCESS - Trying to retrieve string from NSArray moonman239 iPhone/iPad Programming 12 Sep 9, 2013 07:06 AM
Please Help: EXC_BAD_ACCESS error stevegreen22 Mac Programming 4 Nov 19, 2012 06:16 PM
Getting crazy also with EXC_BAD_ACCESS jivaro Mac Programming 5 Jun 1, 2012 08:49 PM

Forum Jump

All times are GMT -5. The time now is 09:55 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC