Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 09-06-2008, 09:59 AM   #12 (permalink)
PhoneyDeveloper
New Member
 
Join Date: Sep 2008
Posts: 1,431
Default

When you see the TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION message there is more info in the Xcode Debugger Console. Open up the console window and look for the kind of exception. As mentioned upthread there are different kinds of exceptions. Looking at the kind of exception will help you to figure out the problem. You can also see the NSLog output in Console.app.

Also, by the time the app is terminated due to the uncaught exception there is no useful backtrace. If you set a breakpoint on objc_exception_throw the debugger will break before the exception is thrown and you'll have a useful backtrace. I do this with a .gdbinit file. Create a file named .gdbinit and place it in your home directory. This is the contents of mine:

fb -[NSException raise]
fb -[_NSZombie release]
fb szone_error
fb objc_exception_throw

It's also possible to set these kinds of breakpoints in the Xcode breakpoints window or in the debugger console.

At any rate, the usual reason for an exception with replaceObjectAtIndex is out of range. Another reason is that your instance variable has already been released due to faulty memory management so you message a stale pointer.
PhoneyDeveloper is offline   Reply With Quote
 

» Advertisements
» Online Users: 326
18 members and 308 guests
ADY, BdR, Diegan, djohnson, Duncan C, F_Bryant, glenn_sayers, Herbie, ilmman, Joseph Nardone, M@realobjects, Profile, rob.mccarthy, rodgo, TheWebWizz, VikMyr, vogueestylee, yomo710
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,876
Threads: 89,225
Posts: 380,705
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jorge599
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:54 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.