mad except raised an error, call stack is not clear

delphi package - automated exception handling
Post Reply
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

mad except raised an error, call stack is not clear

Post by emailaya »

following is the bug report i sent to myself
the data is not so clear since it seems that all the
call stack is taken from delphi sources only
im not sure how exactly to read it
thanks

date/time : 2005-10-27, 17:41:39, 970ms
computer name : AMOS
user name : amos.szust <admin>
operating system : Windows XP Service Pack 2 build 2600
system language : Hebrew
system up time : 4 days 8 hours
program up time : 29 minutes 35 seconds
processors : 2x Intel(R) Pentium(R) 4 CPU 3.20GHz
physical memory : 355/1007 MB (free/total)
free disk space : (C:) 36.27 GB
display mode : 1152x864, 32 bit
process id : $658
allocated memory : 17.65 MB
executable : eMailaya.exe
exec. date/time : 2005-10-27 17:08
madExcept version : 3.0
application version : 1.5.0
callstack crc : $c7605150, $d30b84b5, $cb6d5e9e
contact name : amos
contact email : amos@emailaya.co.il
exception class : EInvalidOperation
exception message : Control '' has no parent window.

main thread ($fa8):
004c8473 +0bf eMailaya.exe Controls 5991 +9 TWinControl.CreateWnd
004a59f6 +00a eMailaya.exe ComCtrls 13636 +1 TCustomListView.CreateWnd
004c89f6 +01e eMailaya.exe Controls 6121 +3 TWinControl.CreateHandle
004cc350 +02c eMailaya.exe Controls 7796 +4 TWinControl.HandleNeeded
004cc368 +00c eMailaya.exe Controls 7802 +1 TWinControl.GetHandle
004a71b8 +00c eMailaya.exe ComCtrls 14301 +1 TCustomListView.GetSelCount
004a8d2f +033 eMailaya.exe ComCtrls 15119 +4 TCustomListView.SetSelected
0046ce45 +101 eMailaya.exe Classes 9339 +22 CheckSynchronize
004ec86e +0e2 eMailaya.exe Forms 7240 +13 TApplication.Idle
004ebc52 +01e eMailaya.exe Forms 6892 +1 TApplication.HandleMessage
004ebede +0a6 eMailaya.exe Forms 6976 +16 TApplication.Run
0061dfc7 +28b eMailaya.exe eMailaya 72 +30 initialization

thread $db8:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by main thread ($fa8) at:
771d9260 WININET.DLL

thread $5a8:
7c90eb94 ntdll.dll KiFastSystemCallRet

thread $a3c:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by main thread ($fa8) at:
7d5774fa mshtml.dll

thread $964:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by thread $494 at:
77e8760d RPCRT4.dll

thread $4a8 (TShellChangeThread):
7c90eb94 +00 ntdll.dll KiFastSystemCallRet
0046d2f3 +cb eMailaya.exe Classes 9583 +24 TThread.Synchronize
0046d3a2 +32 eMailaya.exe Classes 9608 +4 TThread.Synchronize
0046cf1e +36 eMailaya.exe Classes 9372 +7 ThreadProc
004051e4 +28 eMailaya.exe System 11554 +33 ThreadWrapper
>> created by main thread ($fa8) at:
0056c684 +48 eMailaya.exe ShellCtrls TShellChangeThread.Create

thread $dec (TShellChangeThread):
7c90eb94 +00 ntdll.dll KiFastSystemCallRet
0046d2f3 +cb eMailaya.exe Classes 9583 +24 TThread.Synchronize
0046d3a2 +32 eMailaya.exe Classes 9608 +4 TThread.Synchronize
0046cf1e +36 eMailaya.exe Classes 9372 +7 ThreadProc
004051e4 +28 eMailaya.exe System 11554 +33 ThreadWrapper
>> created by main thread ($fa8) at:
0056c684 +48 eMailaya.exe ShellCtrls TShellChangeThread.Create

thread $3c8:
7c90eb94 ntdll.dll KiFastSystemCallRet
>> created by thread $964 at:
77e8760d RPCRT4.dll

error details:
nothing
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

There are 2 "TShellChangeThread"s running which called "Synchronize". As a result the main thread executed the synchronize request. That resulted in TCustomListView.SetSelected being called. However, it seems to me that the list view was already freed or something like that.
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

Post by emailaya »

any idea on how to trace the source of this problem?

coz it seems that its an internal process of delphi/windows
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

(1) Find out which components you're using from "ShellCtrls.pas".
(2) Is one of these components a dependent of "TCustomListView"?
(3) Do you manually free these components?

Personally, I'm guessing that either ShellCtrls.pas is buggy, or that you freed the controls at a bad time or that there is some multi tasking timing problem happening while the controls are (correctly) freed.
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

Post by emailaya »

i have some shellctrls components
but they r on a runtime created form
and the application was in idle while this exception occured

i guess it is one of those cases that a very specific scenario must happen in order for this problem to occur

a scenario that im not sure is reproduceable...

thanks for your help
Post Reply