views:

46

answers:

1

Hi Guys,

Im having some problems with a GTK program im trying to build.

When i compile it i keep getting this error:

This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
(Details: serial 195 error_code 11 request_code 53 minor_code 0)

Ive traced it down to the following command that appears to be causing it:

gtk_box_pack_start(GTK_BOX (Top_Graph), Widget_Get (Graph_Cpu), TRUE, TRUE, 0);

Top_Graph and Graph_Cpu are both GtkVbox Widgets.

Has anyone ever seen an error like this, and could they give me some advice as to how it is caused.

Regards

Paul

A: 

This is X server error. These errors are reported asynchronously (some time after the erroneous command was issued). Try running your program with --sync command line option and see what then happens.

buratinas
Not informative, that is the debug that gets printed out when the error happens
paultop6
Wow, remind me never to post answers to your questions paultop6. You get voted down for giving a useful answer.He's right though. X errors are reported asynchronously, so the line you're claiming to have traced this down to is inaccurate. There's no way gtk_box_pack_start() can directly generate an X error. You can run with --sync under gdb, although you're not going to be able to trace the error down to a particular line of code. But you may be able to trace it down to a particular window and widget, which should help some.
bratsche