 |
 |
Strange debug behaviour in Project Builder
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
I'm trying to debug an "EXEC_BAD_ACCESS" problem in an application I'm working on, and while using a debug breakpoint and then the "Step Into" button (or Step Over - I get the same behaviour), I'm seeing control jump back and forth (within one simple statement block) instead of just proceeding normally from one statement to the next.
When control gets to the first NSLog statement, nothing is actually logged, and then it skips the next NSLog statement altogether and goes on to the next statements (a method call), and then it jumps back to the first NSLog and actually logs something this time, and then proceeds to the other statements again, going all the way through and then crashing at the last one.
Has anyone seen this kind of behaviour before? Does anyone have an explanation?
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Jun 2001
Location: Savoy, IL USA
Status:
Offline
|
|
One thing that GDB (and therefore, PB debug) doesn't handle very well is multi-threaded apps. While you can see stacktraces of the different threads, I'm not sure that if you have two threads simultaneously running while debugging what will happen. Is it possible that this section of code has two threads in it at the same time?
Maybe could you post the block that is having the problem? I'm only asking because it's hard to tell what could be going on without more info. Also, what language are you seeing this in (Obj-C, Java, C/C++)? If it's something for your company, I would say don't post it, since you don't want to get into trouble, but if it's just a private project or something...
|
Software Architect, CodeTek Studios, Inc.
12" AlBook 867 (Combo drive) 640 MB/40 GB (work development machine) -- TiBook 400MHz/384MB/10GB (home machine)
CodeTek VirtualDesktop Pro: Power multitasking! -- DockExtender: Powerful, efficient launcher for Apps, Docs and everything else!
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status:
Offline
|
|
No, it was only single threaded (although shortly after posting, I made it multi-threaded to get around another completely seperate problem).
The interesting this was that I resolved the bug in the code, and it seems that it was unrelated to the strange behaviour of the debugger. Ie, although the trace line was skipping back and forth a bit at first, it didn't seem to affect the actual execution.
Very odd.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|