OCaml Forge
SCM

Detail: [#1359] segfault due to GtkIconView type mismatch

Bugs: Browse | Download .csv | Monitor

[#1359] segfault due to GtkIconView type mismatch

Date:
2013-12-30 17:50
Priority:
3
State:
Closed
Submitted by:
Thomas Leonard (talex5)
Assigned to:
Nobody (None)
Hardware:
PC
Resolution:
Fixed
Severity:
None
Version:
None
Component:
None
Operating System:
Linux
Product:
None
 
URL:
Summary:
segfault due to GtkIconView type mismatch

Detailed description
If I use icon_view#get_path_at_pos, my program segfaults. It looks like these definitions are inconsistent (path option vs path):

ML_3 (gtk_icon_view_get_path_at_pos, GtkIconView_val, Int_val, Int_val,
Val_option_GtkTreePath)

external get_path_at_pos: [>`gtkiconview] obj -> int -> int -> [<`gtktreepath] obj = "ml_gtk_icon_view_get_path_at_pos"

This workaround fixes it for me:

let path_unsafe = icon_view#get_path_at_pos x y in
let path : Gtk.tree_path option = Obj.magic path_unsafe in
...

Thanks,

Followup

Message
Date: 2014-09-18 06:00
Sender: Jacques Garrigue

Fixed by commit b10b87 of 2013-12-31
Date: 2014-02-22 15:18
Sender: Thomas Leonard

It appears that this is now fixed:

https://forge.ocamlcore.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=lablgtk/lablgtk.git;a=commitdiff;h=b10b8705bbb7d8462fc4baf6b33b64482ce47c49

So, this bug can probably be closed. Thanks!

Attached Files:

Changes:

Field Old Value Date By
status_idOpen2014-09-18 06:00garrigue
close_dateNone2014-09-18 06:00garrigue
ResolutionNone2014-09-18 06:00garrigue