Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-07

Unable to debug GUI

7 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

I have a machine on which I'm completely unable to debug GUI programs. The machine runs Ubunutu 12.04 LTS.
If I try to debug, the whole system (at least X11, later the complete system) hangs as soon as there is a breakpoint in a GUI event handler.

It doesn't matter whether I do the debugging in Lazarus or in GDB directly.

The same program, the same breakpoint on another machine, same OS, works just fine.

The sole difference between the 2 machines is the graphics display: An NVidea card on the machine that is OK,
An on-board Intel chip on the machine that does not work.

So I'm inclined to suspect a buggy intel graphics driver.

Has anyone experienced such a situation? If so, I'd appreciate any hints you may have.

Michael.

Reply by email

Mark Morgan Lloyd
to Michael Van Canneyt
Michael Van Canneyt wrote 20 lines
Hi, I have a machine on which I'm completely unable to debug GUI programs. The machine runs Ubunutu 12.04 LTS. If I try to debug, the whole system (at least X11, later the complete system) hangs as soon as there is a breakpoint in a GUI event handler. It doesn't matter whether I do the debugging in Lazarus or in GDB directly. The same program, the same breakpoint on another machine, same OS, works just fine. The sole difference between the 2 machines is the graphics display: An NVidea card on the machine that is OK, An on-board Intel chip on the machine that does not work. So I'm inclined to suspect a buggy intel graphics driver. Has anyone experienced such a situation? If so, I'd appreciate any hints you may have.

I'm reminded of the Win-32 problems caused by HP printer drivers which failed to preserve the state of an FP control register.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Marc Weustink
to Michael Van Canneyt: I have a machine on which I'm completely unable to debug GUI programs. The machine runs…
Michael Van Canneyt wrote 7 lines
Hi, I have a machine on which I'm completely unable to debug GUI programs. The machine runs Ubunutu 12.04 LTS. If I try to debug, the whole system (at least X11, later the complete system) hangs as soon as there is a breakpoint in a GUI event handler.

Try debugging you app on a second instance of X ( display :1) in some cases X locks up when a breakpoint happens inside a X event.

Marc

Show quoted text 22 lines
It doesn't matter whether I do the debugging in Lazarus or in GDB directly. The same program, the same breakpoint on another machine, same OS, works just fine. The sole difference between the 2 machines is the graphics display: An NVidea card on the machine that is OK, An on-board Intel chip on the machine that does not work. So I'm inclined to suspect a buggy intel graphics driver. Has anyone experienced such a situation? If so, I'd appreciate any hints you may have. Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Michael Van Canneyt
to Marc Weustink
Marc Weustink wrote 12 lines
Michael Van Canneyt wrote: > > Hi, > > I have a machine on which I'm completely unable to debug GUI programs. > The machine runs Ubunutu 12.04 LTS. > If I try to debug, the whole system (at least X11, later the complete > system) hangs as soon as there is a breakpoint in a GUI event handler. Try debugging you app on a second instance of X ( display :1) in some cases X locks up when a breakpoint happens inside a X event.

Any hints on how to go about this ?

I see suggestions with references to xvnc etc; but how to set this up with Lazarus ?

Michael.

Reply by email

Giuliano Colla
to Michael Van Canneyt

Il 14/07/2014 17:41, Michael Van Canneyt ha scritto:

Show quoted text 22 lines
On Mon, 14 Jul 2014, Marc Weustink wrote: > Michael Van Canneyt wrote: >> >> Hi, >> >> I have a machine on which I'm completely unable to debug GUI programs. >> The machine runs Ubunutu 12.04 LTS. >> If I try to debug, the whole system (at least X11, later the complete >> system) hangs as soon as there is a breakpoint in a GUI event handler. > > > Try debugging you app on a second instance of X ( display :1) > in some cases X locks up when a breakpoint happens inside a X event. Any hints on how to go about this ? I see suggestions with references to xvnc etc; but how to set this up with Lazarus ?

Just some general guidelines, because each distro has its whims. What works with CentOs may fail with Ubuntu

1) Use:
Run -> Run Parameters -> Use launching application

2) Your launching application will be xinit, with a :1 parameter to specify a different display.

Sort of:
/usr/bin/xinit -e /path/to/executable [Command line parameters] -- :1

for further details, man xinit and man xterm (which in this setup is launched by xinit).

Hope that it helps,

Giuliano

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: Any hints on how to go about this ? I see suggestions with references to xvnc etc; but…
Michael Van Canneyt wrote
Any hints on how to go about this ? I see suggestions with references to xvnc etc; but how to set this up with Lazarus ?

Use Xnest. That is how I used to debug the fpwm (Free Pascal Window Manager) project.

Example startup script...

--------[ start.sh ]----------------
#!/bin/bash
Xnest -ac :2 &
export DISPLAY=:2.0
./fpwm &
xterm &
------------[ end ]------------

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

John Landmesser
to Michael Van Canneyt: I have a machine on which I'm completely unable to debug GUI programs. The machine runs…

..reminds me at a bug in intel Drivers i had trouble with on Linux-Mint cinnamon:

try this (quote from a forum
http://forums.linuxmint.com/viewtopic.php?f=221&t=146477 ):

*************************************************************

I have a Intel GPU, and i have these annoying black windows.

But you can do it this way:

create as root the file /etc/X11/xorg.conf

in terminal type ( if you don't have a /etc/X11/xorg.conf ) : sudo touch /etc/X11/xorg.conf

open editor in admin mode:
gksu gedit /etc/X11/xorg.conf

... and write/copy these lines:

Section "Device"
Identifier "Card0?
Driver "intel"
Option "AccelMethod" "sna"
EndSection

reboot

if that doesn't help do in terminal:
rm /etc/X11/xorg.conf
to delete it again

seems to work ok for me, but i have to test this some days first.

update: 10.07.14
..still working ok!
That was the solution for these annoying black pop-up windows!!

***********************************************************

Michael Van Canneyt wrote 26 lines
Hi, I have a machine on which I'm completely unable to debug GUI programs. The machine runs Ubunutu 12.04 LTS. If I try to debug, the whole system (at least X11, later the complete system) hangs as soon as there is a breakpoint in a GUI event handler. It doesn't matter whether I do the debugging in Lazarus or in GDB directly. The same program, the same breakpoint on another machine, same OS, works just fine. The sole difference between the 2 machines is the graphics display: An NVidea card on the machine that is OK, An on-board Intel chip on the machine that does not work. So I'm inclined to suspect a buggy intel graphics driver. Has anyone experienced such a situation? If so, I'd appreciate any hints you may have. Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email