xterm crashes when compiz is on
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | xterm (Ubuntu) |
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://
100 /var/lib/
(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_
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_
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=
values=
#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 ()
| Bryce Harrington (bryce) wrote : | #2 |
The code in question is:
1684: leftcol = x0 / CurFontWidth(
1685: if (leftcol < 0)
1686: leftcol = 0;
Maybe for whatever reason, CurFontWidth() returns 0 sometimes under Compiz?
| Changed in xterm: | |
| status: | New → Incomplete |
| Bryce Harrington (bryce) wrote : | #3 |
Maybe try out this patch?
| Andrey Shytov (avshytov) wrote : | #4 |
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?
| Changed in xterm: | |
| importance: | Undecided → High |
| milestone: | none → intrepid-alpha-3 |
| status: | Incomplete → In Progress |
| Bryce Harrington (bryce) wrote : | #5 |
I've forwarded the patch upstream for comment. Meanwhile, can anyone else test and verify the patch as solving the issue?
| Changed in xterm: | |
| assignee: | nobody → bryceharrington |
| Thomas Dickey (dickey-his) wrote : | #6 |
That might be the same as Fedora #437928 - fixed (I think) in xterm #235.
| Bryce Harrington (bryce) wrote : | #7 |
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 |


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.