Link to home
Start Free TrialLog in
Avatar of vpomona
vpomona

asked on

Thread exited code 1

I am developing using VC++6.0 on Windows NT4 Service pack 6a
I am getting the following showing up in the debug window when I run my application.
Most importantly I see a thread exiting with code 1.
What does this mean, what thread is it?  I haven't started any thread myself.


Loaded 'C:\WINNT\system32\RPCRT4.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msvfw32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\SHELL32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\COMCTL32.DLL', no matching symbolic information found.
Loaded symbols for 'C:\WINNT\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINNT\system32\MSVCRTD.DLL'
Loaded symbols for 'C:\WINNT\system32\MFCO42D.DLL'
Loaded symbols for 'C:\WINNT\system32\MFCN42D.DLL'
Loaded 'C:\WINNT\system32\ctpcint4.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\lz32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ctpcir32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\MCIAVI32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\avifil32.dll', no matching symbolic information found.

Loaded 'C:\WINNT\system32\Msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msacm32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\OLE32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\DivXc32.dll', no matching symbolic information found.
Loaded 'C:\Program Files\Iomega\Tools_NT\IMGHOOK.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\DCIMAN32.DLL', no matching symbolic information found.
Loaded 'C:\Program Files\Microsoft Hardware\Mouse\Msh_zwf.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msidle.dll', no matching symbolic information found.
The thread 0xD1 has exited with code 1 (0x1).
First-chance exception in InstrumentationPC.exe (RPCRT4.DLL): 0x00000006: (no name).
First-chance exception in InstrumentationPC.exe (RPCRT4.DLL): 0x00000006: (no name).
The thread 0xB3 has exited with code 0 (0x0).
The thread 0x7F has exited with code 0 (0x0).
The program 'E:\InstrumentationPC\Debug\InstrumentationPC.exe' has exited with code 0 (0x0).

Thanks Vida
Avatar of jhance
jhance

Well, if you call:

exit(1);

you'll get your thread exiting with code 1.
Avatar of vpomona

ASKER

That all well and good, insightful and informative, but you see I haven't started any threads myself and I furthermore have not called exit(1); I have not seen this along with First chance exception.  I usually see threads exiting with code 0.  Thought there might be a problem for this other than normal exit code.
You have most definately started at least one thread yourself -- after all CWinApp is derived from CWinThread, isn't it? You probably haven't started those other threads explicitly. But there are a number of threads running when calling system functions, for example, when you create a CFileDialog for opening/saving files. The return code of a thread is only valid in the context of the specific thread. It may represent an error -- it may represent success. There is no general rule to it. You will have to find out yourself what thread it is and what the return code means.
The first-chance exceptions are exceptions that were caught in a try-catch-handler. Once again, it could point to a problem as well is being harmless. I know that logitech's mouse drivers do cause this behaviour. Once again, you will have to find out for yourself, what the cause may be.
Avatar of vpomona

ASKER

You will have to find out yourself what thread it is and what the return code means.

Thanks for the well detailed information, very helpful.
Can you please, give me a plan of attack.  I wanted to find out what return codes means.  Searched and searched, to no avail, finally got frustrated and thought I would humbly ask the EE.
ASKER CERTIFIED SOLUTION
Avatar of fl0yd
fl0yd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vpomona

ASKER

I am sorry if you feel that I have been sarcastic with you.
I really thought that you had provided me with a lot of good information in a proffessional manner, but now I am very offended at acusation!
As requested in Community Support, the value of this question was lowered to 50 points, to award fl0yd for his effort.

ComTech
Community Support Administrator  
Experts-Exchange  
Could you be a bit more precise, ComTech?
Hello fl0yd, the CS request is below.

***From: vpomona
Status: Answered. This question is locked until vpomona evaluates the answer.  Points: 0
 Email A Friend  

Please delete this question and give 50pts to floyd, who provided helpful information.

https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=mfc&qid=20328039

Thanks, Vida***

It is how we do things in requests of this type, so we know where the comment came from, this will tie the two together, if we actually delteted the question, we would not have a reference.

Thanks,

CT
Hello fl0yd, the CS request is below.

***From: vpomona
Status: Answered. This question is locked until vpomona evaluates the answer.  Points: 0
 Email A Friend  

Please delete this question and give 50pts to floyd, who provided helpful information.

https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=mfc&qid=20328039

Thanks, Vida***

It is how we do things in requests of this type, so we know where the comment came from, this will tie the two together, if we actually delteted the question, we would not have a reference.

Thanks,

CT
I have re-instated the points, as I found his sarcasm above, since you called me back to the question.

CT
hmmm, you got me puzzled again, CT. If you don't mind, could you shed some light into your last comment?
Hello fl0yd, vpomona had requested that you be awarded 50 of the 200 points here, after re-reading the question, I noted sarcasm from vpomona, and he did in fact apologize for the remark.  So I took 150 points from my own account to award you with the full 200 points, as I felt you have contributed as much to the question.

In my opinion you had answered the question enough to lead to the desired outcome.

CT