Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Crash in IWForm.FillRealTabOrder - every 2-3 clicks (/thread-1771.html) Pages:
1
2
|
Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Victoria - 07-01-2020 Hello IntraWeb Team, i got a nasty problem. My Server crashes every 2-3 clicks. Every Time on the same Line. For understanding. I build many Items (IWButton/IWLink/...) dynamically and release them if needed. So i can click around 1-3 times max without crash but after then it happens. I can not find out which problem he has with the list (FillRealTabOrders). My components will generated at this way: Build the the New one. Give them the Settings from the old Control. Delete the old Control. For this Tab i use: iMemTab := oOldCtrl.TabOrder; oOldCtrl.TabOrder := -1; oNewCtrl.TabOrder := iMemTab; System: Win10 64bit Delphi 10.2.3 IntraWeb 15.2.3 StandAlone (HTTP.SYS) Please help me - i think it is possible that in old intraweb version this problem not exists. But not sure. with friendly regards Victoria -------------------EDIT In he meanwhile i found out that OnClick seems to cause the trouble. So i switched everything to AsyncClick + (in old version from IntraWeb i could only generate a button before the FormCreate to replace that properly with my own IWButton Class) - now reworked this logic and dont replace the components. This seems to work but causes another Problem. I has a TIWGrid what i fill with generic items (IWLabel, IWImageFile) and the TIWImageFile worked until my last changes. Exact this trouble i has got describe in the older Ticket here: https://www.atozed.com/forums/thread-1445.html But now - not only the first "row" (IWImageFile in the Control of a Row) doesn't work ... none of them does?! Maybe you can help me with the new problem. RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Alexandre Machado - 07-02-2020 Are you able to create a simple test case that recreates this issue? From your report it is not possible to recreate the application. RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Victoria - 07-02-2020 (07-02-2020, 06:23 AM)Alexandre Machado Wrote: Are you able to create a simple test case that recreates this issue? I has tried to build a test project but without success. But i has found a workaround - in my desperation because I absolutely have to release - I rolled IntraWeb back to version 15.1.8 - and everything worked! Except for the bug from https://www.atozed.com/forums/thread-1445.html ... but that's better than no function or permanent crashes. When i got time i tried to build a test programm... with friendly regards Victoria RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Alexandre Machado - 07-02-2020 Can you show me the code that you use to create the components? To free them? This is too vague to understand what is happening RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Alexandre Machado - 07-02-2020 Please enable the exception logger in your application and we can have more information about it: http://docs.atozed.com/docs.dll/development/Using%20the%20Exception%20Logger.html RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Victoria - 07-02-2020 (07-02-2020, 07:11 AM)Alexandre Machado Wrote: Please enable the exception logger in your application and we can have more information about it: Hello, here the last logs again, i has shrinked all what i can to isolate the error. But it stucks at: IWCompExtCtrls.TIWCustomImage.get_HasTabOrder http://www.vsoft.de/aw/AW_TrackAndTrace@2020-07-02 15-27-08.6471.Log http://www.vsoft.de/aw/AW_TrackAndTrace@2020-07-02 15-28-39.0821.Log This code snippet is the part which generate per IWGrid.Cell a TIWImageFile (so it looks better) Without this all works fine. With Parent=IntraWebServer hangs completly up .. But i think it has todo with the TabOrder - the Error logs and the CPU Stacktrace are looking all in the same direction (for me)... Code: procedure SetCellLinkIcon(oCell:TIwGridCell;sImg:String;sHint:String;oEvent:TIWAsyncEvent;sParams:String); for clear (because another search in the DB can bring other results in the grid i use: Code: for i := IWGrid_Dispo.ComponentCount-1 downto 0 do Hope this will help you for improve/finding the bug. RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Victoria - 07-03-2020 Hello again, i would tell that the new Version - IntraWeb 15.2.4 - has the same error included - here from the WebPage after Crash: hopefully this will helps you to find a clue RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Alexandre Machado - 07-04-2020 I'll have a look and let you know RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Alexandre Machado - 07-04-2020 Hi Victoria, Yes, I can recreate it using that code. I'll dig in and see what I can find. I'll keep you informed. Cheers RE: Crash in IWForm.FillRealTabOrder - every 2-3 clicks - Alexandre Machado - 07-04-2020 Hi Victoria, After playing with your code, here's what happens: You are creating a TIWImageFile and not setting a parent control which causes it to be included in the internal form's list of controls. But once it has no parent, when it is destroyed it won't notify the form that it is being removed (because the owner is a IWGrid, not the form itself), so the form ends up with a dangling reference to a freed object. In order to fix it, please set the parent of all your controls created at runtime. Example: Code: procedure SetCellLinkIcon(oCell:TIwGridCell;sImg:String;sHint:String;oEvent:TIWAsyncEvent;sParams:String); This will fix it. The way tab order is set in IW 15.2 branch is different compared to 15.1 and this broke your code. I'm implementing some other checks in a new update so it will also behave as expected even if you don't set the parent of the control. It should be released soon, if you prefer to wait. Cheers, |