Problems using GTK in Maya



I've attempted to write a dialog for Maya using GTK but it consistently 
causes segfaults.

The dialog will launch and return successfully but the next button I 
press will causes a Maya crash with the message

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


And so far I've been unable to geta  back trace out of GDB or Totalview.

I've narrowed it down to a test case 


	string create_dialog {
	    int argc = 0;
        char** argv = 0;
    
        // Initialize the widget set 
    	if (!gtk_init_check (&argc, &argv)) {
			return "";
    	}

		// drain the event loop
		while (gtk_events_pending ()) {                                                          
			gtk_main_iteration ();   
		}

		return "";
	}


either with or without the event loop draining.

Am I doing something fundamentally wrong? Do I need to do somethign with 
XEmbed? Is GTK just not suited to this? Do I need to sacrifice a 
different breed of chicken?

I'm using GTK 2.69 for what it's worth.

Simon 

-- 
X-Gleitschirmfliegen: macht Spaaaasss!




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]