Linux: Access to an invisible Listbox will crash the app
Run the attached demo-app. All is fine. Then hide the TListbox “lbRestore” and run the app again. It crashes.
It occours in the StringGridDraw-Cell event, where is tested if lbRestore has some content and if yes, the content will be shown in stringgrid.
Of course, it is stupid so save the information in a hidden Listbox, I have allready changed my program. But never the less the app should not crash here.
Comments (3)
-
repo owner -
repo owner - changed status to wontfix
Looks like GTK has limitation of creating new view during drawing. To solve your issue just force view creating in FormCreate by calling lbRestore.HandleNeeded
-
reporter OK, that explains perhaps some hangings in other programs, where after some time the program hangs, it could than be that it is in connection with this issue, where invisible controls are upteded, but not visible always.
So good to now. So a simple call of “lbRestore.handleneeded;” in the create event of the form fix this issue…
- Log in to comment
We have no idea why it crashes. Looks like GTK+ issue or limitation with invisible view.