所有的东西都安装和编译成功了,我得到了这个可爱的输出,有人有主意吗?(这是一个没有x服务器的centos 5.7,所以我使用臭名昭著的xvfb运行来模拟它)

./xvfb-run ./CutyCapt
Locking assertion failure.  Backtrace:
#0 /usr/lib64/libxcb-xlib.so.0 [0x7f58396d690c]
#1 /usr/lib64/libxcb-xlib.so.0(xcb_xlib_unlock+0x24) [0x7f58396d6a14]
#2 /usr/lib64/libX11.so.6 [0x7f58399260f0]
#3 /usr/lib64/libXfixes.so.3(XFixesQueryVersion+0x4f) [0x37e8a03c9f]
#4 /usr/lib64/qt47/libQtGui.so.4 [0x7f583b7268ce]
#5 /usr/lib64/qt47/libQtGui.so.4(_ZN19QApplicationPrivate9constructEP9_XDisplaymm+0xde)         [0x7f583b6a741e]
#6 /usr/lib64/qt47/libQtGui.so.4(_ZN12QApplicationC1ERiPPcbi+0x78) [0x7f583b6a8088]
#7 ./CutyCapt(_ZN8QWebPage13triggerActionENS_9WebActionEb+0x1756) [0x4049be]
#8 /lib64/libc.so.6(__libc_start_main+0xf4) [0x312481d994]
#9 ./CutyCapt(_ZN7QObject5eventEP6QEvent+0x161) [0x4039e9]
CutyCapt: xcb_xlib.c:82: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
./xvfb-run: line 168:  2362 Aborted                 DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE     "$@" 2>&1

相比之下,这一个运行正常:
./xvfb-run /usr/bin/xclock

最佳答案

我通过设置libxcb_allow_sloppy_lock环境变量修复了此问题:

export LIBXCB_ALLOW_SLOPPY_LOCK=1

10-06 06:33