Recent

Author Topic: Debug run fails with QT5 widgets[SOLVED]  (Read 2956 times)

OH1KH

  • Jr. Member
  • **
  • Posts: 56
Debug run fails with QT5 widgets[SOLVED]
« on: January 14, 2022, 02:35:09 pm »
Hi!
This may be some kind of settings problem that I do not understand:

System Fedora 35, Glibc 2.34

If I open same project with Lazarus as before and set widget type to QT5 (as before) and start debug run with F9
program never appears to screen. Green arrow button turns gray and square red stop button turns red in toolbar.
Also "ps ax" in console shows that program is running.
But it can not be seen on any desktop. And there are no errors what you can see if you try to start graphics program from text only console linux. So it is getting the graphics somewhere, but not the right display.

If I switch widgets type to GTK2 program opens visible when started from F9.
Both widgets worked before and I have feeling that this started when I updated Fedora and got Glibc 2.34

As they worked before and both qt5pas and qt5pas-devel are not touched I wonder what should I adjust to make debugged program to use display again.
« Last Edit: January 15, 2022, 10:24:10 am by OH1KH »
--
Saku

zeljko

  • Hero Member
  • *****
  • Posts: 1251
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Debug run fails with QT5 widgets
« Reply #1 on: January 14, 2022, 02:49:54 pm »
What happens if you use gdb from console ? gdb ./myapplication and then type run in gdb console ?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7885
  • Debugger - SynEdit - and more
    • wiki
Re: Debug run fails with QT5 widgets
« Reply #2 on: January 14, 2022, 02:59:17 pm »
Please check in your "Tools > Options > Debugger > Backend" if gdb or fpdebug is selected.
Please try both, and report if either works / which one(s) fail.

Open the IDE from a console, and "run" with the failing selection(s).
If the IDE prints any output to the console, please copy and paste here.

dbannon

  • Hero Member
  • *****
  • Posts: 2022
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Debug run fails with QT5 widgets
« Reply #3 on: January 15, 2022, 01:13:48 am »
I am not seeing any Qt5 display issues with either debugger.

If its an update to Fedora issue, I'd logout and try see if you still have an option to log back in again without using Wayland.

There are also some CLI switches you can use to a QT5 app that makes it interact with Wayland differently, don't remember details I'm afraid.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Loesje

  • Full Member
  • ***
  • Posts: 168
    • Lazarus Support website
Re: Debug run fails with QT5 widgets
« Reply #4 on: January 15, 2022, 01:22:02 am »
I had the same thing last week on Fedora (btw: it eventually started after a *long* period). Few days later, after a 'dnf update' it worked again.

So try to install the Fedora-updates, it might help.

OH1KH

  • Jr. Member
  • **
  • Posts: 56
Re: Debug run fails with QT5 widgets [SOLVED]
« Reply #5 on: January 15, 2022, 10:23:49 am »
Hi!
Thanks for many suggestions !

Loesje: I upgraded from F34 to F35 in Nov-2021 and I wonder did I that again too early as now two months later I have 1.5G updates waiting!
Installed them, but it did not give any help for this problem.
Fortunately GTK2 debug works. Otherwise I would had to restore Fedora34 from backups.

dbannon: I have only selections LXDE and OpenBox at login. Tried both with  same result: nothing visible.
Running normally:
[saku@hamtpad ~]$ set | grep -i session
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
DESKTOP_SESSION=LXDE
XDG_CONFIG_DIRS=/etc/xdg/lxsession:/etc/xdg
XDG_SESSION_CLASS=user
XDG_SESSION_ID=1
XDG_SESSION_TYPE=x11
_LXSESSION_PID=9894

For some reason 'rpm -ql| grep wayland' shows now many packages that were not there with Fedora 34. Tried to remove qt5-wayland* but it will uninstall many programs used daily.

Martin_fr: There is just gdb to choose in "Tool"Tools > Options > Debugger > Backend"


zeljko: After almost endless download program started visible! Exellent!

After QUITing from gdb also tried from inside of Lazarus and now it is again working from there, too.
THANKS!

Just wondering should I keep the contents of /home/saku/.cache/debuginfod_client/460d8e1344ca4b3467c8dd05c50ba93d8442f0dc/ folder that console gdb was using ?
 

(gdb) run
Starting program: /home/saku/lazarus/cqrlog/src/cqrlog
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffec13f640 (LWP 154578)]
[New Thread 0x7fffea353640 (LWP 154579)]
[New Thread 0x7fffe9b52640 (LWP 154580)]
[New Thread 0x7fffdbfff640 (LWP 154581)]
Downloading -0.00 MB separate debug info for /home/saku/.cache/debuginfod_client/e5d7c2f59ae7e15a498ee1718ada36b11dfe4b1a/debuginfo
Downloading 0.03 MB separate debug info for /lib64/libglapi.so.0                 
Downloading -0.00 MB separate debug info for /usr/lib64/dri/crocus_dri.so       
Downloading -0.00 MB separate debug info for /lib64/libLLVM-13.so               
Downloading -0.00 MB separate debug info for /home/saku/.cache/debuginfod_client/460d8e1344ca4b3467c8dd05c50ba93d8442f0dc/debuginfo
[New Thread 0x7fffd8e2d640 (LWP 155269)]                                         

Cqrlog Ver:2.5.2 (117) Date:2022-01-07
**** DEBUG LEVEL 0 ****
**** CHANGE WITH --debug=1 PARAMETER ****

OS:
[Detaching after fork from child process 155270]
Linux version 5.15.14-200.fc35.x86_64 (mockbuild@bkernel01.iad2.fedoraproject.org) (gcc (GCC) 11.2.1 20211203 (Red Hat 11.2.1-7), GNU ld version 2.37-10.fc35) #1 SMP Tue Jan 11 16:49:27 UTC 2022
[New Thread 0x7fffcc41f640 (LWP 155271)]
[New Thread 0x7fffc7abe640 (LWP 155272)]
[Thread 0x7fffd8e2d640 (LWP 155269) exited]
[Thread 0x7fffdbfff640 (LWP 154581) exited]
[Thread 0x7fffc7abe640 (LWP 155272) exited]
[Thread 0x7fffcc41f640 (LWP 155271) exited]
[Thread 0x7fffe9b52640 (LWP 154580) exited]
[Thread 0x7fffea353640 (LWP 154579) exited]
[Thread 0x7fffec13f640 (LWP 154578) exited]
[Inferior 1 (process 154574) exited normally]
(gdb)




--
Saku

dbannon

  • Hero Member
  • *****
  • Posts: 2022
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Debug run fails with QT5 widgets [SOLVED]
« Reply #6 on: January 15, 2022, 12:34:54 pm »

dbannon: I have only selections LXDE and OpenBox at login. Tried both with  same result: nothing visible.

Thats a pity, looks like they have dropped that option. I suspect neither LXDE nor OpenBox would be using Wayland anyway so what you have done is probably all we need to do to eliminate Wayland issues.


For some reason 'rpm -ql| grep wayland' shows now many packages that were not there with Fedora 34. Tried to remove qt5-wayland* but it will uninstall many programs used daily.

No, no, don't do that ! All sorts of bad things would happen. I started to do that once and the Sun noticeably darkened until I stopped.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

OH1KH

  • Jr. Member
  • **
  • Posts: 56
Re: Debug run fails with QT5 widgets[SOLVED]
« Reply #7 on: February 11, 2022, 09:05:51 am »
HI!

It happened again!

Long time debugging worked properly, but this morning nothing happens again.
I have waited over 30min and nothing still....

If i look network traffic I can see:
IP proxy-iad01.fedoraproject.org.https > hamtpad.42476:

So my PC is downloading something. After some Googling I found out that fedoraproject has set up a debug service from where gdb loads debuginfo. https://fedoraproject.org/wiki/Changes/DebuginfodByDefault

They say that first time download may take some time (how many hours? ask I). It would be ok for one time, but another sentence is saying that cache is cleaned periodically.

It seems that now this cleaning has happened and I am again on first time download.

This is very bad "feature" an I think should I downgrade old enough Fedora version (with virtual machine) to get my debugging work.

I have only 4G internet, not fiber or 5G and  this really sucks!
BTW while writing this my program finally started for debugging ! OMG  >:D
« Last Edit: February 11, 2022, 09:08:28 am by OH1KH »
--
Saku

 

TinyPortal © 2005-2018