Page 1 of 1

Strange error on Close app

Posted: Thu Jan 29, 2009 1:29 pm
by Bear_130278
First-chance exception in Trollbrad.exe (IRRLICHT.DLL): 0xC0000005: Access Violation.
The thread 0x75C has exited with code -1073741819 (0xC0000005).
The program 'Trollbrad.exe' has exited with code -1073741819 (0xC0000005).

I receive this error when exiting the App over Alt+F4 or Just closing the window by cross, but if i close the console window first, there is no error.
I wonder, if anybody experienced the same error?

Posted: Thu Jan 29, 2009 1:38 pm
by JP
maybe the command prompt kills the process when closed but closing the window just exits out of your render loop so it's probably crashing somewhere after your render loop but before returning from main. what's the code after your render loop?

And i suppose a better question would have been... what's your callstack?? run in debug mode and you can find out exactly what line of code crashed ;)

Re: Strange error on Close app

Posted: Thu Jan 29, 2009 1:39 pm
by rogerborg
Bear_130278 wrote:I wonder, if anybody experienced the same error?
We could, if you'd provide source code. ;)

Posted: Thu Jan 29, 2009 1:43 pm
by hybrid
Could be that killing the terminal will just remove the process, without cleaning up everything. Exiting via ALT-F4 or exit button does so, though, so double drop() will show up for sure. Just make sure you don't drop things you shouldn't and it should work without problems.

Posted: Thu Jan 29, 2009 1:59 pm
by Bear_130278
Core.device->drop();
That was it 8)))

10x a lot guys 8)

Posted: Fri Jan 30, 2009 8:34 am
by Munger
For anyone else who gets an error like this, errors on exit under windows are more than likely caused by memory handling errors. The problem is probably in your code. Writing into invalid areas of memory are a common cause: writing outside the bounds of an array, writing into deallocated or unallocated memory, double-deletions etc.

They can be really confusing when you first see them because they quite often won't crash when the actual mistake was made. The crash comes when all the code 'out the back' tries to clean up your memory and finds something a little funny. This means that it won't even seem like the problem is in your code and the break point will be deep inside some system call.

I know now I've said this, someone will come along and point out all the lies and inconsistencies in what I've said. But I hope it helps someone somewhere :-)