Number: 501
Title: Core dump in lefty when moving mouse
Submitter: watercloud
Date: 4 August 2004
Subsys: Dotty/Lneato/Lefty
Version: 1.13
System: linux-i386
Severity: major
Problem:
I use dotty ,and when I press the mouse middle button and drag it,then program lefy core dumped.

such as :


#0  0x0805d9f7 in find (tp=0x80bd1f4, ko=0x80895f0, sk=0x0) at tbl.c:479
479             if ((kvlp = tp->lp[GETSKINDEX (tp, sk)]))
(gdb) p/x sk
$1 = 0x0
(gdb) bt
#0  0x0805d9f7 in find (tp=0x80bd1f4, ko=0x80895f0, sk=0x0) at tbl.c:479
#1  0x0805d0d6 in Tfinds (to=0x80bd1f4, sk=0x80895f0 "003") at tbl.c:283
#2  0x080523e2 in GFXevent (evp=0xbfffef50) at gfxview.c:291
#3  0x0806ae6d in Gcwbutaction (w=0x80895f0, evp=0xbffff1d0, app=0x0,
anp=0x40101978) at gcanvas.c:1295
#4  0x400f2587 in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
#5  0x400f2abb in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
#6  0x400f30b3 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6
#7  0x400cb57b in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6
#8  0x400cc0c4 in _XtOnGrabList () from /usr/X11R6/lib/libXt.so.6
#9  0x400cc27f in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
#10 0x400d8407 in XtAppProcessEvent () from /usr/X11R6/lib/libXt.so.6
#11 0x0806c41d in Gprocessevents (waitflag=0, mode=G_MANYEVENTS) at
gcommon.c:275
#12 0x08058d19 in processinput (waitflag=1) at lefty.c:400
#13 0x08058a8a in main (argc=2, argv=0x1) at lefty.c:212

Comments:
[ek] this doesn't sound right.

these look very confused:


	#0  0x0805d9f7 in find (tp=0x80bd1f4, ko=0x80895f0, sk=0x0) at tbl.c:479
	#1  0x0805d0d6 in Tfinds (to=0x80bd1f4, sk=0x80895f0 "003") at tbl.c:283

sk in Tfinds should be pointing to an ascii string. I don't see how ko in find could be == sk in Tfinds. either this was compiled badly or there's some other bug there.
Fix:
add the line:


   if (sk == NULL) return NULL;
on lefy/tbl.c's 478 line number,then the bug fixed.
Owner: erg
Status: Fixed (4 August 2004)