Solved

Thread exited code 1

Posted on 2002-07-25
13
466 Views
Last Modified: 2013-11-20
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
0
Comment
Question by:vpomona
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 7179151
Well, if you call:

exit(1);

you'll get your thread exiting with code 1.
0
 

Author Comment

by:vpomona
ID: 7179265
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.
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7179330
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.
0
 

Author Comment

by:vpomona
ID: 7182199
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.
0
 
LVL 8

Accepted Solution

by:
fl0yd earned 200 total points
ID: 7182257
You are right -- you will not find an article like "general guide to thread return codes". The fact being: return codes only have a meaning in the context of the thread that returned it. So the plan of attack:
* find out what thread it is
* find out what a return code of '1' means if returned by this specific thread.

And please, keep the sarcasm to yourself. The amount of information in my previous reply surpasses the amount of information in your question by magnitudes. To sum up the info:
* you explicitly started at least one thread
* there is the possibility of starting further threads implicitly
* a return code of '1' means, the thread in question returned this value
* different threads may have absolutely different meanings for a return code of '1'
* only the thread in question will 'know' what it reported through a specific value
* you also have first-chance exceptions
* short explanation of those
* a possible cause.
0
 

Author Comment

by:vpomona
ID: 7183591
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!
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Expert Comment

by:ComTech
ID: 7189383
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  
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7189435
Could you be a bit more precise, ComTech?
0
 

Expert Comment

by:ComTech
ID: 7189443
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.

http://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
0
 

Expert Comment

by:ComTech
ID: 7189444
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.

http://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
0
 

Expert Comment

by:ComTech
ID: 7189449
I have re-instated the points, as I found his sarcasm above, since you called me back to the question.

CT
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7189574
hmmm, you got me puzzled again, CT. If you don't mind, could you shed some light into your last comment?
0
 

Expert Comment

by:ComTech
ID: 7191026
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

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Unix / Linux grid computing 5 127
fix34  challenge 9 97
sumHeights2  challenge 7 76
How to convert MFC::CString to UTF8 wchar_t* 10 96
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now