运行部分程序出现 X Window System error
程序错误现象:在非终端中启动时,可能会等待一段时间,然后自动关闭了。
在终端下运行时有类似这样的错误提示:
代码: 全选
The program 'xxxxxxx' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
(Details: serial 416 error_code 11 request_code 148 minor_code 5)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
a.在/etc/X11/xorg.conf里面加上
代码: 全选
#solve the debian package-maintainer error
Section "Extensions"
Option "MIT-SHM" "no"
EndSection
2008.01.19的更新解决了这个内存泄露的bug,不过还是希望大家在这次错误中学到一些东西,建议详细了解一下xorg.conf的具体配置和一些特殊的参数。从中我们可以更加了解X server支持的东西和一些图形界面显示的属性、知识。
另外补充说明这些东西的意思:
Definition: MIT-SHM: A MIT shared-memory Ximage ef {X extension}. It provides both shared memory XImages and shared memory pixmaps based on the SYSV shared memory primitives.
MIT-SHM扩展是XFree86提供System V共享X进程内存的程序,Caldera OpenLinux 3.1和3.1.1已经带有这个程序,而4.1-12已经支持这个共享内存机制。