« Return to Thread: Re: RE : Segfault when removing or setting an invalid GTree.iter

RE : Segfault when removing or setting an invalid GTree.iter

by MONATE Benjamin 205998 :: Rate this Message:

Reply to Author | View in Thread

Hi,

> But shouldn't LablGTK raise an exception when a GTree.iter invalid is going
> to be used?

First, Gtk does not give any warranty that a critical error will be emitted before accessing an invalid iterator.
Second, the message is tiggered in the middle of a C function of Gtk. No exception can be raised properly from this context without changing the source of Gtk itself. The same problem exists with callbacks raising exceptions.
You may want to play with
Glib.Message.set_log_handler
  ~domain:"Gtk"
  ~levels:[ `CRITICAL] (fun ~level s -> prerr_endline s; exit 1);;
but any raised exception will be ignored.

Hope this helps,
Benjamin

_______________________________________________
Lablgtk mailing list
Lablgtk@...
http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk

 « Return to Thread: Re: RE : Segfault when removing or setting an invalid GTree.iter

LightInTheBox - Buy quality products at wholesale price!