Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jun 2013 13:58:00 -0700
From:      David Wolfskill <david@catwhisker.org>
To:        x11@freebsd.org
Subject:   Re: Help debugging xfig lockup?
Message-ID:  <20130612205800.GA1369@albert.catwhisker.org>
In-Reply-To: <201306120751.r5C7ph11010266@mech-cluster241.men.bris.ac.uk> <20130612060435.GB5021@vagabond.ma.maison> <20130612045919.GA1940@over-yonder.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--sdOeJE8sLwpQaOMV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 11, 2013 at 11:59:20PM -0500, Matthew D. Fuller wrote:
> ...
> As a data point (I also use xfig somewhat rarely but repeatedly over a
> decade+), I just fiddled with it a bit here without trouble, with
> ports up to date as of yesterday, and -CURRENT as of the weekend.
>=20
> I'd guess the difference is probably in details of X.  I'm using the
> radeon driver on non-WITH_NEW_XORG.

Hmmm...  I've encountered it on my laptop (x11/nvidia-driver), my work
desktopm, and a desktop at home (the latter 2 use Intel graphics
drivers) -- each running stable/9, i386.

> ...
> Well, xfig isn't using anything particularly new or exciting in X; I
> doubt it's even hitting any OpenGL paths or the like.  I'd start by
> just slapping a gdb on it and see if I can get a hint of where in what
> library it's stuck; maybe that'll make the answer obvious...

I tried that, found that it was last in DoLayout(), part of
x11-toolkits/Xaw3d.  So I rebuilt x11-toolkits/Xaw3d with debugging, as
well; found that Xaw3d was being invoked from x11-toolkits/libXt; ebuilt
that with debugging.

So if I start xfig:

d129(9.1-S)[6] dirs
/usr/ports/graphics/xfig/work/xfig.3.2.5b=20
d129(9.1-S)[7] gdb ./xfig

then select (say) "Text input", the "T" button goes reverse-video, then
the application locks up.  ^T shows me:

load: 0.73  cmd: xfig 33534 [running] 11.41r 5.14u 0.01s 38% 6476k

so from another window, I "kill 33534", then back to gdb, "bt" shows:

Starting program: /common/ports/graphics/xfig/work/xfig.3.2.5b/xfig=20
load: 0.73  cmd: xfig 33534 [running] 11.41r 5.14u 0.01s 38% 6476k

Program received signal SIGTERM, Terminated.
0x28206db1 in DoLayout (bbw=3D0x289eb600, width=3D0, height=3D0,=20
    reply_width=3D0xbfbfc29e, reply_height=3D0xbfbfc29c, position=3D0 '\0')
    at Box.c:179
179         for (i =3D 0; i < bbw->composite.num_children; i++) {
(gdb) bt
#0  0x28206db1 in DoLayout (bbw=3D0x289eb600, width=3D0, height=3D0,=20
    reply_width=3D0xbfbfc29e, reply_height=3D0xbfbfc29c, position=3D0 '\0')
    at Box.c:179
#1  0x28207346 in PreferredSize (widget=3D0x289eb600, constraint=3D0xbfbfc3=
b4,=20
    preferred=3D0xbfbfc39c) at Box.c:358
#2  0x28283f86 in XtQueryGeometry (widget=3D0x289eb600, intended=3D0xbfbfc3=
b4,=20
    reply=3D0xbfbfc39c) at Geometry.c:789
#3  0x2822b71f in ComputeLayout (widget=3D0x289eb300, query=3D1 '\001',=20
    destroy_scrollbars=3D1 '\001') at Viewport.c:589
#4  0x28298454 in XtSetValues (w=3D0x289eb300, args=3D0x81b2120, num_args=
=3D0)
    at SetValues.c:407
#5  0x080e2589 in sel_mode_but (widget=3D0x289f1400, closure=3D0x8171944,=
=20
    event=3D0xbfbfd404, continue_to_dispatch=3D0xbfbfce0b "\001\224'+(\004")
    at w_modepanel.c:639
#6  0x2828152f in XtDispatchEventToWidget (widget=3D0x289f1400, event=3D0xb=
fbfd404)
    at Event.c:882
#7  0x28281b03 in _XtDefaultDispatcher (event=3D0xbfbfd404) at Event.c:1367
#8  0x28280b10 in XtDispatchEvent (event=3D0xbfbfd404) at Event.c:1423
#9  0x08085768 in main (argc=3DError accessing memory address 0x1e: Bad add=
ress.
) at main.c:1551
(gdb) p tool_app
$1 =3D 0x2886b0c0
(gdb) p event
No symbol "event" in current context.
(gdb) p splash_onscreen
$2 =3D 0
(gdb) q

=46rom a previous attempt, doing the same things, I see:

d129(9.1-S)[4] gdb ./xfig
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain condition=
s.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) r
Starting program: /common/ports/graphics/xfig/work/xfig.3.2.5b/xfig=20
load: 0.87  cmd: xfig 24199 [running] 28.43r 15.91u 0.05s 85% 6448k

Program received signal SIGTERM, Terminated.
0x28206db1 in DoLayout (bbw=3D0x289eb600, width=3D0, height=3D0,=20
    reply_width=3D0xbfbfc29e, reply_height=3D0xbfbfc29c, position=3D0 '\0')
    at Box.c:179
179         for (i =3D 0; i < bbw->composite.num_children; i++) {
(gdb) bt
#0  0x28206db1 in DoLayout (bbw=3D0x289eb600, width=3D0, height=3D0,=20
    reply_width=3D0xbfbfc29e, reply_height=3D0xbfbfc29c, position=3D0 '\0')
    at Box.c:179
#1  0x28207346 in PreferredSize (widget=3D0x289eb600, constraint=3D0xbfbfc3=
b4,=20
    preferred=3D0xbfbfc39c) at Box.c:358
#2  0x28283f86 in XtQueryGeometry () from /usr/local/lib/libXt.so.6
#3  0x2822b71f in ComputeLayout (widget=3D0x289eb300, query=3D1 '\001',=20
    destroy_scrollbars=3D1 '\001') at Viewport.c:589
#4  0x28298454 in XtSetValues () from /usr/local/lib/libXt.so.6
#5  0x080e2589 in sel_mode_but (widget=3D0x289f1400, closure=3D0x8171944,=
=20
    event=3D0xbfbfd404, continue_to_dispatch=3D0xbfbfce0b "\001\224'+(\004")
    at w_modepanel.c:639
#6  0x2828152f in XtDispatchEventToWidget () from /usr/local/lib/libXt.so.6
#7  0x28281b03 in _XtDefaultDispatcher () from /usr/local/lib/libXt.so.6
#8  0x28280b10 in XtDispatchEvent () from /usr/local/lib/libXt.so.6
#9  0x08085768 in main (argc=3DError accessing memory address 0xb: Bad addr=
ess.
) at main.c:1551
(gdb) p i
$1 =3D 11
(gdb) p bbw->composite.num_children
$2 =3D 33
(gdb) p bbw->composite.children[i]->core.width
$3 =3D 64
(gdb) p w
$4 =3D 76
(gdb) p h_space
$5 =3D 0
(gdb) p width
$6 =3D 0
(gdb) p bbw->box.h_space
$7 =3D 0
(gdb) p h_space
$8 =3D 0
(gdb) q
The program is running.  Exit anyway? (y or n) y

> Going into draw/edit mode does involve changing the cursor; maybe
> that's the significant bit?
> ...

I don't *think* that's it, but I freely admit lack of familiarity with
X11 debugging.

On Wed, Jun 12, 2013 at 08:04:35AM +0200, Pierre DAVID wrote:
> ...
> > I once opened a PR for this problem, but I don't find it anymore.
> >
>=20
> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D161070&cat=3D
> ...

Ah; thanks.  Yes, the symptoms do look similar.

On Wed, Jun 12, 2013 at 08:51:43AM +0100, Anton Shterenlikht wrote:
> I haven't seen this.
>=20
> I've been using xfig for quite a few years now,
> on and off, not heavily, on a range of arches
> and OS versions. Lately I've been using
> the server/client model. My X setup is bare bones.
> ...

Heh.  I've just been using my laptop; both X11 client & server on
the same machine.  I use piewm (a variant of tvtwm, which is based
on twm) as my window manager.  (And have been using piewm for many years;
had used tvtwm back on the Sun 3/60.)

> Anyway, what I'm trying to say that maybe I
> haven't seen any problems with xfig because my
> setup is so simple.

:-}

> I hope you solve your problem, as xfig is still
> a very useful program.
> ....

Well, I admit that I found it rather more useful when I could use it. :-)
(In the case that catalyzed all this, I ended up editing the "fig" file.
I'd rather not resort to that again.)

What more would be helpful for me to provide in a PR?

Thanks!

Peace,
david
--=20
David H. Wolfskill				david@catwhisker.org
Taliban: Evil men with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

--sdOeJE8sLwpQaOMV
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iEYEARECAAYFAlG44NcACgkQmprOCmdXAD0NbACdGBg9H3Z1pmlW3JyJNv1wma0e
A5gAnj3LPQLqTmwxcx1d7kORmib8tkfT
=IBlO
-----END PGP SIGNATURE-----

--sdOeJE8sLwpQaOMV--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130612205800.GA1369>