Re: Multithreaded app runs, but not in dubeugger
Re: Multithreaded app runs, but not in dubeugger
- Subject: Re: Multithreaded app runs, but not in dubeugger
- From: James Bucanek <email@hidden>
- Date: Fri, 1 Sep 2006 08:11:45 -0700
Trygve Inda wrote on Thursday, August 31, 2006:
>I have an app that runs fine from Finder, but when running in the debugger I
>get all kinds of strange crashes. It is a multithreaded app written in
>Carbon using MPTasks. The code is mature and has been a shipping app for
>several years.
>
>Xcode 2.3.
>
>Some of the errors I get are:
>
>[Switching to process 18766 thread 0x3103]
>warning: Couldn't raise load state for requested shlib: "Foundation" for
>breakpoint 12.
>
>(gdb) continue
>Program received signal: "EXC_ARITHMETIC".
<remaining debugger pain snipped>
I have no idea if this will solve your problem, but I've gone through two or three rounds with the debugger where it would crash, or the application would crash, for no apparent reason. Sometimes just stepping through code would make it crash, or not, depending on where I set the breakpoints. It was maddening.
I've found two things help:
1) Make sure you don't have any stray breakpoints. Open the breakpoints window and delete all of the breakpoints. Close the project and reopen it. If you have breakpoints that won't go away (a problem with earlier 2.2 and 2.3 versions of Xcode), close the project and throw away your <your-name>.pbxuser file in the project package.
2) Turn off data formatters. I find that this is my #1 source of bizarre debugger problems. If anything in the data formatters causes problems (invalid pointers/refs, divide by zeros, incomplete objects, anything that causes exceptions to be thrown), it can create havoc in the debugger. For grins, set a breakpoint in a function that gets invoked by a data formatter. ;)
James Bucanek
____________________________________________________________________
Author of Beginning Xcode ISBN: 047175479X
<http://www.beginningxcode.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden