Re: Crash of Frama-C IDE with OCaml 4.02
Adrien Nader <[email protected]> Tue, 16 Sep 2014 21:46:37 +0200
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
Hmpf.
I am currently on my previous computer which I don't usually use and
checked my lablgtk git repository. There is commit which I've never pushed
(because I wanted to test more iirc):
Revert "GtkSignal.connect_property: don't fetch the property value by hand."
This reverts commit adf6b7a5972356eddfdd6cb5243e4eaf8ea59d02.
After rebuilding and testing for something unrelated, I got a bunch of
error messages like the following:
In callback for signal notify::progress, uncaught exception:
Failure("GtkSignal.marhsal1 : notify::progress")
There might be a simple and clean way to use marshallers instead of
manually fetching the property we need but I don't know how to do it.
This is maybe a bit less elegant and a tiny bit slower but at least it
works.
(* notify::foo signals seems to be some glib internal that noone ever
* thought would be interesting to document *)
It matches exactly the issue you've described. The diff (of the revert) is:
let connect_property ~(prop:('a, _) property) ~callback (obj : 'a obj) =
let name = "notify::" ^ prop.Gobject.name in
- let marshaller = marshal1 prop.conv name in
- connect_aux ~name ~marshaller ~callback obj
+ let callback = fun () -> callback (get prop obj) in
+ connect_aux ~name ~marshaller:marshal_unit ~callback obj
Is anyone able to comment on it and make sure there isn't a third way to
do things or that the current code doesn't have some obvious stupid bug?
--
Adrien Nader