From: Olivier Andrieu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="qsL0cSs/GV" Content-Transfer-Encoding: 7bit Message-ID: <16133.36230.879427.900061 at akasha.ijm.jussieu.fr> Date: Fri, 4 Jul 2003 16:21:58 +0200 To: Richard Jones Cc: lablgtk at kaba.or.jp Subject: Re: drawable#gc_values: segmentation fault In-Reply-To: <20030704132350.GA27526 at redhat.com> References: <20030704132350.GA27526 at redhat.com> --qsL0cSs/GV Content-Type: text/plain; charset=us-ascii Content-Description: message body and .signature Content-Transfer-Encoding: 7bit Richard Jones [Friday 4 July 2003] : > > $ ocaml -I +lablgtk lablgtk.cma gtkInit.cmo > Objective Caml version 3.06 > > # let window = GWindow.window ();; > val window : GWindow.window = > # let area = GMisc.drawing_area ~packing:window#add ();; > val area : GMisc.drawing_area = > # area#misc#realize ();; > - : unit = () > # let drawable = new GDraw.drawable area#misc#window;; > val drawable : [ `window] GDraw.drawable = > # window#show ();; > - : unit = () > # drawable#gc_values;; > Segmentation fault > Looks like a copy-n-paste bug. Does the attached patch fix the segfault ? -- Olivier --qsL0cSs/GV Content-Type: text/plain Content-Disposition: attachment Content-Transfer-Encoding: 7bit --- ml_gdk.c.~1.73.~ 2003-06-25 11:32:02.000000000 +0200 +++ ml_gdk.c 2003-07-04 16:17:22.000000000 +0200 @@ -556,11 +556,11 @@ tmp = ml_some(Val_GdkPixmap(values.tile)); Store_field(ret, 5, tmp); } - if (values.tile) { + if (values.stipple) { tmp = ml_some(Val_GdkPixmap(values.stipple)); Store_field(ret, 6, tmp); } - if (values.tile) { + if (values.clip_mask) { tmp = ml_some(Val_GdkPixmap(values.clip_mask)); Store_field(ret, 7, tmp); } --qsL0cSs/GV--