Recent

Author Topic: During debugging, desktop freeze after clicking to open a main menu item  (Read 5230 times)

guest58172

  • Guest
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 ?

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Lazarus is built with Gtk2 or Qt widgetset ?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
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.

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Which Lazarus and FPC versions you are using?

Maybe this is the problem : https://bugs.freepascal.org/view.php?id=31138

guest58172

  • Guest
- Lazarus 1.6.4 widget se:t gtk2
- FPC 3.0.2
- target application widget set: gtk2

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
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.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

guest58172

  • Guest
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 !

guest58172

  • Guest
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.

guest58172

  • Guest
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.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki

 

TinyPortal © 2005-2018