Cannot remove TShellListView from form lazarus / 10-Designer ---------------------------------------------------------------------- Diverod · 2024-11-11 15:31 I have a form on which I placed a TShellListView but decided to go with TShellTreeView instead. Unfortunately I didn't try to remove the ListView until much later.    When I try to delete the TShellListView Lazarus displays the Not Responding message and all I can do is Force Quit.    Being that my knowledge is limited, was wondering if someone might have another way of removing a control from a form other than selecting the Delete option in the drop-down menu?    This does not effect the function of my app and Lazarus restarts fine. I can remove the visibility but would like to remove it. ------------ Lazarus Version: 3.6 Date: 2024-10-02 FPC Version: 3.2.2 Revision: Unknown x86_94-linux-gtk2 ------------ Ubuntu 24.04.1 LTS AMD A12-9720P RADEON R7, 12 COMPUTE CORES 4C+8G × 4 Lenovo ideapad 320-15ABR GNOME Version: 46 Windowing System: Wayland Kernel Version: Linux 6.8.0-48-generic ------------    Also, I can make a test form with just a button and TShellTreeView. I cannot remove it from this either. Any help is appreciated. ---------------------------------------------------------------------- Bart · 2024-11-11 17:24 That should not happen. In the mean time: close Lazarusopen the .lfm in a text editorfind the declaration of TShellListView and remove itopen associated the unit (*.pas;*.pp) in the text editor and also remove the TShellListView from the form definition (TForm1 = class(TForm) etc..) If you can reliably reproduce the issue with Lazarus 4.0RC1 (or Lazarus main) then please file a bugreport! Bart ---------------------------------------------------------------------- VisualLab · 2024-11-11 22:34 There's probably something wrong with the TShellListView destructor. And it could be some internal object that TShellListView creates (and deletes), maybe related to system resources. ---------------------------------------------------------------------- Diverod · 2024-11-12 00:33 Quote from: Bart on November 11, 2024, 06:24:48 pmThat should not happen. In the mean time: close Lazarusopen the .lfm in a text editorfind the declaration of TShellListView and remove itopen associated the unit (*.pas;*.pp) in the text editor and also remove the TShellListView from the form definition (TForm1 = class(TForm) etc..) If you can reliably reproduce the issue with Lazarus 4.0RC1 (or Lazarus main) then please file a bugreport! Bart Good instructions, worked great! Thank you! ---------------------------------------------------------------------- wp · 2024-11-12 09:02 Using Laz/main and FPC3.2.2, I can reproduce the issue on Kubuntu 24.04.1/gkt2 (here also with Laz 3.4) and on Manjaro Plasma 22.05/gtk2 (here also with Laz 3.0). Simply dropping a TShellListView on an empty form of a new default project is enough to show the issue. Sometimes the listview does not appear at this moment, sometimes it appears a few seconds later. The IDE does not react on deleting the control, becomes inresponsive and later reports a "does not respond error". There is no issue on Windows and qt5/qt6 (verified on Manjaro Plasma 22.5). I filed a bug report: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41238 ---------------------------------------------------------------------- Bart · 2024-11-16 14:09 Do we know of any Lazarus version where this worked correctly? We need a version wehre this worked OK, so we can bisect the guilty revisison. (I don't see any obvious candidates in the history of TSHellListView.) I could reproduce the issue in a stand-alone program with just a TShellListView and a TButton. In the button's onclick I free the TShellListView --> application freezes. (All this on Linux x86_64, GTK2. No crash wth QT.) If you hide the TShellListView before freeing it, the app remains responsive, but you get a crash on closing the app, and you still have to kill it. I can't figure out what is so special about TShellListView that this happens, when it does not happen with a TListView. Bart ---------------------------------------------------------------------- VisualLab · 2024-11-17 00:58 Quote from: Bart on November 16, 2024, 03:09:49 pmI can't figure out what is so special about TShellListView that this happens, when it does not happen with a TListView. Apparently it references some GNOME, Gtk, or something related resources. ---------------------------------------------------------------------- Bart · 2024-11-17 09:36 wp found the quilty revision, now just figure out what's wrong with it (proabbly in the WS registration code somewhere). Bart ---------------------------------------------------------------------- Bart · 2024-11-21 17:09 Fixed in Lazarus main in commit 9b59add4 and merged to fixes branch. Bart