Crash on startup

delphi package - automated exception handling
Post Reply
busterc
Posts: 16
Joined: Thu Jun 23, 2011 10:57 am

Crash on startup

Post by busterc »

Hi,
In the call stack below, if I'm reading it right, it looks like an unhandled exception is being raised in the MsgHandlerWindow's window procedure.
I think it occurs in low-memory conditions. Whether this is a structured exception from OS code or a Delphi exception from madExcept's code (or our code) I can't tell.
We only get these reports when our app is run as .\LocalSystem. (That's not supposed to happen and will stop soon.)

I only mention it in case you think it's worthwhile from madExcept's point of view to catch exceptions here. I'm not too bothered about debugging exactly how our application fails to start when there is no memory :)

Code: Select all

775d4e93 +0000 ???
776d6cd6 +0081 ntdll.dll                          RtlRaiseStatus
776afd64 +00f4 ntdll.dll                          RtlUnwind
0040af36 +00d2 ourapp.exe System          38 +0 @HandleAnyException
776d6cd6 +0081 ntdll.dll                          RtlRaiseStatus
776d6b62 +000a ntdll.dll                          KiUserExceptionDispatcher
776d6b3b +002b ntdll.dll                          KiUserCallbackDispatcher
001ebf36 +002e USER32.dll                         CreateWindowExA
0041c637 +003f ourapp.exe Winapi.Windows        CreateWindowExA
00443b9e +01be ourapp.exe madTools              MsgHandlerWindow
00443d59 +0015 ourapp.exe madTools              AddMsgHandler_
00443ee8 +0004 ourapp.exe madTools              AddMsgHandler
00486931 +0009 ourapp.exe madExcept             InitFireHandlers
004b60aa +115e ourapp.exe madExcept             Init
01185804 +00a4 ourapp.exe madExcept             initialization
0040b5fa +0042 ourapp.exe System          38 +0 InitUnits
0040b663 +003f ourapp.exe System          38 +0 @StartExe
00413596 +0042 ourapp.exe SysInit               @InitExe
0118d338 +000c ourapp.exe Ourapp       210 +0 initialization
7752efaa +0010 KERNEL32.dll                       BaseThreadInitThunk
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Crash on startup

Post by madshi »

Well, given that you got a callstack, exception catching already seems to work fine?
busterc
Posts: 16
Joined: Thu Jun 23, 2011 10:57 am

Re: Crash on startup

Post by busterc »

I'm not sure. It looks like an unreported exception was raised while initialising (part of) madExcept, and while handling that, the CPU jumped to an invalid address and caused an access violation. Then the access violation was reported. I'm more interested in what the unreported exception was. (But not /very/ interested, if it only happens when there's no memory :D)

EDIT: This might have been clearer if I had included these fields from the header section. Sorry!

Code: Select all

exception number   : 1
exception class    : EAccessViolation
exception message  : Access violation at address 775D4E93 in module 'mpsclint.exe'. Read of address 775D4E93.
Last edited by busterc on Mon Feb 25, 2019 4:12 pm, edited 1 time in total.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Crash on startup

Post by madshi »

You're right, could be that the callstack is from an internal madExcept crash, which occurred when trying to handle the original crash. Usually in this situation, both callstacks are shown. Not in this case, it seems. All of these problems might be related to being low on memory, of course.
Post Reply