I have recently upgraded to Delphi 10.2.3 (from XE), IW 14.2.27 and CGD 4.1.0.50 (from 4.1.0.31)
I have a Vertival menu that is created at runtime and popolated from a DB Query.
The code that was working previously is now not working.
The problem code is that no longer working is occurs once the selected menu item with item-index greater than 15 and or the selected menu item is in a sub-menu with sub-menu item-index above 0
- Code: Select all
lv_itemId := AParams.Values['itemId']; {<<== returning 'IWCGJQVRTMNMAINMENU_1_3' which is what is expected}
lv_I := -1;
try
lv_I := iwcgjqvrtmnMainMenu.Items.GetByUniqueName(lv_itemId).Tag; {<<== line 1033}
except
UserSession.LogToFile('M Not Exist: ' + AParams.Values['itemId']);
Exit;
end;
The GetByUniqueName at line 1033 is throwing an exception. Here is the stack dump:
- Code: Select all
date/time : 2018-03-28, 17:52:03, 719ms
computer name : XXXXXX
user name : xxx.xxx
operating system : Windows 10 x64 build 16299
system language : English
system up time : 8 hours 53 minutes
program up time : 4 minutes 10 seconds
processors : 8x Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
physical memory : 9577/16341 MB (free/total)
free disk space : (C:) 126.41 GB (D:) 479.15 GB
display mode : 2560x1440, 32 bit
process id : $44bc
allocated memory : 60.17 MB
largest free block : 836.13 MB
command line : "[drive]:\inetpub\Odyssey\ODY.exe" /GUI -ForceDBSet"ZSL"
executable : ODY.exe
exec. date/time : 2018-03-28 17:47
version : 7.40.40.281
compiled with : Delphi 10.2 Tokyo
madExcept version : 4.0.19
callstack crc : $bbe1168b, $9de48cbc, $9de48cbc
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 016DD745 in module 'ODY.exe'. Read of address 0000001A.
thread $39b4 (TInThreadWithTask):
016dd745 +059 ODY.exe untMain 1033 +5 TiwfrmMain.iwcgjqvrtmnMainMenuJQVertMenuOptionsClick
00db3617 +11b ODY.exe IWCGJQControl TIWCGCustomRegion.CallEvent
00db2da9 +091 ODY.exe IWCGJQControl TIWCGCustomRegion.DoAjaxRequest
00b90fc7 +067 ODY.exe IWApplication 2445 +9 TIWCallback.PerformCallBack
00b90d82 +04e ODY.exe IWApplication 2405 +8 TIWCallBacks.PerformCallBack
00b8b8d7 +02f ODY.exe IWApplication 544 +3 TIWApplication.PerformCallBack
00b85f6c +270 ODY.exe IWForm 1119 +63 TIWForm.DoExecuteForm
00b941e6 +066 ODY.exe IWBaseForm 381 +9 TIWBaseForm.ExecuteForm
00b8ddd0 +138 ODY.exe IWApplication 1279 +37 TIWApplication.ExecuteActiveForm
00b8da95 +031 ODY.exe IWApplication 1159 +3 TIWApplication.ProcessForm
00c93a9e +02a ODY.exe IWServerSession 288 +4 TIWServerSession.ExecuteCallback
00c95e33 +1e7 ODY.exe IWServerSession 727 +37 TIWServerSession.DoExecuteSession
00c962b1 +1c5 ODY.exe IWServerSession 810 +44 TIWServerSession.ExecuteSession
00c86214 +3a4 ODY.exe IWServer 538 +63 TIWServer.ExecuteUrl
00c86720 +0e0 ODY.exe IWServer 608 +11 TIWServer.Execute
00c92c63 +027 ODY.exe IWServerSession 88 +2 HttpExecute
00cb2a8a +1ba ODY.exe IW.Server.HTTPIndy 235 +26 THTTPServerIndy.DoCommandGet
00c81367 +6cb ODY.exe InCustomHTTPServer 1426 +180 TInCustomHTTPServer.DoExecute
00c56e6f +00f ODY.exe InContext 185 +2 TInContext.Run
00c55a0a +002 ODY.exe InTask 136 +0 TInTask.DoRun
00c6d586 +006 ODY.exe InThread 625 +1 TInThreadWithTask.Run
00c6cf31 +0f5 ODY.exe InThread 377 +43 TInThread.Execute
00c1ecbf +02b ODY.exe madExcept HookedTThreadExecute
008d0fd9 +049 ODY.exe System.Classes ThreadProc
0080c714 +028 ODY.exe System 282 +0 ThreadWrapper
00c1eba5 +00d ODY.exe madExcept CallThreadProcSafe
00c1ec0a +032 ODY.exe madExcept ThreadExceptFrame
76778652 +022 KERNEL32.DLL BaseThreadInitThunk
>> created by thread $141c (TIdListenerThread) at:
00c6d132 +052 ODY.exe InThread 448 +24 TInThread.Create
main thread ($1cb8):
00000000 +ff42c6b8 ODY.exe madStackTrace +0 StackAddrToStr
>> stack will be calculated soon
Help please....
TIA