From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id DE290BC69 for ; Tue, 10 Apr 2007 02:19:48 +0200 (CEST) Received: from sys29.mail.msu.edu (sys29.mail.msu.edu [35.9.75.129]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3A0JlBi026724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 10 Apr 2007 02:19:48 +0200 Received: from shawjef3 by sys29.mail.msu.edu with local (Exim 4.52 #1) id 1Hb45K-0007eN-K8 for caml-list@inria.fr; Mon, 09 Apr 2007 20:19:46 -0400 From: "Jeffrey Loren Shaw" To: caml-list@inria.fr Subject: crash under macos x but not win32 Date: Mon, 09 Apr 2007 20:19:45 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: X-Virus: None found by Clam AV X-Miltered: at concorde with ID 461AD823.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; macos:01 ocaml:01 ocaml:01 mingw:01 opentk:01 mainloop:01 labltk:01 threads:01 threads:01 labltk:01 tcltk:01 tcltk:01 ocamlrun:01 interprete:01 ocamlrun:01 The following works as intended in Win32 (the ui counts slowly from 0 to 5), but crashes in Mac OS X with "Bus Error". I'm running ocaml 3.09.3 installed with macports. For windows I used the Ocaml 3.09.3 MinGW binary distribution. (* looptest.ml *) open Tk let testone () = let top = openTk () in let l = Label.create top in let loopfun () = ignore ( Thread.create (fun () -> for i=0 to 5 do Thread.delay 1.; Label.configure ~text:(string_of_int i) l done ) () ) in let b = Button.create ~text:"Run the test" ~command:loopfun top in pack [l]; pack [b]; mainLoop ();; testone () (* end looptest.ml *) runs with: ocaml -I +labltk -I +threads unix.cma threads.cma labltk.cma looptest.ml Any ideas? Perhaps the following information will help, I don't know. Thread 3 Crashed: 0 com.tcltk.tklibrary 0x9acead88 Tk_FreeGC + 30 1 com.tcltk.tklibrary 0x9acbe64d TkButtonWorldChanged + 117 2 com.tcltk.tklibrary 0x9acbed53 ConfigureButton + 1400 3 com.tcltk.tklibrary 0x9acbf68f ButtonWidgetObjCmd + 416 4 com.tcltk.tcllibrary 0x9ac2b2c3 TclInvokeObjectCommand + 264 5 dlllabltk.so 0x000e294b camltk_tcl_direct_eval + 623 6 ocamlrun 0x00012ba3 caml_interprete + 6262 7 ocamlrun 0x0000e0ba caml_callbackN_exn + 185 8 ocamlrun 0x0000e103 caml_callback_exn + 38 9 dllthreads.so 0x000d73e8 caml_thread_start + 80 10 libSystem.B.dylib 0x90024147 _pthread_body + 84 Thread 3 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x9acead78 ecx: 0x0c5a9048 edx: 0x00000015 edi: 0x01668608 esi: 0x00000000 ebp: 0xb0203838 esp: 0xb0203810 ss: 0x0000001f efl: 0x00010286 eip: 0x9acead88 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037