Mysterious double execution of Click handler after change to Windows 2008 Server
Posted
by
mjn
on Stack Overflow
See other posts from Stack Overflow
or by mjn
Published on 2011-03-09T08:08:04Z
Indexed on
2011/03/09
8:10 UTC
Read the original article
Hit count: 201
After moving a Delphi 2009 application from a Windows 2003 / Citrix environment to a 64 bit Windows 2008 R2 environment (users now use RDP instead of Citrix), there are frequent runtime errors which are caused by a double exection of a menu item click handler.
The first call of the event handler opens a modal form. Then the same event handler is triggered again and thus a runtime exception occurs since the visible form can not be made modal.
The madExcept stack trace looks like this:
main thread ($2dc):
004ffa88 +06c Ladelist.exe Forms TCustomForm.ShowModal
0052f4ff +0bb Ladelist.exe DB TDataSet.SetActive
008fc9a1 +089 Ladelist.exe u_ladeli 928 +16 TForm1.EditLoadingList
008fadec +070 Ladelist.exe u_ladeli 504 +5 TForm1.OpenLoadingListClick <----- 2
004d6e27 +0a7 Ladelist.exe Menus TMenuItem.Click
004d857f +0ef Ladelist.exe Menus DoClick
004d866b +087 Ladelist.exe Menus TMenu.IsShortCut
005001c1 +04d Ladelist.exe Forms TCustomForm.IsShortCut
004e8dc0 +068 Ladelist.exe Controls TWinControl.IsMenuKey
004e8f89 +011 Ladelist.exe Controls TWinControl.CNSysKeyDown
004e247e +2d2 Ladelist.exe Controls TControl.WndProc
004e6983 +513 Ladelist.exe Controls TWinControl.WndProc
004fb5e8 +594 Ladelist.exe Forms TCustomForm.WndProc
004e20a4 +024 Ladelist.exe Controls TControl.Perform
004856e0 +014 Ladelist.exe Classes StdWndProc
004e609c +02c Ladelist.exe Controls TWinControl.MainWndProc
004856e0 +014 Ladelist.exe Classes StdWndProc
775b00e3 +02b ntdll.dll KiUserCallbackDispatcher
008fc9a1 +089 Ladelist.exe u_ladeli 928 +16 TForm1.EditLoadingList
008fadec +070 Ladelist.exe u_ladeli 504 +5 TForm1.OpenLoadingListClick <----- 1
004d6e27 +0a7 Ladelist.exe Menus TMenuItem.Click
004d857f +0ef Ladelist.exe Menus DoClick
004d866b +087 Ladelist.exe Menus TMenu.IsShortCut
005001c1 +04d Ladelist.exe Forms TCustomForm.IsShortCut
004e8dc0 +068 Ladelist.exe Controls TWinControl.IsMenuKey
004e8e0d +01d Ladelist.exe Controls TWinControl.CNKeyDown
004e247e +2d2 Ladelist.exe Controls TControl.WndProc
004e6983 +513 Ladelist.exe Controls TWinControl.WndProc
004fb5e8 +594 Ladelist.exe Forms TCustomForm.WndProc
004e20a4 +024 Ladelist.exe Controls TControl.Perform
004e609c +02c Ladelist.exe Controls TWinControl.MainWndProc
004856e0 +014 Ladelist.exe Classes StdWndProc
775b00e3 +02b ntdll.dll KiUserCallbackDispatcher
753c3675 +010 kernel32.dll BaseThreadInitThunk
© Stack Overflow or respective owner