LCL bug? Hiding of MainMenu hangs app on Wn7x64 lazarus / 31-LCL ---------------------------------------------------------------------- AlexTP · 2018-03-08 18:46 App hangs on Win7x64, but all ok on Win10. Attached demo. If you click 1st button (to hide mainmenu), then 2nd button (to show popup), app hangs. Who can confirm it? fpc 3.0.0, Lazarus trunk. ---------------------------------------------------------------------- Soner · 2018-03-08 19:34 It works without error on Windows7 Prof. 64bit, compiled with Lazarus 1.8.3 (1.8 fixes svn), fpc 3.0.4. (off-topic:  Thanks for CudaText it saved me on Mac.) EDIT: I compiled on Windows 7 32 Bit as 32Bit programm and tested with on Windows 7 64Bit. Edit2: Lazarus svn wit fpc 3.0.4. works also (your example compiled as 32bit, windows 7 64Bit) ---------------------------------------------------------------------- ASerge · 2018-03-08 23:17 Also without errors. Windows 7 x64. Lazarus release 1.8.2 x32 and x64. I just commented out 70 lines in Unit1: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ADest.SubMenuImagesWidth := ASrc.SubMenuImagesWidth; ---------------------------------------------------------------------- AlexTP · 2018-03-09 08:28 @Soner @ASerge Ok, thanks. What about second button? It must show copy of mainmenu and you must see reaction to items (dialog). I don't see reaction to items. Do you see? ---------------------------------------------------------------------- ASerge · 2018-03-09 09:40 Quote from: Alextp on March 09, 2018, 09:28:17 amIt must show copy of mainmenu and you must see reaction to items (dialog). I don't see reaction to items. Do you see? No, because you free popup menu. As I already said this is a error. ---------------------------------------------------------------------- Thaddy · 2018-03-09 10:15 I can confirm this. ASerge is right. ---------------------------------------------------------------------- Soner · 2018-03-09 12:05 No, MenuItem.OnClick has no effect, dialogs not shown. As Serge said, you can not free Popupmenu. Move TPopupmenu declaration in Class declaration. I made this than it works: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   TForm1 = class(TForm)    //..  private    P: TPopupMenu;   //..  end; implementation procedure TForm1.FormCreate(Sender: TObject);begin  p:=nil;end; procedure TForm1.bShowMenuClick(Sender: TObject);//var  P: TPopupMenu;begin  if not assigned(p) then begin   P:= TPopupMenu.Create(Self);   Menu_Copy(MainMenu1, P);   end;  P.PopUp();  //P.Free;end; ---------------------------------------------------------------------- AlexTP · 2018-03-10 08:37 Thanks, now it's solved for me.