Gdk-ERROR,请高手帮忙
我的一个项目用Gtk开发的,项目中有多个线程,还有一个更新界面的计时器函数,我的linux版本是fedora8,我每天晚上让程序通宵运行进行测试,每次运行几小时(也可能是十几小时)后就会报错然后异常终止,错误如下:
Gdk-ERROR **: The program 'dzjc' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadIDChoice (invalid resource ID chosen for this connection)'.
(Details: serial 14006053 error_code 14 request_code 155 minor_code 4)
(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.)
aborting...
请高手帮忙看看,这个错误可能是什么原因引起的,因为代码太多,所以没法贴了。
今天早上来的时候程序再次崩溃,我在计时器函数的界面更新代码前后加上了gdk_threads_enter()和gdk_threads_leave(),正在测试中,不知道有没有用。