C 我在这个GTK/webkit计划中遗漏了什么

C 我在这个GTK/webkit计划中遗漏了什么,c,linux,webkit,gtk,C,Linux,Webkit,Gtk,我有一个程序,它是我手上数月编码的结果,每当我alt+f4退出程序,然后立即重新启动它时,我就会出现这个错误 Segmentation fault (core dumped) ozan@ozan-PORTEGE-R700:~/dev/alpha2$ The program 'gtk-gnash' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWin

我有一个程序,它是我手上数月编码的结果,每当我alt+f4退出程序,然后立即重新启动它时,我就会出现这个错误

Segmentation fault (core dumped)
ozan@ozan-PORTEGE-R700:~/dev/alpha2$ The program 'gtk-gnash' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 202 error_code 3 request_code 12 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.)
The program 'gtk-gnash' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 202 error_code 3 request_code 12 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.)
The program 'gtk-gnash' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 198 error_code 3 request_code 12 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.)
The program 'gtk-gnash' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 198 error_code 3 request_code 12 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.)
The program 'gtk-gnash' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 198 error_code 3 request_code 12 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.)

这是终端中通常出现的错误消息。该程序有4个线程。我怀疑他们没有离开。问题是,如果我将alt+f4或ctrl+c移出主线程,如何使这些恶意线程退出。我总是会遇到这些错误,除非我在重新启动前等待大约30秒。你可能会说等一下,但我想让这东西工作起来。很抱歉打扰您:)

我猜在您尝试重新启动程序时,窗口句柄尚未被销毁。也许此链接将解决您的问题: