* * *

Author Topic: Can't debug with KDE Plasma, desktop freezes  (Read 1378 times)

MementoMojito

  • Jr. Member
  • **
  • Posts: 66
Can't debug with KDE Plasma, desktop freezes
« on: June 16, 2018, 12:01:51 pm »
Hi,

Am I the only experiencing issues with KDE Plasma when debugging?
It totally freezes the desktop when an error is meant to be raised. The only way to get back to it is to open another TTY and kill Lazarus from it.
It happens on my Debian stable and Arch. It looks like Lazarus is displaying a window but because this windows is not visible the whole desktop is out of focus, if it makes sense?
This happens on Arch on both 1.9.0 and 1.8.4 with KDE 5.13.0 and on my Debian with KDE 5.8.6 with Lazarus 1.8.0rc4 (less often).
I basically can't debug on Arch because it's automatic, it happens every times.
If anyone has a workaround?

Thanks!

soerensen3

  • Full Member
  • ***
  • Posts: 152
Re: Can't debug with KDE Plasma, desktop freezes
« Reply #1 on: June 16, 2018, 01:12:55 pm »
I don't use KDE but with Gnome there is a similar issue. When I debug it sometimes shows a message that my apllication is not responding, when it is paused (because of breakpoints or exceptions). When that happens I have to click away the message because even Lazarus is not responding until I do so. However the message might reappear after a few seconds. This is really annoying and hasn't been fixed for years.

For Gnome this is also true for other languages and IDE's. It could be that KDE is also showing a similar message window. I wonder how the developers of gnome do their debugging.
By the way, you probably don't have to kill Lazarus. For me it is often enough to kill gdb.
Lazarus 1.9 with FPC 3.0.4
Target: Manjaro Linux 64 Bit (4.9.68-1-MANJARO)

Leledumbo

  • Hero Member
  • *****
  • Posts: 7947
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Can't debug with KDE Plasma, desktop freezes
« Reply #2 on: June 16, 2018, 01:30:51 pm »
Try running lazarus from terminal. When debugging starts and lazarus freezes, look what the terminal outputs. Probably a miscommunication between Lazarus and GDB due to GDB changes.

MementoMojito

  • Jr. Member
  • **
  • Posts: 66
Re: Can't debug with KDE Plasma, desktop freezes
« Reply #3 on: June 16, 2018, 02:21:52 pm »
Thanks a lot both for the suggestions.
To kill gdb indeed does the trick. Still not usable tho.
So I was suspecting it and it seems to be the case, it happens when debugging a thread. The few testings I have done on main thread seems to be ok.

Error displayed by Lazarus after killing gdb
Code: Pascal  [Select]
  1. The GDB command:
  2. "-thread-info"
  3. did not return any result.
  4.  

Terminal output when it happens:
Code: Pascal  [Select]
  1. Hint: (lazarus) [TMainIDE.DoRunProject] INIT
  2. Error: (lazarus) [TMainIDE.DoBuildProject] MainBuildBoss.DoCheckIfProjectNeedsCompilation nothing to be done
  3. [TCmdLineDebugger] Debug PID: 6418
  4. Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger
  5. Hint: (lazarus) [TMainIDE.DoRunProject] END
  6. TGDBMIDebugger.StartDebugging WorkingDir="/project/lpath/"
  7. NOTE: Window with stalled focus found!, faking focus-out event
  8. NOTE: Window with stalled focus found!, faking focus-out event
  9. NOTE: Window with stalled focus found!, faking focus-out event
  10. NOTE: Window with stalled focus found!, faking focus-out event
  11. NOTE: Window with stalled focus found!, faking focus-out event
  12. NOTE: Window with stalled focus found!, faking focus-out event
  13. NOTE: Window with stalled focus found!, faking focus-out event
  14. NOTE: Window with stalled focus found!, faking focus-out event
  15. NOTE: Window with stalled focus found!, faking focus-out event
  16. NOTE: Window with stalled focus found!, faking focus-out event
  17. NOTE: Window with stalled focus found!, faking focus-out event
  18. Hint: (lazarus) [TMainIDE.DoRunProject] INIT
  19. Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger
  20. Hint: (lazarus) [TMainIDE.DoRunProject] END
  21. Hint: (lazarus) [TMainIDE.DoRunProject] INIT
  22. Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger
  23. Hint: (lazarus) [TMainIDE.DoRunProject] END
  24. [TCmdLineDebugger.SendCmdLn] Unable to send <-thread-info>. No process running.
  25.  

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4781
    • wiki
Re: Can't debug with KDE Plasma, desktop freezes
« Reply #4 on: June 16, 2018, 03:44:12 pm »
Am I the only experiencing issues with KDE Plasma when debugging?
It totally freezes the desktop when an error is meant to be raised. The only way to get back to it is to open another TTY and kill Lazarus from it.

There are some tips for that: http://wiki.lazarus.freepascal.org/IDE_tricks#My_application_freezes_my_linux_desktop_while_debugging

No idea if they are still valid.

 

Recent

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