Lazarus
Using the Lazarus IDE => Debugger => Topic started by: guest58172 on May 02, 2017, 05:59:32 pm
-
This is an extremely annoying issue. Recently i updated my OS from openSUSE 13.2 x86-64 to openSUSE 42.2 x86-64. The main difference is the Desktop Environment, which is upgraded to an other major version, i.e Plasma 5 / KDE5. (vs KDE 4 previously).
Since this upgrade i cannot debug anymore my main application. Each time i click to open a main menu, the desktop freezes. Then i have to go to TTY6, pkill gdb, and back to the graphical environment, where everything works fine again (excepted that debugging is finished).
So far i tried to
- disable Exception catching in the application TApplication instance.
- disable events assigned to onUpdate of the actions assigned to the menu items.
- disable all desktop effects.
- reproduce on a simple application
But none of the measure fixed the issue. The simple application was not subject to freezes during debugging.
Any idea of the problem origin ?
-
Lazarus is built with Gtk2 or Qt widgetset ?
-
googling
gdb breakpoint in event freeze desktop
gives me the impression this is a common issue. (not just lazarus, not just pascal)
This link gives some ideas:
http://stackoverflow.com/questions/24948226/debugging-gtk-event-callbacks
It is possible that the problem is only in one of either gtk or qt, and the other works. Depends how the framework deals with the events before they reach your code.
-
Which Lazarus and FPC versions you are using?
Maybe this is the problem : https://bugs.freepascal.org/view.php?id=31138
-
- Lazarus 1.6.4 widget se:t gtk2
- FPC 3.0.2
- target application widget set: gtk2
-
Maybe this is the problem : https://bugs.freepascal.org/view.php?id=31138
Most likely yes. Use trunk or the fixes_1_8 branch.
http://wiki.freepascal.org/Lazarus_1.8_fixes_branch
It does not freeze.
-
Yes, it's that. The worst is that :
It's not a LCL bug !
After reading the report i noticed the GTK theme name. If i change the GTK theme (i.e to Adwaita then no freeze anymore, and even with Laz 1.6.2 !
-
It's back in 1.8RC1 and in worse. Now even with a different GTK2 theme the DE freezes when trying to open a main menu item.
-
linux x86_64, KDE, application with GTK2 widget (don't know if the same bug happens with a GTK based DE).
- Create an AV on purpose in an TNotifyEvent target.
- Assign this event to an Action.OnUpdate
- assign the action to a TMenuItem of a main menu
- try to open the menu while debugging in Laz
DE freeze, need pkill gdb.
-
Also try http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working
(autosolib off)