nxagent crashes when xeyes is started
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NX X remote server |
New
|
Undecided
|
Unassigned |
Bug Description
I am running a Debian/Squeeze system with the following nx packages:
freenx-server 0.7.3.git110520
nx-common 0.3.1+svn59-
nxagent 1:3.5.0-
nxlibs 1:3.5.0-
The xeyes that lets the nxagent crash comes from: x11-apps_7.5+5
When you do a gdb-stacktrace on the coredump produced, you'll get:
Core was generated by `/usr/bin/nxagent -persistent -D -name NX - lw230024@
Program terminated with signal 11, Segmentation fault.
#0 0x00000000004a8bac in nxagentTrapezoids (op=3 '\003', pSrc=0x2f35850,
pDst=0x2f2f9c0, maskFormat=<value optimized out>, xSrc=0, ySrc=0, ntrap=7,
traps=
1724 if (NXAGENT_
(gdb) bt
#0 0x00000000004a8bac in nxagentTrapezoids (op=3 '\003', pSrc=0x2f35850,
pDst=0x2f2f9c0, maskFormat=<value optimized out>, xSrc=0, ySrc=0, ntrap=7,
traps=
#1 0x00000000004300d6 in ProcRenderTrape
at X/NXrender.c:1124
#2 0x000000000042b9cd in ProcRenderDispatch (client=0x0) at X/NXrender.c:2520
#3 0x000000000042b08f in Dispatch () at X/NXdispatch.c:747
#4 0x0000000000458657 in CreateConnectio
argv=<value optimized out>, envp=<value optimized out>) at main.c:663
#5 main (argc=<value optimized out>, argv=<value optimized out>,
envp=<value optimized out>) at main.c:446
Digging a tiny bit further, I noticed that the crash is caused by pSrc->pDrawable being a NULL pointer in ProcRenderTrape
--- ./programs/
+++ ./programs/
@@ -1082,6 +1082,7 @@
VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAc
+ if (!pSrc->pDrawable) return BadDrawable; /* Leo */
if (!pDst->pDrawable)
return BadDrawable;
if (pSrc->pDrawable && pSrc->pDrawable
When xeyes is started with this patch, you'll get:
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 149 (RENDER)
Minor opcode of failed request: 10 (RenderTrapezoids)
Resource id in failed request: 0x80000a
Serial number of failed request: 61
Current serial number in output stream: 65
Which is much better than crashing ;-) But since my 'normal' Xserver does not crash, there must be a better solution...
The crash is very reproducable. It has something to do with the use of the Xrender library. If xeyes is compiled without XRENDER nxagent will do fine.
As an extra datapoint. I believe this is exactly the same bug: https:/