Gdk-ERROR,请高手帮忙

w0911h 2009-06-01 09:16:52
我的一个项目用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(),正在测试中,不知道有没有用。
...全文
345 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
w0911h 2009-06-04
  • 打赏
  • 举报
回复
今天程序没有崩溃,昨天把图片合成部分的代码看了一遍,把可能出错的地方都进行了处理,这么看来问题可能出在那,再跑一段时间不出问题就结帖了
meitolake 2009-06-02
  • 打赏
  • 举报
回复
上面的錯誤信息讓運行程序時加上選項--sync,你加了嗎?不知是否這樣能給出更有用的信息。
w0911h 2009-06-02
  • 打赏
  • 举报
回复
今天来的时候还是崩溃了,看样子我只能把一些线程注释掉慢慢测试了
性能侠客行 2009-06-01
  • 打赏
  • 举报
回复
用gdb 调试看看..
w0911h 2009-06-01
  • 打赏
  • 举报
回复
没人知道是什么原因吗,有谁知道有什么方法可以跟踪此类错误的也行,就像.net那样直接从编译器运行,到哪里出错就会停在那里,linux下有这样的工具吗
Table of Contents I. API Reference Initialization and Versions - Library version numbers. The GdkPixbuf Structure - Information that describes an image. Reference Counting and Memory Mangement - Functions for reference counting and memory management on pixbufs. File Loading - Loading a pixbuf from a file. File saving - Saving a pixbuf to a file. Image Data in Memory - Creating a pixbuf from image data that is already in memory. Inline data - Functions for inlined pixbuf handling. Scaling - Scaling pixbufs and scaling and compositing pixbufs Rendering - Rendering a pixbuf to a GDK drawable. Drawables to Pixbufs - Getting parts of a GDK drawable's image data into a pixbuf. Utilities - Utility and miscellaneous convenience functions. Animations - Animated images. GdkPixbufLoader - Application-driven progressive image loading. Module Interface - Extending gdk-pixbuf gdk-pixbuf Xlib initialization - Initializing the gdk-pixbuf Xlib library. Xlib Rendering - Rendering a pixbuf to an X drawable. X Drawables to Pixbufs - Getting parts of an X drawable's image data into a pixbuf. XlibRGB - Rendering RGB buffers to X drawables. II. Tools Reference gdk-pixbuf-csource - C code generation utility for GdkPixbuf images gdk-pixbuf-query-loaders - GdkPixbuf loader registration utility Index Index of deprecated symbols Index of new symbols in 2.2 Index of new symbols in 2.4 Index of new symbols in 2.6 Index of new symbols in 2.8 A. Porting applications from Imlib to gdk-pixbuf Introduction Differences between Imlib and gdk-pixbuf Initialization Memory management The Rendering Process Converting Applications to gdk-pixbuf Image loading and creation Rendering Images Scaling Images

23,217

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧