Forum > GTK

Bug: setting ModalResult of a form closes the entire app

(1/1)

AlexTP:
Maybe someone can find the time to reproduce it and debug?
As I see - setting ModalResult of a helper form, to any value (e.g. mrYes) - quits the entire app!
Only on gtk2 (works OK on qt5 / win32).

https://github.com/Alexey-T/CudaText/issues/3990

I tried to make a simple repro demo, but no repro! So to repro this, you need to compile CudaText project on gtk2.
What happens: setting ModalResult to form fmConfirmReplace (in OnKeyDown handler which handles 'y' key; or by pressing the Yes button) closes the entire app!

AlexTP:
Details:
- Linux Ubuntu 20 x64
- Lazarus: HEAD detached at 23b2324f9f (just before Qt5Pas new fix)
- Free Pascal Compiler version 3.2.3-587-g65733801e5-dirty [2022/02/13] for x86_64
- optimization=0 for the main project

How to compile the project:
https://wiki.freepascal.org/CudaText#How_to_compile_CudaText

Thaddy:
Check the ownership? This only happens when the main form, or probably even the application, is the owner.
This is only a debugging hint.

AlexTP:
Thanks - I tried to change owner of that form
a) in the CudaText (to nil);
b) in the repro-demo (to the main form);
but it did not help with 2 cases.

Navigation

[0] Message Index

Go to full version