handling X's BadAlloc errors in programs



 Hi, 

 I'm running my program on a diskless workstation with 32 mb of RAM, and
sometimes (after working for several days) the program prints something like
this on stderr:
Gdk-ERROR **: BadAlloc (insufficient resources for operation)
  serial 420707 error_code 11 request_code 53 minor_code 0
and its window (it has only 1 window) disappears, but application still runs,
and I have to kill the app manually.

 Ideally I would like my app to be terminated when BadAlloc occurs - could you
please suggest me how to modify my app to achive this? There are
gdk_error_trap_{push,pop} in gdk, but they are completely undocumented in
RDP - are there are examples/docs on its use? It would be nice if it was
possible to tell gtk/gdk once and for all that programs needs to be terminated
on X error - but is it possible in gdk?

 I'm using gtk-1.2.10.

 Thank you in advance.
 
 Best regards,
  -Vlad




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