Help debugging xfig lockup?

David Wolfskill david at catwhisker.org
Wed Jun 12 20:58:02 UTC 2013


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.
> 
> 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 
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 
load: 0.73  cmd: xfig 33534 [running] 11.41r 5.14u 0.01s 38% 6476k

Program received signal SIGTERM, Terminated.
0x28206db1 in DoLayout (bbw=0x289eb600, width=0, height=0, 
    reply_width=0xbfbfc29e, reply_height=0xbfbfc29c, position=0 '\0')
    at Box.c:179
179         for (i = 0; i < bbw->composite.num_children; i++) {
(gdb) bt
#0  0x28206db1 in DoLayout (bbw=0x289eb600, width=0, height=0, 
    reply_width=0xbfbfc29e, reply_height=0xbfbfc29c, position=0 '\0')
    at Box.c:179
#1  0x28207346 in PreferredSize (widget=0x289eb600, constraint=0xbfbfc3b4, 
    preferred=0xbfbfc39c) at Box.c:358
#2  0x28283f86 in XtQueryGeometry (widget=0x289eb600, intended=0xbfbfc3b4, 
    reply=0xbfbfc39c) at Geometry.c:789
#3  0x2822b71f in ComputeLayout (widget=0x289eb300, query=1 '\001', 
    destroy_scrollbars=1 '\001') at Viewport.c:589
#4  0x28298454 in XtSetValues (w=0x289eb300, args=0x81b2120, num_args=0)
    at SetValues.c:407
#5  0x080e2589 in sel_mode_but (widget=0x289f1400, closure=0x8171944, 
    event=0xbfbfd404, continue_to_dispatch=0xbfbfce0b "\001\224'+(\004")
    at w_modepanel.c:639
#6  0x2828152f in XtDispatchEventToWidget (widget=0x289f1400, event=0xbfbfd404)
    at Event.c:882
#7  0x28281b03 in _XtDefaultDispatcher (event=0xbfbfd404) at Event.c:1367
#8  0x28280b10 in XtDispatchEvent (event=0xbfbfd404) at Event.c:1423
#9  0x08085768 in main (argc=Error accessing memory address 0x1e: Bad address.
) at main.c:1551
(gdb) p tool_app
$1 = 0x2886b0c0
(gdb) p event
No symbol "event" in current context.
(gdb) p splash_onscreen
$2 = 0
(gdb) q

From 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 conditions.
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 
load: 0.87  cmd: xfig 24199 [running] 28.43r 15.91u 0.05s 85% 6448k

Program received signal SIGTERM, Terminated.
0x28206db1 in DoLayout (bbw=0x289eb600, width=0, height=0, 
    reply_width=0xbfbfc29e, reply_height=0xbfbfc29c, position=0 '\0')
    at Box.c:179
179         for (i = 0; i < bbw->composite.num_children; i++) {
(gdb) bt
#0  0x28206db1 in DoLayout (bbw=0x289eb600, width=0, height=0, 
    reply_width=0xbfbfc29e, reply_height=0xbfbfc29c, position=0 '\0')
    at Box.c:179
#1  0x28207346 in PreferredSize (widget=0x289eb600, constraint=0xbfbfc3b4, 
    preferred=0xbfbfc39c) at Box.c:358
#2  0x28283f86 in XtQueryGeometry () from /usr/local/lib/libXt.so.6
#3  0x2822b71f in ComputeLayout (widget=0x289eb300, query=1 '\001', 
    destroy_scrollbars=1 '\001') at Viewport.c:589
#4  0x28298454 in XtSetValues () from /usr/local/lib/libXt.so.6
#5  0x080e2589 in sel_mode_but (widget=0x289f1400, closure=0x8171944, 
    event=0xbfbfd404, continue_to_dispatch=0xbfbfce0b "\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=Error accessing memory address 0xb: Bad address.
) at main.c:1551
(gdb) p i
$1 = 11
(gdb) p bbw->composite.num_children
$2 = 33
(gdb) p bbw->composite.children[i]->core.width
$3 = 64
(gdb) p w
$4 = 76
(gdb) p h_space
$5 = 0
(gdb) p width
$6 = 0
(gdb) p bbw->box.h_space
$7 = 0
(gdb) p h_space
$8 = 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.
> >
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=161070&cat=
> ...

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.
> 
> 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
-- 
David H. Wolfskill				david at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-x11/attachments/20130612/8276a505/attachment.sig>


More information about the freebsd-x11 mailing list