xterm crashes when compiz is on

Bug #199285 reported by Leo Zhadanovsky
28
Affects Status Importance Assigned to Milestone
xterm (Ubuntu)
Fix Released
High
Bryce Harrington

Bug Description

Binary package hint: xterm

This seems to happen at random times when compiz is running on Ubuntu Gutsy on an x86_64 architecture:

xterm:
  Installed: 229-1
  Candidate: 229-1
  Version table:
 *** 229-1 0
        500 http://astromirror.uchicago.edu gutsy/main Packages
        100 /var/lib/dpkg/status

(gdb) run
Starting program: /usr/bin/xterm
[Thread debugging using libthread_db enabled]
[New Thread 47837066338144 (LWP 27542)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47837066338144 (LWP 27542)]
0x0000000000430b42 in handle_translated_exposure (xw=0x6919d0, rect_x=0,
    rect_y=0, rect_width=579, rect_height=316) at ../util.c:1684
1684 ../util.c: No such file or directory.
        in ../util.c
(gdb) bt
#0 0x0000000000430b42 in handle_translated_exposure (xw=0x6919d0, rect_x=0,
    rect_y=0, rect_width=579, rect_height=316) at ../util.c:1684
#1 0x0000000000425544 in Redraw () at ../misc.c:1119
#2 0x000000000042cfd7 in ScrollBarOn (xw=0x6919d0,
    init=<value optimized out>, doalloc=1) at ../scrollbar.c:488
#3 0x000000000040ddaa in VTRealize (w=0x6919d0, valuemask=0x7fffbe46ad78,
    values=0x7fffbe46ace0) at ../charproc.c:6250
#4 0x00002b81ed3658a6 in ?? () from /usr/lib/libXt.so.6
#5 0x00002b81ed3659ee in ?? () from /usr/lib/libXt.so.6
#6 0x00002b81ed365c80 in XtRealizeWidget () from /usr/lib/libXt.so.6
#7 0x000000000040fe5b in VTInit () at ../charproc.c:4976
#8 0x000000000041e236 in spawnXTerm (xw=0x6919d0) at ../main.c:3245
#9 0x0000000000420257 in main (argc=0, argv=<value optimized out>)
    at ../main.c:2289
#10 0x00002b81edf4fb44 in __libc_start_main () from /lib/libc.so.6
#11 0x00000000004075b9 in _start ()

Revision history for this message
Alexandre Kandalintsev (spam-messir) wrote :

i've got i386 ubuntu 8.04 beta with all updates, but xterm segfaults too:
exe@hpc:~$ xterm
exe@hpc:~$ xterm
exe@hpc:~$ xterm
exe@hpc:~$ xterm
Segmentation fault
exe@hpc:~$ xterm
exe@hpc:~$ xterm
Segmentation fault
exe@hpc:~$ xterm

dmesg:
[ 927.659159] xterm[7524]: segfault at 0006b6d0 eip 08078573 esp bfe9d2a0 error 4
[ 935.539358] xterm[7627]: segfault at 0006b6d0 eip 08078573 esp bfe0ccf0 error 4
[ 937.095808] xterm[7645]: segfault at 0006b6d0 eip 08078573 esp bfb6f250 error 4

I can't provide backtrace as with gdb xterm didn't segfault.

Revision history for this message
Bryce Harrington (bryce) wrote :

The code in question is:

1684: leftcol = x0 / CurFontWidth(screen, screen->cur_row);
1685: if (leftcol < 0)
1686: leftcol = 0;

Maybe for whatever reason, CurFontWidth() returns 0 sometimes under Compiz?

Changed in xterm:
status: New → Incomplete
Revision history for this message
Bryce Harrington (bryce) wrote :

Maybe try out this patch?

Revision history for this message
Andrey Shytov (avshytov) wrote :

I have a different suggestion. I traced out the relevant variables and found that CurFontWidth fails because screen->visbuf pointer is trashed. I figured out how it got that way: in the handling of a (premature?) resize event, when screen->allbuf == NULL. The patch is enclosed.

However, I am not sure this patch is the way to go. May be, the very fact that ScreenResize is executed at this stage indicates another bug?

Bryce Harrington (bryce)
Changed in xterm:
importance: Undecided → High
milestone: none → intrepid-alpha-3
status: Incomplete → In Progress
Revision history for this message
Bryce Harrington (bryce) wrote :

I've forwarded the patch upstream for comment. Meanwhile, can anyone else test and verify the patch as solving the issue?

Bryce Harrington (bryce)
Changed in xterm:
assignee: nobody → bryceharrington
Revision history for this message
Thomas Dickey (dickey-his) wrote :

That might be the same as Fedora #437928 - fixed (I think) in xterm #235.

Revision history for this message
Bryce Harrington (bryce) wrote :

xterm 235-1ubuntu1 is in intrepid now. Based on the above comments, I'm assuming this to be fixed now. If not, please reopen.

Changed in xterm:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.