-
exe disappears itself in 5-10 minutes
Hi All
I used Windows management Instrumentation, registry access (used RegOpenKeyEx etc.) , & few APIs to build an application.
Now problem is that when i run the program then after 5-10 minutes dialog box(of exe) disappeares automatically.
What should I do to prevent this problem.
Please reply ..
Thanks & Regards.
-
Re: exe disappears itself in 5-10 minutes
To "prevent this problem" you should find out the bug(s) in your program and fix it (them).
If you are not be able to do it yourself and you need our help - please, describe your problem more clearly and post the code or/and a small project reproducing such "erroneous behaviour"...
-
Re: exe disappears itself in 5-10 minutes
Dear Sir\Madam hi
As I have told that program is running well and gives output as required but the problem is that it automatically get disappeared.
So please tell the possible reasons of occuring this and so that I could be able to find & fix the bugs in program if I would not be able then i will send or mail code.
Please reply
Thanks & bye.
-
Re: exe disappears itself in 5-10 minutes
There can be many reasons. For instance the program is written in such a way that after completing some operation it closes. Who have written the program? You? When does this program close? How are error treated? Do they result in program's closure?
Another reason is that some other application closes your program. However, I believe this is rather not the case.
I would suggest to take a look at the program and spot all the places were the program is terminated (a WM_CLOSE message is posted, exit(), ExitProcess() or TerminateProcess() are called, etc. depending on your program).
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
Dear Sir\Madam hi
As I have told that program is running well and gives output as required but the problem is that it automatically get disappeared.
So please tell the possible reasons of occuring this and so that I could be able to find & fix the bugs in program if I would not be able then i will send or mail code.
Thanks & bye.
1. What do you mean by "disappeared"? Does it exit or it only gets hidden?
2. Are there in your program some "exit" calls such as exit(), TerminateProcess(), ExitProcess(), ...?
3. If the program exits "itself" - try to find out the reason: add the WM_DESTROY, WM_CLOSE message handlers in your main dialog class, set break points and debug your program - see if you'll step in one of these message handlers and try to understand - why.
-
Re: exe disappears itself in 5-10 minutes
exe disappears means that application terminates as when we close any application by clicking on "x" button or by pressing "alt+F4".
I neither used any terminate function nor it has been written in such a way that it should be closed after performing any function.
-
Re: exe disappears itself in 5-10 minutes
Well, we are not magicians to remotely spot the problems on your program or PC. I don't see anything else to say that could help you with the information provided so far.
What is your program supposed to do?
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
exe disappears means that application terminates as when we close any application by clicking on "x" button or by pressing "alt+F4".
I neither used any terminate function nor it has been written in such a way that it should be closed after performing any function.
Rajeev, it's really hard to find out the problem with the little info you provided e.g. we even dont know for sure how long it takes the application to exist, it could be 5.9 or 9.6 minutes. Come on, tell us whats the exact number....
HTH,
Regards,
Usman.
-
Re: exe disappears itself in 5-10 minutes
another thing to add here, when your so called dialog "disapper" did you check the task manager to see if your exe is still running?
casue maybe somewhere in your code the window is hiding itself. (SW_HIDE is another thing you should look for in addtion to all the pointers you got from cilu)
but thats only if the exe is still running and you just dont see the dialog.
Cheers
-
Re: exe disappears itself in 5-10 minutes
Quote:
Come on, tell us whats the exact number....
I don't really see how it would help you to know whether the app closes after 7:12 or 9:07 or anything else.
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by cilu
I don't really see how it would help you to know whether the app closes after 7:12 or 9:07 or anything else.
You probably didn't catch the sarcasm :(.
-
Re: exe disappears itself in 5-10 minutes
Code:
try
{
read posts
}
catch( sarcasm& s)
{
lol
}
It's funny to see 2 people fighting to help a 3rd one which doesn't bother to help herself/himself. ;) To the OP: before you start a civil war on CG do post more data about what happens in your app.
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by usman999_1
You probably didn't catch the sarcasm :(.
Ooops... Definitelly not. ;)
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by PadexArt
....
It's funny to see 2 people fighting to help a 3rd one which doesn't bother to help herself/himself. ;)
:thumb: :thumb: :thumb:
-
Re: exe disappears itself in 5-10 minutes
Information related to program are as as follows
1) Program is written in VC++ 6.0.
2) WMI Classes for retrieving system hardware & software Inforamation.
3) Used Registry keys for information retrieval,(here I used RegOpenKeyEx(),RegEnumVale(), RegEnumKey() etc.)
4) Used some APIs for information retrieva(like OS Version, Computer Name, Number of processors etc.)
5) All the property pages are added to sheet in OnInitDialog() function.
6) Also everything is written in OnInitDialog().
7) For every resource(S/W or H/W) a linked list is created .
8) node of Linked list is structure whose attributes are TCHAR and _bstr_t type
9)structures contains all the information retrieved by either WMI, or by Registry or by APIs.
10) Finally values are displayed on property pages through structures.
* I have checked task manager there is no instance of program after termination.
* Time span is not more than 10 mins.
*Program is even terminated when i am continually clicking on varios controls, and tabs of dialog box.
*Also program is even terminated when there are no activities being done on the PC
Please reply .
Thanks
-
Re: exe disappears itself in 5-10 minutes
can you run the application in debug mode?
if so put a break point on the OnClose() or OnDestory() in the dialog or on some destractor when you will get there.... use call stack to see how did you get there....and from here its an easy task.
btw: the app doesnt crash right? casue if its crashing forget what i just said.
Cheers
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
*Program is even terminated when i am continually clicking on varios controls, and tabs of dialog box.
*Also program is even terminated when there are no activities being done on the PC
Please reply .
If still need our help, please, look at the post #2 and try to do what has been suggested:
Quote:
please, describe your problem more clearly and post the code or/and a small project reproducing such "erroneous behaviour"...
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by golanshahar
can you run the application in debug mode?
if so put a break point on the OnClose() or OnDestory() in the dialog or on some destractur when you will get there.... use call stack to see how did you get there....and from here its an easy task.
Cheers
:D
It has been already suggested (in post#5), but... :cry: :cry: OP do NOT want to perform anything....
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by VictorN
:D
It has been already suggested (in post#5), but... :cry: :cry: OP do NOT want to perform anything....
you are right i didnt notice :blush:
Cheers
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by golanshahar
you are right i didnt notice :blush:
Cheers
Don't worry, its not yourth but OP's problem! ;)
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
* I have checked task manager there is no instance of program after termination.
OK.
Quote:
* Time span is not more than 10 mins.
This is likely not to matter.
Quote:
*Program is even terminated when i am continually clicking on varios controls, and tabs of dialog box.
But it doesn't crash, right? There isn't any error message displayed before it's vanished, right?
Quote:
*Also program is even terminated when there are no activities being done on the PC
Did you spot any pattern than leads to program termination?
How big is the code? Can you zip it and post it here (unless it's a proprietary code that should not be made public)?
-
Re: exe disappears itself in 5-10 minutes
A program "disappearing" is also the symptom of an unhandled exception that is terminating the application. If this is the case, looking for WM_CLOSE, or any functions that terminate applications will not find the problem.
Regards,
Paul McKenzie
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by Paul McKenzie
A program "disappearing" is also the symptom of an unhandled exception that is terminating the application. If this is the case, looking for WM_CLOSE, or any functions that terminate applications will not find the problem.
Regards,
Paul McKenzie
Yes, however, the information about this exception has to appear in a debug window!
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by VictorN
Yes, however, the information about this exception has to appear in a debug window!
Are you sure about this? I've come across cases where the cause of the problem was an exception error, stack overflow, etc, and the only way to know this was to run the app under the debugger. Otherwise running the app stand-alone without the debugger shows the app just disappearing into thin air, similar to what the OP describes.
If they are starting their app under the debugger, then yes, all of those cases will be displayed for them when the app crashes, and I don't think the OP has even run their app under the debugger.
Regards,
Paul McKenzie
-
Re: exe disappears itself in 5-10 minutes
Of course, I meant and already (earlier in this thread) suggested OP to debug this Application....
Quote:
Originally Posted by Paul McKenzie
...and I don't think the OP has even run their app under the debugger
It looks like You are right! :sick: :sick:
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
* I have checked task manager there is no instance of program after termination.
* Time span is not more than 10 mins.
*Program is even terminated when i am continually clicking on varios controls, and tabs of dialog box.
*Also program is even terminated when there are no activities being done on the PC
Why not do the simplest thing? Run your app under the debugger. When it "disappears", either it will be an exception (then the debugger will pop a window saying an exception has occured), or the output will display that the application terminated normally, meaning that the application was terminated "on purpose", i.e. an exception didn't cause the termination.
If it is an exception, then you inspect the call stack. If the app terminated normally, then you look into your code to see if something terminates the app prematurely.
Checking task manager and all of those things are nice, but they are not necessary for this problem. Just run your application under a debugger first, and get all of the information necessary to determine *where* in the code the crash or termination is occuring. Then you figure out *why* it happens. It looks like you haven't figured out the "where" yet.
Regards,
Paul McKenzie
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
Information related to program are as as follows
1) Program is written in VC++ 6.0.
2) WMI Classes for retrieving system hardware & software Inforamation.
3) Used Registry keys for information retrieval,(here I used RegOpenKeyEx(),RegEnumVale(), RegEnumKey() etc.)
4) Used some APIs for information retrieva(like OS Version, Computer Name, Number of processors etc.)
5) All the property pages are added to sheet in OnInitDialog() function.
6) Also everything is written in OnInitDialog().
7) For every resource(S/W or H/W) a linked list is created .
8) node of Linked list is structure whose attributes are TCHAR and _bstr_t type
9)structures contains all the information retrieved by either WMI, or by Registry or by APIs.
10) Finally values are displayed on property pages through structures.
* I have checked task manager there is no instance of program after termination.
* Time span is not more than 10 mins.
*Program is even terminated when i am continually clicking on varios controls, and tabs of dialog box.
*Also program is even terminated when there are no activities being done on the PC
Please reply .
Thanks
Information related to program are as as follows
1) Car is build by Ford.
2) I use magnifying glass to check sertain parts in a car.
3) I use wreches size #6 to remove some screws.
4) I read labrl to retrieve information (like Year of manufacturing, Site name, number of cylinders etc.)
5) All the gas is added.
6) Also everything is done before I turn the ignition.
7) For every key (S/W or H/W) I have chain link.
8) Each key has metal and plastic part.
9) My notebook contains information either from looking through magnifying glass or reading labels.
10) Finally I display everything through windshield.
After some time after start my car discontinue running.
* I have checked engine after it stops and it is still there.
* Time span is not more than 10 mins.
* Car stops even id I turn lights and radio on an off continually.
*Also car stops if I do not do a thing.
After reading my explanation, if you will be able to tell me what is stoping engine I will tell you what is wrong with your application.
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by JohnCz
After reading my explanation, if you will be able to tell me what is stoping engine I will tell you what is wrong with your application.
You must have killed an attorney. The engine has the unsual bad habit to stop when running over an attorney. :D:D:D:D. Have I guess correctly? Please, please, tell me I'm right :p.
-
Re: exe disappears itself in 5-10 minutes
Nope, sorry. I did not move the car.
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by JohnCz
Nope, sorry. I did not move the car.
Somebody put a potato up your exhaust pipe.
What do I win?
-
Re: exe disappears itself in 5-10 minutes
Nope, sorry.
I can start it again and it stops.
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by JohnCz
Nope, sorry.
I can start it again and it stops.
Ok, missa give up :D:D! What is it then? :p
-
Re: exe disappears itself in 5-10 minutes
I don’t know, that is why I posted question. :D
-
Re: exe disappears itself in 5-10 minutes
You're sure your program isn't crashing?
-
Re: exe disappears itself in 5-10 minutes
Ok, you don't SW_HIDE or close but the program still terminates. That sounds like an unhandled exception to me. Try running it under the debugger and see if the debugger traps the exception, if not then change the exception handling in the debugger to trap all exceptions and see if anything can enlighten you as to why your program is terminating. It's definitely a bug, you just need to find it.
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by GCDEF
Somebody put a potato up your exhaust pipe.
What do I win?
You win the potato !!
Seriously though rajeev, you haven't provided enough relevant information but as a starting point....
Quote:
Originally Posted by rajeevktripathi
5) All the property pages are added to sheet in OnInitDialog() function.
It may not be significant - but I have always tended to do this in my application's OnInitInstance() function. Are your property pages persistent (i.e. will they still survive, after the OnInitDialog() function has terminated?
Quote:
Originally Posted by rajeevktripathi
6) Also everything is written in OnInitDialog().
7) For every resource(S/W or H/W) a linked list is created .
8) node of Linked list is structure whose attributes are TCHAR and _bstr_t type
9)structures contains all the information retrieved by either WMI, or by Registry or by APIs.
10) Finally values are displayed on property pages through structures
Have you tried missing out any of those steps? If it's practical, try skipping some steps so you end up with a partially working app. Once you have an app that partially works, can that survive longer than 10 mins or does that also get terminated?
-
Re: exe disappears itself in 5-10 minutes
Guys, why are you so agitated? It seems that the OP has deserted this thread... ;)
-
Re: exe disappears itself in 5-10 minutes
My mama was right. **** this world is indeed a cruel place :D
-
Re: exe disappears itself in 5-10 minutes
Hi
I've got C program with a million lines of code in it. It keeps crashing. Any ideas?
thanks
-
Re: exe disappears itself in 5-10 minutes
Quote:
I've got C program with a million lines of code in it. It keeps crashing. Any ideas?
If this is a serious question please create a separate thread.
-
Re: exe disappears itself in 5-10 minutes
Hi all
Infact while dubugging my application I found where I was wrong,
I crrected and get overcome to my problem really this problem was related to memory leak.
thanks a lot for these suggestions.
Dear friends you were getting angry without any mean, any way once ahain thanks for your relevant replies to the question.
Thanks & Regards.
-
Re: exe disappears itself in 5-10 minutes
Quote:
Infact while dubugging my application I found where I was wrong,
I crrected and get overcome to my problem really this problem was related to memory leak.
Great then. But it would be even better if you explain what the actual problem was and how did you fix it, so if others have similar problems and read this thread can fix it too.
-
Re: exe disappears itself in 5-10 minutes
Quote:
Originally Posted by rajeevktripathi
Dear friends you were getting angry without any mean, any way once ahain thanks for your relevant replies to the question.
lol. Should your qeustion been more accurate the answers would have more accurate and this thread would have stopped in the 1st page.
-
Re: exe disappears itself in 5-10 minutes
I know! Car is FORD.
Just kidding... I own two Mustangs.