[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIGSEGV when hitting F2
Ok, I got the bug working again.
SYSTEM: Mandrake 7.1, 2.2.17, Celeron 500@500, 392M of RAM
VERSION: xwpe-1.5.23a
Here is the step through the program. I still can't obtain
the backtrace...
I attached gdb when xwpe was waiting for an x event
and I used next until the program
Attaching to program: /home/nuser/xwpe-1.5.24a/xwpe, Pid 2693
Reading symbols from /usr/lib/libgpm.so.1...done.
Reading symbols from /usr/lib/libncurses.so.5...done.
Reading symbols from /usr/X11R6/lib/libSM.so.6...done.
Reading symbols from /usr/X11R6/lib/libICE.so.6...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
0x401eac7e in select () from /lib/libc.so.6
(gdb) bt
#0 0x401eac7e in select () from /lib/libc.so.6
#1 0x4014c3d8 in ?? () from /usr/X11R6/lib/libX11.so.6
#2 0x400bcc37 in _XRead () from /usr/X11R6/lib/libX11.so.6
#3 0x400bcb4a in _XReadEvents () from /usr/X11R6/lib/libX11.so.6
#4 0x400afa3a in XNextEvent () from /usr/X11R6/lib/libX11.so.6
#5 0x8098792 in e_x_getch () at we_xterm.c:523
#6 0x80543fe in e_eingabe (e=0x80bc510) at we_edit.c:404
#7 0x804ae3b in main (argc=2, argv=0xbffff764) at we_main.c:413
(gdb) frame 5
#5 0x8098792 in e_x_getch () at we_xterm.c:523
523 XNextEvent(WpeXInfo.display, &report);
(gdb) l
518 return(-c);
519 }
520
521 while (1)
522 {
523 XNextEvent(WpeXInfo.display, &report);
524
525 switch (report.type)
526 {
527 case Expose:
(gdb) b 525
Breakpoint 1 at 0x8098792: file we_xterm.c, line 525.
(gdb) continue
Continuing.
Breakpoint 1, e_x_getch () at we_xterm.c:525
525 switch (report.type)
(gdb) l
520
521 while (1)
522 {
523 XNextEvent(WpeXInfo.display, &report);
524
525 switch (report.type)
526 {
527 case Expose:
528 do
529 {
(gdb) next
562 charcount = XLookupString(&report.xkey, buffer, BUFSIZE,
&keysym,
(gdb) next
564 key_b = report.xkey.state;
(gdb) next
565 if (charcount == 1)
(gdb) next
564 key_b = report.xkey.state;
(gdb) next
565 if (charcount == 1)
(gdb) next
588 c = 0;
(gdb) next
589 if (key_b & ControlMask)
(gdb) next
610 else if (key_b & WpeXInfo.altmask)
(gdb) next
627 if (keysym == XK_Left) c = CLE;
(gdb) next
628 else if (keysym == XK_Right) c = CRI;
(gdb) next
629 else if (keysym == XK_Up) c = CUP;
(gdb) next
630 else if (keysym == XK_Down) c = CDO;
(gdb) next
631 else if (keysym == XK_Home) c = POS1;
(gdb) next
632 else if (keysym == XK_End) c = ENDE;
(gdb) next
633 else if (keysym == XK_Insert) c = EINFG;
(gdb) next
634 else if (keysym == XK_Delete) c = ENTF;
(gdb) next
635 else if (keysym == XK_BackSpace) c = CtrlH;
(gdb) next
636 else if (keysym == XK_Prior) c = BUP;
(gdb) next
637 else if (keysym == XK_Next) c = BDO;
(gdb) next
638 else if (keysym == XK_F1) c = F1;
(gdb) next
639 else if (keysym == XK_F2) c = F2;
(gdb) next
663 if (key_b & ShiftMask)
(gdb) next
0x8099060 713 }
(gdb) next
e_eingabe (e=0x80bc510) at we_edit.c:405
405 else cc = c;
(gdb) next
410 if ((c > 31 || (c == WPE_TAB && !(f->flg & 1)) ||
(gdb) next
418 else if (c == WPE_DC)
(gdb) next
449 else if (c == ENTF || c == 4)
(gdb) next
465 else if (c == WPE_CR)
(gdb) next
480 else if (c == WPE_TAB)
(gdb) next
499 ret = e_tst_cur(c, e); /*up/down arrows go this way*/
(gdb) next
500 if (ret != 0) ret = e_tst_fkt(c, e);
(gdb) next
Program received signal SIGSEGV, Segmentation fault.
0x805925d in e_save (f=Cannot access memory at address 0xbf006b69
) at we_fl_fkt.c:196
196 return(ret);
(gdb) bt
#0 0x805925d in e_save (f=Cannot access memory at address 0xbf006b69
) at we_fl_fkt.c:196
Cannot access memory at address 0xbf006b61
(gdb)
---- I then put a breakpoint at we_fl_fkt.c:196
(gdb) b we_fl_fkt.c:196
Breakpoint 1 at 0x8059258: file we_fl_fkt.c, line 196.
(gdb) continue
Continuing.
Breakpoint 1, e_save (f=Cannot access memory at address 0xbf006b69
) at we_fl_fkt.c:196
196 return(ret);
(gdb) bt
#0 e_save (f=Cannot access memory at address 0xbf006b69
) at we_fl_fkt.c:196
Cannot access memory at address 0xbf006b61
(gdb) step
Program received signal SIGSEGV, Segmentation fault.
0x805925d in e_save (f=Cannot access memory at address 0xbf006b69
) at we_fl_fkt.c:196
196 return(ret);
I think the bug is in the address of the finction e_save() and is
corrupted...
Please tell me if the information given above is useful.
I am quite new at programming / debuging.
Voila :-)
--
Windows is not the only operating system in the world.
Try LINUX, Try Free BSD
Jeremy Bar
____________________________________________________________________________