Hi you all, the gurus of CFFI ;-)
I do have a major problem when running the following code on LW Personal Edition on Mac OS X 10.4.10 Intel:
;;; -*- mode: Lisp; Syntax: Common-Lisp; -*-
(eval-when (:load-toplevel :compile-toplevel :execute) (ignore-errors #-asdf (load "~/lw-start.lisp") #-cffi (asdf:operate 'asdf:load-op 'cffi) #-net.goenninger.app.debug (asdf:operate 'asdf:load-op 'net.goenninger.app.debug) ))
(defpackage #:lw-tk-test (:use #:common-lisp #:clos #:cffi #+net.goenninger.app.debug #:net.goenninger.app.debug ) (:export #:main ))
(in-package #:lw-tk-test) (in-module :lw-tk-test) ;; needed for debugging
;;; ------------------------------------------------------------------------ ----------------- ;;; SPECIAL VARS ;;; ------------------------------------------------------------------------ -----------------
(defparameter *tki* nil) ;; Pointer to Tcl/Tk Interp structure.
;;; ------------------------------------------------------------------------ ----------------- ;;; DEBUG... ;;; ------------------------------------------------------------------------ -----------------
#-net.goenninger.app.debug (defun logmsg (msg-class method method-desc msg &rest msg-args) (format *debug-io* "~&~%--- ~a --------------------------------------------------" (get-universal-time) t) (format *debug-io* "~&*** ~A [ FN ~S ( ~A ) ]~&" msg-class method method-desc) (format *debug-io* "*** ") (apply 'format *debug-io* msg msg-args) (format *debug-io* "~%") (force-output *debug-io*))
;;; ------------------------------------------------------------------------ ----------------- ;;; FOREIGN LIB DEFINITIONS ;;; ------------------------------------------------------------------------ -----------------
(define-foreign-library Tcl (:darwin (:framework "Tcl")) (:windows (:or "/tcl/bin/Tcl85.dll")) (:unix "libtcl.so") (t (:default "libtcl")))
(define-foreign-library Tk (:darwin (:framework "Tk")) (:windows (:or "/tcl/bin/tk85.dll")) (:unix "libtk.so") (t (:default "libtk")))
;;; ------------------------------------------------------------------------ ----------------- ;;; FOREIGN TYPE DEFINITIONS ;;; ------------------------------------------------------------------------ -----------------
(defctype tcl-retcode :int)
(defcenum tcl-retcode-values (:tcl-ok 0) (:tcl-error 1))
;;; ------------------------------------------------------------------------ ----------------- ;;; FOREIGN FUNCTION DEFINITIONS ;;; ------------------------------------------------------------------------ -----------------
;;; <tcl.h> void Tcl_FindExecutable(char *); (defcfun ("Tcl_FindExecutable" tcl-find-executable) :void (argv0 :string))
;;; <tcl.h> int Tcl_Init( Tcl-Interp *interp ); (defcfun ("Tcl_Init" Tcl_Init) tcl-retcode (interp :pointer))
;;; <tk.h> int Tk_Init( Tcl-Interp *interp ); (defcfun ("Tk_Init" Tk_Init) tcl-retcode (interp :pointer))
;;; <tcl.h> Tcl_Interp* Tcl_CreateInterp(void); (defcfun ("Tcl_CreateInterp" Tcl_CreateInterp) :pointer)
;;; <tcl.h> voíd Tcl_DeleteInterp(Tcl_Interp* interp); (defcfun ("Tcl_DeleteInterp" Tcl_DeleteInterp) :void (interp :pointer))
;;; <tcl.> char *Tcl_GetStringResult( Tcl_Interp *interp); (defcfun ("Tcl_GetStringResult" Tcl_GetStringResult) :string (interp :pointer))
;;; Helper function: translate int return code to :tcl-ok or :tcl- error and checks for ;;; :tcl-ok. (defmethod translate-from-foreign (value (type (eql 'tcl-retcode))) (unless (eql value (foreign-enum-value 'tcl-retcode-values :tcl-ok)) (error "Tcl error: ~a" (Tcl_GetStringResult *tki*))) value)
;;; ------------------------------------------------------------------------ ----------------- ;;; TCL/TK LOADING ... ;;; ------------------------------------------------------------------------ -----------------
(defun tk-app-init (interp) (assert (not (null-pointer-p interp))) (Tcl_Init interp) (Tk_Init interp) ;; <<<--- CRASH HAPPENS HERE ... ;; Return OK (foreign-enum-value 'tcl-retcode-values :tcl-ok))
(defun argv0 () #+allegro (sys:command-line-argument 0) #+lispworks (nth 0 system:*line-arguments-list*) ;; portable to OS X #+sbcl (nth 0 sb-ext:*posix-argv*) #+openmcl (car ccl:*command-line-argument-list*) #-(or allegro lispworks sbcl openmcl) (error "argv0 function not implemented for this lisp"))
;;; ------------------------------------------------------------------------ ----------------- ;;; TEST ROUTINE ;;; ------------------------------------------------------------------------ -----------------
#+net.goenninger.app.debug (progn (enable-debugging :module :lw-tk-test) (enable-debugging :function 'main))
(defun main ()
(use-foreign-library Tcl) (use-foreign-library Tk)
(setq *tki* (Tcl_CreateInterp)) (logmsg :DEBUG 'main "-" "*tki* = ~s" *tki*)
(let ((argv0 (argv0))) (logmsg :DEBUG 'main "-" "argv0 = ~s" argv0) (tcl-find-executable argv0))
(tk-app-init *tki*) (Tcl_DeleteInterp *tki*) (setf *tki* nil) )
Sooo - the code crashes at the point marked "<<<--- CRASH HAPPENS HERE ...". This occurs on LW but not on ACL 8.1 Express Edition.
I have double, no triple, checked the defc... stuff - to no avail. The code had been working for half a year on ACL without problems. I recently switched to LW and can't get to the point of seeing where there's something going astray.
Any help really appreciated!!! Thanks so much in advance !
Frank
-- Frank Goenninger frgo@goenninger.net
On Thu, 20 Sep 2007 14:30:05 +0200, Frank Goenninger said:
Hi you all, the gurus of CFFI ;-)
I do have a major problem when running the following code on LW Personal Edition on Mac OS X 10.4.10 Intel:
...snip...
(defun tk-app-init (interp) (assert (not (null-pointer-p interp))) (Tcl_Init interp) (Tk_Init interp) ;; <<<--- CRASH HAPPENS HERE ... ;; Return OK (foreign-enum-value 'tcl-retcode-values :tcl-ok))
...snip...
Sooo - the code crashes at the point marked "<<<--- CRASH HAPPENS HERE ...". This occurs on LW but not on ACL 8.1 Express Edition.
I have double, no triple, checked the defc... stuff - to no avail. The code had been working for half a year on ACL without problems. I recently switched to LW and can't get to the point of seeing where there's something going astray.
Any help really appreciated!!! Thanks so much in advance !
Please give more details on how it crashes. Does the OS create a crash.log file?
Am 20.09.2007 um 16:34 schrieb Martin Simmons:
On Thu, 20 Sep 2007 14:30:05 +0200, Frank Goenninger said:
Hi you all, the gurus of CFFI ;-)
I do have a major problem when running the following code on LW Personal Edition on Mac OS X 10.4.10 Intel:
...snip...
(defun tk-app-init (interp) (assert (not (null-pointer-p interp))) (Tcl_Init interp) (Tk_Init interp) ;; <<<--- CRASH HAPPENS HERE ... ;; Return OK (foreign-enum-value 'tcl-retcode-values :tcl-ok))
...snip...
Sooo - the code crashes at the point marked "<<<--- CRASH HAPPENS HERE ...". This occurs on LW but not on ACL 8.1 Express Edition.
I have double, no triple, checked the defc... stuff - to no avail. The code had been working for half a year on ACL without problems. I recently switched to LW and can't get to the point of seeing where there's something going astray.
Any help really appreciated!!! Thanks so much in advance !
Please give more details on how it crashes. Does the OS create a crash.log file?
Yes, it does:
**********
Host Name: pcsde001 Date/Time: 2007-09-20 17:32:00.484 +0200 OS Version: 10.4.10 (Build 8R2232) Report Version: 4
Command: lispworks-personal-5-0-1-macos-universal Path: /Applications/LispWorks 5.0/LispWorks Personal.app/Contents/ MacOS/lispworks-personal-5-0-1-macos-universal Parent: WindowServer [74]
Version: ??? (5.0.1)
PID: 594 Thread: 4
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000002
Thread 0: 0 com.tcltk.tcllibrary 0x16dc242e Tcl_FindHashEntry + 0 1 com.tcltk.tcllibrary 0x16dadede Tcl_DictObjCmd + 449 2 com.tcltk.tcllibrary 0x16db570f TclExecuteByteCode + 4326 3 com.tcltk.tcllibrary 0x16df0dba TclObjInterpProcCore + 1001 4 com.tcltk.tcllibrary 0x16db570f TclExecuteByteCode + 4326 5 com.tcltk.tcllibrary 0x16df0dba TclObjInterpProcCore + 1001 6 com.tcltk.tcllibrary 0x16d7d675 TclEvalObjvInternal + 578 7 com.tcltk.tcllibrary 0x16d7fd8a TclEvalEx + 1719 8 com.tcltk.tcllibrary 0x16d800ec Tcl_EvalEx + 46 9 com.tcltk.tcllibrary 0x16dd5fb9 Tcl_FSEvalFileEx + 550 10 com.tcltk.tcllibrary 0x16d8ddd5 Tcl_SourceObjCmd + 178 11 com.tcltk.tcllibrary 0x16d7d675 TclEvalObjvInternal + 578 12 com.tcltk.tcllibrary 0x16d7fd8a TclEvalEx + 1719 13 com.tcltk.tcllibrary 0x16d80278 Tcl_Eval + 50 14 com.tcltk.tcllibrary 0x16d802ae Tcl_GlobalEval + 35 15 com.tcltk.tklibrary 0x170c6082 Tk_CreateConsoleWindow + 777 16 com.tcltk.tklibrary 0x17170e53 TkpInit + 1479 17 com.tcltk.tklibrary 0x170e39ba Initialize + 2005
Thread 1: 0 libSystem.B.dylib 0x9001a1cc select + 12 1 <<00000000>> 0x2057ef8c 0 + 542633868 2 <<00000000>> 0x2057f4af 0 + 542635183 3 <<00000000>> 0x2068e58e 0 + 543745422 4 <<00000000>> 0x2068e1b9 0 + 543744441 5 <<00000000>> 0x2068dc10 0 + 543742992 6 <<00000000>> 0x2068e58e 0 + 543745422 7 <<00000000>> 0x20355d8a 0 + 540368266 8 <<00000000>> 0x2087abab 0 + 545762219
Thread 2: 0 libSystem.B.dylib 0x9002493f semaphore_wait_trap + 7 1 libSystem.B.dylib 0x90024227 _pthread_body + 84
Thread 3: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 com.lispworks.personal 0x0000462d p_wait_for_stack_condition + 140
Thread 4 Crashed: 0 <<00000000>> 0x00000002 0 + 2
Thread 5: 0 libSystem.B.dylib 0x90026d5c kevent + 12 1 ...ple.CoreServices.CarbonCore 0x90cb8c6c PrivateMPEntryPoint + 51 2 libSystem.B.dylib 0x90024227 _pthread_body + 84
Thread 6: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 ...ple.CoreServices.CarbonCore 0x90cb8e11 MPWaitOnQueue + 198 2 com.apple.DesktopServices 0x9271c953 TNodeSyncTask::SyncTaskProc(void*) + 143 3 ...ple.CoreServices.CarbonCore 0x90cb8c6c PrivateMPEntryPoint + 51 4 libSystem.B.dylib 0x90024227 _pthread_body + 84
Thread 7: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 com.apple.Foundation 0x9284b26c -[NSConditionLock lockWhenCondition:] + 39 2 com.apple.AppKit 0x9336a270 -[NSUIHeartBeat _heartBeatThread:] + 377 3 com.apple.Foundation 0x927f52e0 forkThreadForFunction + 123 4 libSystem.B.dylib 0x90024227 _pthread_body + 84
Thread 8: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 com.lispworks.personal 0x0000462d p_wait_for_stack_condition + 140
Thread 9: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 com.lispworks.personal 0x0000462d p_wait_for_stack_condition + 140
Thread 4 crashed with X86 Thread State (32-bit): eax: 0x17206000 ebx: 0x927d8f26 ecx: 0x01800000 edx: 0x00000000 edi: 0x00000004 esi: 0xb02031a4 ebp: 0x001024e0 esp: 0xb0203110 ss: 0x0000001f efl: 0x00010286 eip: 0x00000002 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
Binary Images Description: 0x1000 - 0x5fff com.lispworks.personal ??? (5.0.1) / Applications/LispWorks 5.0/LispWorks Personal.app/Contents/MacOS/ lispworks-personal-5-0-1-macos-universal 0x3c000 - 0x3dfff LWtemp.pcsde001.de.goenninger.net. 594.0.dylib /tmp/LWtemp.pcsde001.de.goenninger.net.594.0.dylib 0x15a3b000 - 0x15a8bfff com.DivXInc.DivXDecoder 6.0.5 /Users/frgo/ Library/QuickTime/DivX 6 Decoder.component/Contents/MacOS/DivX 6 Decoder 0x15a9d000 - 0x15c26fff com.elgato.mpegsupport EyeTV MPEG Support 1.0.4 (build 35) (1.0.4) /Users/frgo/Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support 0x15c98000 - 0x15e27fff com.elgato.mpegsupport EyeTV MPEG Support 1.0.6 (build 42) (1.0.6) /Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support 0x15ea4000 - 0x16097fff net.telestream.wmv.import 2.1.0.33 /Users/ frgo/Library/QuickTime/Flip4Mac WMV Import.component/Contents/MacOS/ Flip4Mac WMV Import 0x160c7000 - 0x16278fff net.telestream.wmv.advanced 2.1.1.70 /Library/ QuickTime/Flip4Mac WMV Advanced.component/Contents/MacOS/Flip4Mac WMV Advanced 0x162bb000 - 0x162d4fff com.apple.AppleIntermediateCodec 1.1 (141) / Users/frgo/Library/QuickTime/AppleIntermediateCodec.component/ Contents/MacOS/AppleIntermediateCodec 0x162d9000 - 0x162f2fff com.apple.applepixletvideo 1.2.9 (1.2d9) / System/Library/QuickTime/ApplePixletVideo.component/Contents/MacOS/ ApplePixletVideo 0x16d6f000 - 0x16e28fff com.tcltk.tcllibrary 8.5a7 /Library/ Frameworks/Tcl.framework/Tcl 0x170b6000 - 0x171a3fff com.tcltk.tklibrary 8.5a7 /Library/Frameworks/ Tk.framework/Tk 0x41410000 - 0x414adfff com.apple.QuickTimeImporters.component 7.2 / System/Library/QuickTime/QuickTimeImporters.component/Contents/MacOS/ QuickTimeImporters 0x41840000 - 0x41863fff com.apple.CoreMediaPrivate 1.0 /System/ Library/PrivateFrameworks/CoreMediaPrivate.framework/Versions/A/ CoreMediaPrivate 0x419b0000 - 0x419ecfff com.apple.QuickTimeFireWireDV.component 7.2 / System/Library/QuickTime/QuickTimeFireWireDV.component/Contents/MacOS/ QuickTimeFireWireDV 0x41a30000 - 0x41a33fff com.apple.CoreMediaAuthoringPrivate 1.0 / System/Library/PrivateFrameworks/CoreMediaAuthoringPrivate.framework/ Versions/A/CoreMediaAuthoringPrivate 0x8fe00000 - 0x8fe4afff dyld 46.12 /usr/lib/dyld 0x90000000 - 0x90171fff libSystem.B.dylib /usr/lib/libSystem.B.dylib 0x901c1000 - 0x901c3fff libmathCommon.A.dylib /usr/lib/system/ libmathCommon.A.dylib 0x901c5000 - 0x90202fff com.apple.CoreText 1.1.2 (???) /System/ Library/Frameworks/ApplicationServices.framework/Versions/A/ Frameworks/CoreText.framework/Versions/A/CoreText 0x90229000 - 0x902fffff ATS /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/ Versions/A/ATS 0x9031f000 - 0x90774fff com.apple.CoreGraphics 1.258.75 (???) /System/ Library/Frameworks/ApplicationServices.framework/Versions/A/ Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x9080b000 - 0x908d3fff com.apple.CoreFoundation 6.4.7 (368.28) / System/Library/Frameworks/CoreFoundation.framework/Versions/A/ CoreFoundation 0x90911000 - 0x90911fff com.apple.CoreServices 10.4 (???) /System/ Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x90913000 - 0x90a07fff libicucore.A.dylib /usr/lib/libicucore.A.dylib 0x90a57000 - 0x90ad6fff libobjc.A.dylib /usr/lib/libobjc.A.dylib 0x90aff000 - 0x90b63fff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib 0x90bd2000 - 0x90bd9fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib 0x90bde000 - 0x90c51fff com.apple.framework.IOKit 1.4.8 (???) /System/ Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x90c66000 - 0x90c78fff libauto.dylib /usr/lib/libauto.dylib 0x90c7e000 - 0x90f24fff com.apple.CoreServices.CarbonCore 682.26 / System/Library/Frameworks/CoreServices.framework/Versions/A/ Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x90f67000 - 0x90fcffff com.apple.CoreServices.OSServices 4.1 /System/ Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ OSServices.framework/Versions/A/OSServices 0x91008000 - 0x91047fff com.apple.CFNetwork 129.21 /System/Library/ Frameworks/CoreServices.framework/Versions/A/Frameworks/ CFNetwork.framework/Versions/A/CFNetwork 0x9105a000 - 0x9106afff com.apple.WebServices 1.1.3 (1.1.0) /System/ Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ WebServicesCore.framework/Versions/A/WebServicesCore 0x91075000 - 0x910f4fff com.apple.SearchKit 1.0.5 /System/Library/ Frameworks/CoreServices.framework/Versions/A/Frameworks/ SearchKit.framework/Versions/A/SearchKit 0x9112e000 - 0x9114cfff com.apple.Metadata 10.4.4 (121.36) /System/ Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ Metadata.framework/Versions/A/Metadata 0x91158000 - 0x91166fff libz.1.dylib /usr/lib/libz.1.dylib 0x91169000 - 0x91308fff com.apple.security 4.5.2 (29774) /System/ Library/Frameworks/Security.framework/Versions/A/Security 0x91406000 - 0x9140efff com.apple.DiskArbitration 2.1.1 /System/ Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x91415000 - 0x9141cfff libbsm.dylib /usr/lib/libbsm.dylib 0x91420000 - 0x91446fff com.apple.SystemConfiguration 1.8.6 /System/ Library/Frameworks/SystemConfiguration.framework/Versions/A/ SystemConfiguration 0x91458000 - 0x914cefff com.apple.audio.CoreAudio 3.0.4 /System/ Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x9151f000 - 0x9151ffff com.apple.ApplicationServices 10.4 (???) / System/Library/Frameworks/ApplicationServices.framework/Versions/A/ ApplicationServices 0x91521000 - 0x9154dfff com.apple.AE 314 (313) /System/Library/ Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ AE.framework/Versions/A/AE 0x91560000 - 0x91634fff com.apple.ColorSync 4.4.9 /System/Library/ Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ColorSync.framework/Versions/A/ColorSync 0x9166f000 - 0x916e2fff com.apple.print.framework.PrintCore 4.6 (177.13) /System/Library/Frameworks/ApplicationServices.framework/ Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x91710000 - 0x917b9fff com.apple.QD 3.10.24 (???) /System/Library/ Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ QD.framework/Versions/A/QD 0x917df000 - 0x9182afff com.apple.HIServices 1.5.2 (???) /System/ Library/Frameworks/ApplicationServices.framework/Versions/A/ Frameworks/HIServices.framework/Versions/A/HIServices 0x91849000 - 0x9185ffff com.apple.LangAnalysis 1.6.3 /System/Library/ Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LangAnalysis.framework/Versions/A/LangAnalysis 0x9186b000 - 0x91886fff com.apple.FindByContent 1.5 /System/Library/ Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ FindByContent.framework/Versions/A/FindByContent 0x91891000 - 0x918cefff com.apple.LaunchServices 182 /System/Library/ Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LaunchServices.framework/Versions/A/LaunchServices 0x918e2000 - 0x918eefff com.apple.speech.synthesis.framework 3.5 / System/Library/Frameworks/ApplicationServices.framework/Versions/A/ Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x918f5000 - 0x91935fff com.apple.ImageIO.framework 1.5.5 /System/ Library/Frameworks/ApplicationServices.framework/Versions/A/ Frameworks/ImageIO.framework/Versions/A/ImageIO 0x91948000 - 0x919fafff libcrypto.0.9.7.dylib /usr/lib/libcrypto. 0.9.7.dylib 0x91a40000 - 0x91a56fff libcups.2.dylib /usr/lib/libcups.2.dylib 0x91a5b000 - 0x91a79fff libJPEG.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libJPEG.dylib 0x91a7e000 - 0x91addfff libJP2.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libJP2.dylib 0x91aef000 - 0x91af3fff libGIF.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libGIF.dylib 0x91af5000 - 0x91b7bfff libRaw.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libRaw.dylib 0x91b7f000 - 0x91bbcfff libTIFF.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libTIFF.dylib 0x91bc2000 - 0x91bdcfff libPng.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libPng.dylib 0x91be1000 - 0x91be3fff libRadiance.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ Versions/A/Resources/libRadiance.dylib 0x91be5000 - 0x91cc3fff libxml2.2.dylib /usr/lib/libxml2.2.dylib 0x91ce0000 - 0x91ce0fff com.apple.Accelerate 1.3.1 (Accelerate 1.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/ Accelerate 0x91ce2000 - 0x91d70fff com.apple.vImage 2.5 /System/Library/ Frameworks/Accelerate.framework/Versions/A/Frameworks/ vImage.framework/Versions/A/vImage 0x91d77000 - 0x91d77fff com.apple.Accelerate.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/ Frameworks/vecLib.framework/Versions/A/vecLib 0x91d79000 - 0x91dd2fff libvMisc.dylib /System/Library/Frameworks/ Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/ A/libvMisc.dylib 0x91ddb000 - 0x91dfffff libvDSP.dylib /System/Library/Frameworks/ Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/ A/libvDSP.dylib 0x91e07000 - 0x92210fff libBLAS.dylib /System/Library/Frameworks/ Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/ A/libBLAS.dylib 0x9224a000 - 0x925fefff libLAPACK.dylib /System/Library/Frameworks/ Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/ A/libLAPACK.dylib 0x9262b000 - 0x92718fff libiconv.2.dylib /usr/lib/libiconv.2.dylib 0x9271a000 - 0x92797fff com.apple.DesktopServices 1.3.6 /System/ Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/ DesktopServicesPriv 0x927d8000 - 0x92a08fff com.apple.Foundation 6.4.8 (567.29) /System/ Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x92b22000 - 0x92b39fff libGL.dylib /System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x92b44000 - 0x92b9cfff libGLU.dylib /System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x92bb0000 - 0x92bb0fff com.apple.Carbon 10.4 (???) /System/Library/ Frameworks/Carbon.framework/Versions/A/Carbon 0x92bb2000 - 0x92bc2fff com.apple.ImageCapture 3.0.4 /System/Library/ Frameworks/Carbon.framework/Versions/A/Frameworks/ ImageCapture.framework/Versions/A/ImageCapture 0x92bd1000 - 0x92bd9fff com.apple.speech.recognition.framework 3.6 / System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ SpeechRecognition.framework/Versions/A/SpeechRecognition 0x92bdf000 - 0x92be5fff com.apple.securityhi 2.0.1 (24742) /System/ Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ SecurityHI.framework/Versions/A/SecurityHI 0x92beb000 - 0x92c7cfff com.apple.ink.framework 101.2.1 (71) /System/ Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ Ink.framework/Versions/A/Ink 0x92c90000 - 0x92c94fff com.apple.help 1.0.3 (32.1) /System/Library/ Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/ Versions/A/Help 0x92c97000 - 0x92cb5fff com.apple.openscripting 1.2.5 (???) /System/ Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ OpenScripting.framework/Versions/A/OpenScripting 0x92cc7000 - 0x92ccdfff com.apple.print.framework.Print 5.2 (192.4) / System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ Print.framework/Versions/A/Print 0x92cd3000 - 0x92d36fff com.apple.htmlrendering 66.1 (1.1.3) /System/ Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ HTMLRendering.framework/Versions/A/HTMLRendering 0x92d5d000 - 0x92d9efff com.apple.NavigationServices 3.4.4 (3.4.3) / System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ NavigationServices.framework/Versions/A/NavigationServices 0x92dc5000 - 0x92dd3fff com.apple.audio.SoundManager 3.9.1 /System/ Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ CarbonSound.framework/Versions/A/CarbonSound 0x92dda000 - 0x92ddffff com.apple.CommonPanels 1.2.3 (73) /System/ Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ CommonPanels.framework/Versions/A/CommonPanels 0x92de4000 - 0x930d9fff com.apple.HIToolbox 1.4.9 (???) /System/ Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ HIToolbox.framework/Versions/A/HIToolbox 0x931df000 - 0x931eafff com.apple.opengl 1.4.16 /System/Library/ Frameworks/OpenGL.framework/Versions/A/OpenGL 0x9327a000 - 0x9327afff com.apple.Cocoa 6.4 (???) /System/Library/ Frameworks/Cocoa.framework/Versions/A/Cocoa 0x9327c000 - 0x93932fff com.apple.AppKit 6.4.8 (824.42) /System/ Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x93cb3000 - 0x93d2efff com.apple.CoreData 91 (92.1) /System/Library/ Frameworks/CoreData.framework/Versions/A/CoreData 0x93d67000 - 0x93e21fff com.apple.audio.toolbox.AudioToolbox 1.4.5 / System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x93e64000 - 0x93e64fff com.apple.audio.units.AudioUnit 1.4.2 /System/ Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x93e66000 - 0x94027fff com.apple.QuartzCore 1.4.12 /System/Library/ Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x9406d000 - 0x940aefff libsqlite3.0.dylib /usr/lib/libsqlite3.0.dylib 0x940b6000 - 0x940f0fff libGLImage.dylib /System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x940f5000 - 0x9410bfff com.apple.CoreVideo 1.4.1 /System/Library/ Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x9429e000 - 0x942adfff libCGATS.A.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x942b4000 - 0x942bffff libCSync.A.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x9430b000 - 0x94325fff libRIP.A.dylib /System/Library/Frameworks/ ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x9432b000 - 0x94634fff com.apple.QuickTime 7.2.0 /System/Library/ Frameworks/QuickTime.framework/QuickTime 0x95aa1000 - 0x95aa6fff com.apple.agl 2.5.9 (AGL-2.5.9) /System/ Library/Frameworks/AGL.framework/Versions/A/AGL 0x964f7000 - 0x9650dfff libJapaneseConverter.dylib /System/Library/ CoreServices/Encodings/libJapaneseConverter.dylib 0x9650f000 - 0x96530fff libKoreanConverter.dylib /System/Library/ CoreServices/Encodings/libKoreanConverter.dylib 0x9653d000 - 0x9654bfff libSimplifiedChineseConverter.dylib /System/ Library/CoreServices/Encodings/libSimplifiedChineseConverter.dylib 0x96553000 - 0x96565fff libTraditionalChineseConverter.dylib /System/ Library/CoreServices/Encodings/libTraditionalChineseConverter.dylib 0x96f07000 - 0x96f07fff com.apple.vecLib 3.3.1 (vecLib 3.3.1) /System/ Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x99040000 - 0x99ea4fff com.apple.QuickTimeComponents.component 7.2 / System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/ QuickTimeComponents 0x9a125000 - 0x9a127fff com.apple.QuickTimeH264.component 7.2 /System/ Library/QuickTime/QuickTimeH264.component/Contents/MacOS/QuickTimeH264 0x9a52a000 - 0x9a5f0fff com.apple.QuickTimeMPEG4.component 7.2 / System/Library/QuickTime/QuickTimeMPEG4.component/Contents/MacOS/ QuickTimeMPEG4
... That's the full crash log ;-) What specifically would be of interest for you? I can't see any useful info from Thread 4 info ...
Unfortunately I can't get a copy of the backtrace info from LW - the window is frozen and I can't copy/paste the text from there. I could send you a screendump, though, if needed... Thx!!!!!
Frank
Am 20.09.2007 um 17:37 schrieb Frank Goenninger:
Thread 4 Crashed: 0 <<00000000>> 0x00000002 0 + 2
This looks better:
Date/Time: 2007-09-20 17:46:13.786 +0200 OS Version: 10.4.10 (Build 8R2232) Report Version: 4
Command: lispworks-personal-5-0-1-macos-universal Path: /Applications/LispWorks 5.0/LispWorks Personal.app/Contents/ MacOS/lispworks-personal-5-0-1-macos-universal Parent: WindowServer [74]
Version: ??? (5.0.1)
PID: 619 Thread: 4
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x8fe050f8
Thread 0: 0 com.apple.QD 0x91718cc2 AcquirePatXMapHandle + 9 1 com.apple.QD 0x91718b31 NewPixPat + 72 2 com.apple.QD 0x91718a12 SetPortPat + 190 3 com.apple.QD 0x917186ae ResetPort + 121 4 com.apple.QD 0x91717ee9 OpenCPort + 551 5 com.apple.QD 0x9172044f NewGWorldPB + 1061 6 com.apple.QD 0x91731336 NewGWorld + 207 7 com.tcltk.tklibrary 0x1717bab8 Tk_GetPixmap + 202 8 com.tcltk.tklibrary 0x171889b3 XCreateBitmapFromData + 48 9 com.tcltk.tklibrary 0x170bf0bc GetBitmap + 868 10 com.tcltk.tklibrary 0x170bf1a9 Tk_GetBitmap + 20 11 com.tcltk.tklibrary 0x170f6090 TkMenuConfigureDrawOptions + 411 12 com.tcltk.tklibrary 0x170f2477 ConfigureMenu + 607 13 com.tcltk.tklibrary 0x170f4c08 MenuCmd + 713 14 com.tcltk.tcllibrary 0x16db570f TclExecuteByteCode + 4326 15 com.tcltk.tcllibrary 0x16df0dba TclObjInterpProcCore + 1001 16 com.tcltk.tcllibrary 0x16d7d675 TclEvalObjvInternal + 578 17 com.tcltk.tcllibrary 0x16d7fd8a TclEvalEx + 1719 18 com.tcltk.tcllibrary 0x16d800ec Tcl_EvalEx + 46 19 com.tcltk.tcllibrary 0x16dd5fb9 Tcl_FSEvalFileEx + 550 20 com.tcltk.tcllibrary 0x16d8ddd5 Tcl_SourceObjCmd + 178 21 com.tcltk.tcllibrary 0x16d7d675 TclEvalObjvInternal + 578 22 com.tcltk.tcllibrary 0x16d7fd8a TclEvalEx + 1719 23 com.tcltk.tcllibrary 0x16d80278 Tcl_Eval + 50 24 com.tcltk.tcllibrary 0x16d802ae Tcl_GlobalEval + 35 25 com.tcltk.tklibrary 0x170c6082 Tk_CreateConsoleWindow + 777 26 com.tcltk.tklibrary 0x17170e53 TkpInit + 1479 27 com.tcltk.tklibrary 0x170e39ba Initialize + 2005
Thread 1: 0 libSystem.B.dylib 0x9001a1cc select + 12 1 <<00000000>> 0x2057ef8c 0 + 542633868 2 <<00000000>> 0x2057f4af 0 + 542635183 3 <<00000000>> 0x2068e58e 0 + 543745422 4 <<00000000>> 0x2068e1b9 0 + 543744441 5 <<00000000>> 0x2068dc10 0 + 543742992 6 <<00000000>> 0x2068e58e 0 + 543745422 7 <<00000000>> 0x20355d8a 0 + 540368266 8 <<00000000>> 0x2087abab 0 + 545762219
Thread 2: 0 libSystem.B.dylib 0x9002493f semaphore_wait_trap + 7 1 libSystem.B.dylib 0x90024227 _pthread_body + 84
Thread 3: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 com.lispworks.personal 0x0000462d p_wait_for_stack_condition + 140
Thread 4 Crashed: 0 com.apple.Foundation 0x927d900e NSPushAutoreleasePool + 246
Thread 5: 0 libSystem.B.dylib 0x90026d5c kevent + 12 1 ...ple.CoreServices.CarbonCore 0x90cb8c6c PrivateMPEntryPoint + 51 2 libSystem.B.dylib 0x90024227 _pthread_body + 84
Thread 6: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 ...ple.CoreServices.CarbonCore 0x90cb8e11 MPWaitOnQueue + 198 2 com.apple.DesktopServices 0x9271c953 TNodeSyncTask::SyncTaskProc(void*) + 143 3 ...ple.CoreServices.CarbonCore 0x90cb8c6c PrivateMPEntryPoint + 51 4 libSystem.B.dylib 0x90024227 _pthread_body + 84
Thread 7: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 com.apple.Foundation 0x9284b26c -[NSConditionLock lockWhenCondition:] + 39 2 com.apple.AppKit 0x9336a270 -[NSUIHeartBeat _heartBeatThread:] + 377 3 com.apple.Foundation 0x927f52e0 forkThreadForFunction + 123 4 libSystem.B.dylib 0x90024227 _pthread_body + 84
Thread 8: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 com.lispworks.personal 0x0000462d p_wait_for_stack_condition + 140
Thread 9: 0 libSystem.B.dylib 0x900248c7 semaphore_wait_signal_trap + 7 1 com.lispworks.personal 0x0000462d p_wait_for_stack_condition + 140
Thread 4 crashed with X86 Thread State (32-bit): eax: 0x8fe050f8 ebx: 0x927d8f26 ecx: 0x8fe54860 edx: 0x171ee000 edi: 0xb02031a8 esi: 0xb02031a4 ebp: 0xb0203148 esp: 0xb0203110 ss: 0x0000001f efl: 0x00010282 eip: 0x927d900e cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
... looks like pointer stuff to me, now. NSPushAutoreleasePool in Thread 4 ...
Hopefully a bit more helpful for determining the cause...
Frank
I suspect some threading problems. Thread 0 is the Cocoa GUI and thread 4 is probably the Listener's REPL. It is possible that Tk expects to be called from thread 0 (like Cocoa does).
Did you call lw-tk-test:main from the Listener in both crashlogs?
Am 20.09.2007 um 20:42 schrieb Martin Simmons:
I suspect some threading problems. Thread 0 is the Cocoa GUI and thread 4 is probably the Listener's REPL. It is possible that Tk expects to be called from thread 0 (like Cocoa does).
Ah - yes, that could really be the case!
Did you call lw-tk-test:main from the Listener in both crashlogs?
Yes. I manually enter the call to main in Listener 1 ... And yes, that was the case for both crashlogs.
Frank
On Thu, 20 Sep 2007 21:06:37 +0200, Frank Goenninger said:
Am 20.09.2007 um 20:42 schrieb Martin Simmons:
I suspect some threading problems. Thread 0 is the Cocoa GUI and thread 4 is probably the Listener's REPL. It is possible that Tk expects to be called from thread 0 (like Cocoa does).
Ah - yes, that could really be the case!
Did you call lw-tk-test:main from the Listener in both crashlogs?
Yes. I manually enter the call to main in Listener 1 ... And yes, that was the case for both crashlogs.
Ah, interesting, because the second one showed lots of Tk stuff in thread 0, which suggests that it interacts with that via the window system.
To run it in thread 0, you can to do:
(mp:process-send mp:*main-process* '(lw-tk-test:main))
However, I've just tried that and it has messed up the LispWorks menu bar. I suspect there is no reliable way to run both Tk and the LispWorks IDE (or maybe any Cocoa app) simultaneously. It should be possible in the LispWorks Professional Edition, where you create a non-GUI image, but not in the Personal Edition.
Am 20.09.2007 um 22:02 schrieb Martin Simmons:
On Thu, 20 Sep 2007 21:06:37 +0200, Frank Goenninger said:
Am 20.09.2007 um 20:42 schrieb Martin Simmons:
I suspect some threading problems. Thread 0 is the Cocoa GUI and thread 4 is probably the Listener's REPL. It is possible that Tk expects to be called from thread 0 (like Cocoa does).
Ah - yes, that could really be the case!
Did you call lw-tk-test:main from the Listener in both crashlogs?
Yes. I manually enter the call to main in Listener 1 ... And yes, that was the case for both crashlogs.
Ah, interesting, because the second one showed lots of Tk stuff in thread 0, which suggests that it interacts with that via the window system.
To run it in thread 0, you can to do:
(mp:process-send mp:*main-process* '(lw-tk-test:main))
However, I've just tried that and it has messed up the LispWorks menu bar. I suspect there is no reliable way to run both Tk and the LispWorks IDE (or maybe any Cocoa app) simultaneously. It should be possible in the LispWorks Professional Edition, where you create a non-GUI image, but not in the Personal Edition.
Martin - thanks. Works over here now at least without crashing ... So will look further to get a good offer from LispWorks for a Professional or an Enterprise Edition ;-)
Support was outstanding from you - I very much value this! Thanks again for stepping in!
Frank
-- Frank Goenninger CEO PRION Consulting Services AG Specializing in Product Lifecycle Management Solution Consulting. Echterdingen, Germany
Additional info:
Doing
(mp:without-preemption (tk-app-init *tki*))
prevents a crash but now LW does not come back to me... (shows a Busy cursor and I can't do anything in the IDE).
Frank
Am 20.09.2007 um 20:42 schrieb Martin Simmons:
I suspect some threading problems. Thread 0 is the Cocoa GUI and thread 4 is probably the Listener's REPL. It is possible that Tk expects to be called from thread 0 (like Cocoa does).
Did you call lw-tk-test:main from the Listener in both crashlogs?
-- Martin Simmons LispWorks Ltd http://www.lispworks.com/