Recent

Author Topic: BUG: OnExit and ComboBox  (Read 527 times)

bpranoto

  • Full Member
  • ***
  • Posts: 134
BUG: OnExit and ComboBox
« on: January 31, 2023, 07:14:02 am »
If in OnExit event of a window control a messagedlg is shown and the current active control is a TComboBox, the app will be freezed. You can't do anything even closing the app.

Did I just find a bug or there is something I miss?

A self contained demo app is attached.

Environment:
FPC: 3.2.2
Lazarus 2.2.4
OS: Ubuntu 18.04 0 64 bit

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: BUG: OnExit and ComboBox
« Reply #1 on: January 31, 2023, 07:46:23 am »
Lazarus 2.2.4 (rev lazarus_2_2_4) FPC 3.2.2 x86_64-win64-win32/win64
Windows 10/64bit

No error.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

bpranoto

  • Full Member
  • ***
  • Posts: 134
Re: BUG: OnExit and ComboBox
« Reply #2 on: January 31, 2023, 07:53:55 am »
Thanks.

Then it is related to the O/S..

BTW, I have found the solution. Don't display the dialog inside the OnExit event, but show it after the event is finished with the help of Application.QueueAsyncCall

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: BUG: OnExit and ComboBox
« Reply #3 on: January 31, 2023, 08:10:46 am »
Thanks.

Then it is related to the O/S..

BTW, I have found the solution. Don't display the dialog inside the OnExit event, but show it after the event is finished with the help of Application.QueueAsyncCall
You are welcome and I am glad that you found something that works for you! (Anyway, I do full agree your statement that in an OnExit event you should not call a Dialog - from view point of logic)
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

 

TinyPortal © 2005-2018