Date: Tue, 21 Oct 2003 13:48:24 +0100 To: lablgtk at kaba.or.jp Subject: Re: Crashing bug in lablgtk2 2.2.0 when reading image from pixmap (Windows only) Message-ID: <20031021124824.GC5277 at redhat.com> References: <20031021123817.GA5277 at redhat.com> <20031021124207.GB5277 at redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031021124207.GB5277 at redhat.com> From: Richard Jones OK, ignore the previous version. Here is a much more minimal way to reproduce the bug. After compiling & running it, click on the button a few times and notice the console error messages. The problem seems to be caused by the let img = ... line. Removing that line makes the crashes go away. ---------------------------------------------------------------------- (* Reproduce Windows Gtk crashing bug. *) let do_it () = prerr_endline "Button pressed ..."; let width, height = 500, 400 in let pb = GdkPixbuf.create ~width ~height () in let pm, _ = GdkPixbuf.create_pixmap pb in let img = Gdk.Image.get pm ~x:0 ~y:0 ~width ~height in Gc.full_major () let () = let title = "Printing test" in let window = GWindow.window ~title () in window#connect#destroy GMain.quit; let button = GButton.button ~label:"Click me!" ~packing:window#add () in button#connect#clicked ~callback:do_it; window#show (); GMain.main () ---------------------------------------------------------------------- -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you. "I wish more software used text based configuration files!" -- A Windows NT user, quoted on Slashdot.