运行 GTK 时出现 X 错误+应用

发布于 2024-08-29 01:05:49 字数 701 浏览 6 评论 0原文

我已经编写了一个 GTK+ 应用程序,但在运行它时遇到以下 X Window 错误:

    The program 'TestApp' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadMatch (invalid parameter attributes)'.
      (Details: serial 222 error_code 8 request_code 2 minor_code 0)
      (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.)

此错误的原因可能是什么?我用 C 语言编写了这个应用程序。

I have written a GTK+ application but I am getting the following X Window error while running it:

    The program 'TestApp' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadMatch (invalid parameter attributes)'.
      (Details: serial 222 error_code 8 request_code 2 minor_code 0)
      (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.)

What might be the cause of this error? I have written this app in in C.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

Hello爱情风 2024-09-05 01:05:49

我会尝试按照它的建议进行操作:使用 --sync cmd 选项运行应用程序并在调试器中启动它,这样您就可以看到哪一行导致了错误。

I would try doing as it suggests: run the application with the --sync cmd option and start it in a debugger, so you can see which line causes the error.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文