Ctrl+Alt+Del - App dies
Hi!
I'm developing a little game. But today I saw that it dies with an Access violation when Ctrl+Alt+Del was pressed.
Does someone know what the problem might be or where I have to search for the error?
Thank you :)
Application Destroying.
Maybe, you can check that you're not closing something twice (e.g. a window. maybe DestroyWindow() was called twice automatically) or maybe you're not using something like SAFE_RELEASE.
(in case you're not using it, it goes like this:
#define SAFE_RELEASE(x) if (x) delete x; x=0;.
'delete x' is the release of x. if x is a class and not a pointer, then it should be x->Release(); delete x; or something like that.)
I think it can be in some destructor.
Maybe, you can check that you're not closing something twice (e.g. a window. maybe DestroyWindow() was called twice automatically) or maybe you're not using something like SAFE_RELEASE.
(in case you're not using it, it goes like this:
#define SAFE_RELEASE(x) if (x) delete x; x=0;.
'delete x' is the release of x. if x is a class and not a pointer, then it should be x->Release(); delete x; or something like that.)
I think it can be in some destructor.
pex.
Did you try running the app in the debugger - maybe that gives you
the place where it crashes..
If you use ms-vc and for some reason it doesn't crash in debug, try
building a release version with debug info (try line-info only) and
see if it crashes
And you can always try to run the exe from outside the debugger
and when it crashes either 'attach debugger to process' or debug
the crashes process (usually a dlg-box pops up).
the place where it crashes..
If you use ms-vc and for some reason it doesn't crash in debug, try
building a release version with debug info (try line-info only) and
see if it crashes
And you can always try to run the exe from outside the debugger
and when it crashes either 'attach debugger to process' or debug
the crashes process (usually a dlg-box pops up).
visit my website at www.kalmiya.com
Hi!
Well. I don't think that I delete something more than one time, because I don't delete ANYTHING by just pressing CTRL+ALT+DEL. I first thought that OpenGL might get problems with it. But then someone would know that problem here.
I guess I'll really have to debug it.
[Edit]
I just debugged it. It was really a stupid bug. I called a virtual function with a NULL value. I didn't checked if it is NULL.
Sorry for my too fast posted thread without checking it before >.<
Well. I don't think that I delete something more than one time, because I don't delete ANYTHING by just pressing CTRL+ALT+DEL. I first thought that OpenGL might get problems with it. But then someone would know that problem here.
I guess I'll really have to debug it.
[Edit]
I just debugged it. It was really a stupid bug. I called a virtual function with a NULL value. I didn't checked if it is NULL.
Sorry for my too fast posted thread without checking it before >.<
Seems to me that your app is accessing something that is either destroyed when there is lost focus, or that it is trying to access something invalid (such as NULL) Step one could be to check if your app is in focus or not and not do anything until it is in focus.
No no no no! :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement