* * *

Author Topic: LCL bug? Hiding of MainMenu hangs app on Wn7x64  (Read 1144 times)

Alextp

  • Hero Member
  • *****
  • Posts: 633
    • UVviewsoft
LCL bug? Hiding of MainMenu hangs app on Wn7x64
« on: March 08, 2018, 07:46:48 pm »
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

  • New member
  • *
  • Posts: 29
Re: LCL bug? Hiding of MainMenu hangs app on Wn7x64
« Reply #1 on: March 08, 2018, 08:34:28 pm »
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)

« Last Edit: March 08, 2018, 09:29:20 pm by Soner »

ASerge

  • Hero Member
  • *****
  • Posts: 778
Re: LCL bug? Hiding of MainMenu hangs app on Wn7x64
« Reply #2 on: March 09, 2018, 12:17:31 am »
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]
  1. ADest.SubMenuImagesWidth := ASrc.SubMenuImagesWidth;

Alextp

  • Hero Member
  • *****
  • Posts: 633
    • UVviewsoft
Re: LCL bug? Hiding of MainMenu hangs app on Wn7x64
« Reply #3 on: March 09, 2018, 09:28:17 am »
@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

  • Hero Member
  • *****
  • Posts: 778
Re: LCL bug? Hiding of MainMenu hangs app on Wn7x64
« Reply #4 on: March 09, 2018, 10:40:42 am »
It 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

  • Hero Member
  • *****
  • Posts: 6147
Re: LCL bug? Hiding of MainMenu hangs app on Wn7x64
« Reply #5 on: March 09, 2018, 11:15:53 am »
I can confirm this. ASerge is right.
I might not give the answer that you want me to.. Peter Green 1969

Soner

  • New member
  • *
  • Posts: 29
Re: LCL bug? Hiding of MainMenu hangs app on Wn7x64
« Reply #6 on: March 09, 2018, 01:05:18 pm »
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]
  1.   TForm1 = class(TForm)
  2.     //..
  3.   private
  4.     P: TPopupMenu;
  5.    //..
  6.   end;
  7.  
  8. implementation
  9.  
  10. procedure TForm1.FormCreate(Sender: TObject);
  11. begin
  12.   p:=nil;
  13. end;
  14.  
  15. procedure TForm1.bShowMenuClick(Sender: TObject);
  16. //var  P: TPopupMenu;
  17. begin
  18.   if not assigned(p) then begin
  19.    P:= TPopupMenu.Create(Self);
  20.    Menu_Copy(MainMenu1, P);
  21.  
  22.   end;
  23.   P.PopUp();
  24.   //P.Free;
  25. end;
  26.  

Alextp

  • Hero Member
  • *****
  • Posts: 633
    • UVviewsoft
Re: LCL bug? Hiding of MainMenu hangs app on Wn7x64
« Reply #7 on: March 10, 2018, 09:37:33 am »
Thanks, now it's solved for me.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus