-
August 22nd, 2006, 09:21 AM
#1
debugging doubt
when i was debugging my application statement by statement, suddenly it went to 'run' state and in the debug window i see "the thread <hex no> has exited with code 0". it happend couple of times.....
can anybody say why does this happens?
Thanx in advance,
-
August 22nd, 2006, 04:12 PM
#2
Re: debugging doubt
Create a simplified app with some previous code and see if it happen again. If it is yes, you can post the simplified app and let guru help you to figure out the problem.
There is one absolute truth that there is no such thing as absolute truth.
-
August 22nd, 2006, 04:28 PM
#3
Re: debugging doubt
I'm just guessing, but are you using multiple threads? As you step, the debugger will let other threads in your application run. Perhaps one (or more) of them have finished running. IIRC, the debugger only debugs one thread at a time. I could be mistaken, though (it's been a while since I debugged multiple threads at once).
Viggy
-
August 22nd, 2006, 05:29 PM
#4
Re: debugging doubt
Its as simple as the message, the thread of ID (shown by hex value) exited with return code(shown), this is one the thread which was started by your application under debugger.
Regards,
Ramkrishna Pawar
-
August 23rd, 2006, 12:06 AM
#5
Re: debugging doubt
This Means Some Error is There in your Code. it's near to crash. it can be or can't be. So better Check you Files once again and try to Find What's wrong you had done in your code.and this is not simple like a message.
Thanx
-
August 23rd, 2006, 06:46 AM
#6
Re: debugging doubt
Originally Posted by humptydumpty
This Means Some Error is There in your Code. it's near to crash. it can be or can't be. So better Check you Files once again and try to Find What's wrong you had done in your code.and this is not simple like a message.
Thanx
Just because a thread ends with exit code 0 (as the OP states) does not indicate any error in your code.
When a thread ends, an exit code is posted - usually a 0 exit code means the thread ended without error. A non-zero code i normally used to indicate some error or other condition from the thread.
As for why your program just starts running when you press the single-step, it would be nearly impossible to tell without seeing the code or a sample (simple) application that reproduces the result.
It could also be a thread that your code didn't start explicitly, but perhaps something else did. For example, our antivirus software hooks into just about everything, and I frequently see messages about its threads ending.
Hope that helps.
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
-
August 23rd, 2006, 07:16 AM
#7
Re: debugging doubt
Originally Posted by humptydumpty
This Means Some Error is There in your Code. it's near to crash. it can be or can't be. So better Check you Files once again and try to Find What's wrong you had done in your code.and this is not simple like a message.
Thanx
I dont think this is any good idea.
Last edited by Krishnaa; August 23rd, 2006 at 09:35 AM.
Regards,
Ramkrishna Pawar
-
August 23rd, 2006, 07:44 AM
#8
Re: debugging doubt
Yes i know. Krishna it's depend some time dues to this i got Mislaneous bugs in my Program.sometime it's also related with Memory leek Also.
Now, let's see Garbage Collection in action in a simple MFC Dialog Box application. Run your program in Debug mode and start debugging. If I am using garbage collection, here is the output from the output window:
Code:
Loaded 'C:.DLL', no matching symbolic information found.
Loaded 'C:.DLL', no matching symbolic information found.
The thread 0x744 has exited with code 0 (0x0).
The program 'D:.exe' has exited with code 0 (0x0).
There is no memory leak. Now, if I am neither doing garbage collection, nor I am manually deleting the object, here is the output:
Code:
Loaded 'C:.DLL', no matching symbolic information found.
Loaded 'C:.DLL', no matching symbolic information found.
Detected memory leaks!
Dumping objects ->
{65} normal block at 0x002F2C80, 16 bytes long.
Data: < ,/ > 00 00 00 00 80 2C 2F 00 CD CD CD CD CD CD CD CD
Object dump complete.
The thread 0x50C has exited with code 0 (0x0).
The program 'D:.exe' has exited with code 0 (0x0).
You can see the memory dumps. There is memory leak of 16 bytes.
Thanx
Last edited by humptydumpty; August 23rd, 2006 at 07:48 AM.
-
August 23rd, 2006, 08:49 AM
#9
Re: debugging doubt
Originally Posted by humptydumpty
This Means Some Error is There in your Code. it's near to crash. it can be or can't be. So better Check you Files once again and try to Find What's wrong you had done in your code.and this is not simple like a message.
Is that a joke?
Ha, ha!
-
August 23rd, 2006, 08:53 AM
#10
Re: debugging doubt
Originally Posted by humptydumpty
Yes i know. Krishna it's depend some time dues to this i got Mislaneous bugs in my Program.sometime it's also related with Memory leek Also.
Now, let's see Garbage Collection in action in a simple MFC Dialog Box application. Run your program in Debug mode and start debugging. If I am using garbage collection, here is the output from the output window:
Code:
Loaded 'C:.DLL', no matching symbolic information found.
Loaded 'C:.DLL', no matching symbolic information found.
The thread 0x744 has exited with code 0 (0x0).
The program 'D:.exe' has exited with code 0 (0x0).
There is no memory leak. Now, if I am neither doing garbage collection, nor I am manually deleting the object, here is the output:
Code:
Loaded 'C:.DLL', no matching symbolic information found.
Loaded 'C:.DLL', no matching symbolic information found.
Detected memory leaks!
Dumping objects ->
{65} normal block at 0x002F2C80, 16 bytes long.
Data: < ,/ > 00 00 00 00 80 2C 2F 00 CD CD CD CD CD CD CD CD
Object dump complete.
The thread 0x50C has exited with code 0 (0x0).
The program 'D:.exe' has exited with code 0 (0x0).
You can see the memory dumps. There is memory leak of 16 bytes.
Thanx
What does this have to do with the topic?
-
August 23rd, 2006, 09:39 AM
#11
Re: debugging doubt
Originally Posted by humptydumpty
Yes i know. Krishna it's depend some time dues to this i got Mislaneous bugs in my Program.sometime it's also related with Memory leek Also.
Now, let's see Garbage Collection in action in a simple MFC Dialog Box application. Run your program in Debug mode and start debugging. If I am using garbage collection, here is the output from the output window:
Code:
Loaded 'C:.DLL', no matching symbolic information found.
Loaded 'C:.DLL', no matching symbolic information found.
The thread 0x744 has exited with code 0 (0x0).
The program 'D:.exe' has exited with code 0 (0x0).
There is no memory leak. Now, if I am neither doing garbage collection, nor I am manually deleting the object, here is the output:
Code:
Loaded 'C:.DLL', no matching symbolic information found.
Loaded 'C:.DLL', no matching symbolic information found.
Detected memory leaks!
Dumping objects ->
{65} normal block at 0x002F2C80, 16 bytes long.
Data: < ,/ > 00 00 00 00 80 2C 2F 00 CD CD CD CD CD CD CD CD
Object dump complete.
The thread 0x50C has exited with code 0 (0x0).
The program 'D:.exe' has exited with code 0 (0x0).
You can see the memory dumps. There is memory leak of 16 bytes.
Thanx
Are you trying to say, if VC++ output windows shows "The thread 0x*** has exited with code *." then it might be related to memory leaks ? thats not true, it never is. That message is only meant to tell debugging user that thread exited, thats it, nothing more.
Regards,
Ramkrishna Pawar
-
August 23rd, 2006, 10:57 PM
#12
Re: debugging doubt
Originally Posted by ovidiucucu
Is that a joke?
Ha, ha!
Yes Ovi it can be a Memory leak Fine
here is a Link Just go witht his.
may be you Will Found Someuseful infor here. And One More thing i am pretty Sure it can be
http://www.codeproject.com/cpp/autom...c_using_sp.asp
Thanx
-
August 23rd, 2006, 11:12 PM
#13
Re: debugging doubt
Originally Posted by humptydumpty
Now if this is not a joke, then this is a serious problem with your reasoning, I mean no offence but I think you are talking meaningless.
Regards,
Ramkrishna Pawar
-
August 24th, 2006, 01:00 AM
#14
Re: debugging doubt
even in assignment statement it happens and when i stop and debug again it doesn't happens in the same statement....
at random places the thread exits and goes to run mode....
our application is single threaded.
-
August 24th, 2006, 01:14 AM
#15
Re: debugging doubt
Last edited by humptydumpty; August 24th, 2006 at 01:18 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|