Linux: Access to an invisible Listbox will crash the app

Issue #246 wontfix
Harry Stahl created an issue

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)

  1. Eugene Kryukov repo owner

    We have no idea why it crashes. Looks like GTK+ issue or limitation with invisible view.

  2. Eugene Kryukov repo owner

    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

  3. Harry Stahl 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…

  4. Log in to comment