Huh?

delphi package - automated exception handling
Post Reply
The_CyberShadow
Posts: 23
Joined: Mon May 02, 2005 7:01 pm
Contact:

Huh?

Post by The_CyberShadow »

Code: Select all

date/time         : 2005-05-02 19:07
computer name     : CYBERSHADOW
user name         : Vladimir
operating system  : Windows XP Service Pack 2 build 2600
system language   : Russian
system up time    : 28 minutes 53 seconds 
program up time   : 1 minute 35 seconds 
processor         : AMD Athlon(tm) XP 2500+
physical memory   : 93/447 MB (free/total)
free disk space   : (C:) 5,65 GB
display mode      : 1152x864, 32 bit
process id        : $dc0
executable        : PolyFinder.exe
exec. date/time   : 2005-05-02 14:34
version           : 0.0.0.20
madExcept version : 2.7e
exception class   : EAccessViolation
exception message : Access violation at address 004A207E in module 'PolyFinder.exe'. Read of address 00000001.

main thread ($6ac):
004a207e PolyFinder.exe madTools        MsgHandlerWindow
004a171c PolyFinder.exe madTools        initialization
77d4e900 USER32.dll                     CallWindowProcA
7c90eae0 ntdll.dll                      KiUserCallbackDispatcher
77d4b8fe USER32.dll                     SendMessageW
77d4e900 USER32.dll                     CallWindowProcA
7c90eae0 ntdll.dll                      KiUserCallbackDispatcher
77d4d825 USER32.dll                     UpdateWindow
77d4e900 USER32.dll                     CallWindowProcA
7c90eae0 ntdll.dll                      KiUserCallbackDispatcher
77d5f3de USER32.dll                     SendMessageA
004a2f2c PolyFinder.exe madTools        Unmangle
004a15e1 PolyFinder.exe madStrings      AnsiToWideEx
0049aa33 PolyFinder.exe System     3467 GetParamStr
7c90f0a5 ntdll.dll                      RtlAnsiStringToUnicodeString
77d4e900 USER32.dll                     CallWindowProcA
7c90eae0 ntdll.dll                      KiUserCallbackDispatcher
77d4b8fe USER32.dll                     SendMessageW
77d4e900 USER32.dll                     CallWindowProcA
77d496c2 USER32.dll                     DispatchMessageA
004a48d4 PolyFinder.exe madDisAsm       DisAsmModRm

modules:
[nothing interesting]

hardware:
[nothing interesting]

disassembling:
[...]
004a206a   jno     loc_4a2071
004a206c   call    -$9e909 ($403768)
004a2071   mov     edx, [$4abe00]         ; crypt2dwords
004a2077   mov     eax, [edx+eax*8+4]
004a207b   lea     edx, [ebp-$2c]
004a207e > mov     ecx, [eax]
004a2080   call    dword ptr [ecx]
004a2082   mov     eax, [ebp-$2c]
004a2085   push    eax
004a2086   mov     ecx, 4
004a208b   mov     edx, $f
[...]
Hard to reproduce... this is probably triggered by an exception in my app, and madExcept crashes inside itself?

By the way... "system language" doesn't actually show what's the language of the OS UI texts, but the language set in the locale options - my XP is English...
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

This callstack looks quite chaotic to me. Do you use the feature "append map file to binary"?

About the language: I'm using this function:

Code: Select all

function GetOsLanguageString : string;
var arrCh : array [0..MAX_PATH] of char;
begin
  if GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SENGLANGUAGE, arrCh, MAX_PATH) > 0 then
       result := arrCh
  else result := '';
end;
Any idea why that shouldn't work? Maybe LOCALE_SENGLANGUAGE or LOCALE_NOUSEROVERRIDE works better?
The_CyberShadow
Posts: 23
Joined: Mon May 02, 2005 7:01 pm
Contact:

Post by The_CyberShadow »

madshi wrote:This callstack looks quite chaotic to me. Do you use the feature "append map file to binary"?
Yes... exceptions occur in other parts of the program, and the report looks ok.
madshi wrote:About the language: I'm using this function:
[...]
Any idea why that shouldn't work? Maybe LOCALE_SENGLANGUAGE or LOCALE_NOUSEROVERRIDE works better?
LOCALE_NOUSEROVERRIDE didn't seem to have any effect. A bit of Googling revealed this:
http://www.multilizer.com/support/faq/a ... asp?id=556
That code outputs "English (United States)" on my machine, as it should.
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

That whole bugreport really doesn't make any sense. E.g. the exception location is being reported as "004a207e madTools.MsgHandlerWindow". But the disassembling mentions "crypt2dwords" which is not even referenced in madTools at all!

Are you really totally sure that this build of PolyFinder has the map file integrated in the exe? This whole situation would make sense to me only if the map file is not integrated into the exe. It all seems like madExcept uses a wrong map file or a wrong version of the map file.

About the language stuff: Thanks for the information! I might integrate that into madExcept...
The_CyberShadow
Posts: 23
Joined: Mon May 02, 2005 7:01 pm
Contact:

Post by The_CyberShadow »

Ah, I think I found the problem... UPX causes porblems with madExcept, as I over-heard on this forum, right? That figures...

Sorry for the false alarm :)
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Yeah, when using UPX the callstacks are bogus. UPX changes the header of the exe file and doesn't change it back after uncompressing. I've already complained about that to the UPX guys, but didn't get any reply.
Post Reply