Hello squeak-dev,
I am developing a Squeak application that is supposed to run on Microsoft Windows and on Macs. Recently I encountered the the following problem: I do RecordingControlsMorph new openCenteredInWorld this uses the SoundRecorder object. On Windows everything works fine, but on Mac OS X I get an error message from SoundRecorder: <primitive: 'primitiveSoundGetRecordingSampleRate' module:'SoundPlugin'> saying that SoundPlugin is not available. I assume there is no SoundPlugin for Mac OS. Would it be possible to build a VM with this plugin or can I just download and install it as an external plugin. Thank you. The systems I am running the application on are System 1: Microsoft Windows XP prof. Ver 2002 Service Pack 2, version VM: Squeak3.8-6665. System 2: Mac OS X 10.4.6 version VM: Squeak 3.7-7 (3.7-5989) or Squeak 3.8.14beta7U -- Best regards, Danil mailto:[hidden email] |
The soundplugin is builtin, lurking somewhere on the list is the
magic Smalltalk code to get back a list of the loaded plugins, which would include the ones internally to the VM executable, and the ones you have loaded via a binary (externally). In a quick look at the C code it looks like if the recording is NOT running it primitive fails the primitiveSoundGetRecordingSampleRate. It is possible that the windows source code does not fail the primitive call, you would need to look at the windows source code to confirm it's behaviour. So start recording, then look at the primitiveSoundGetRecordingSampleRate value. On Dec 21, 2006, at 11:01 AM, efimov wrote: > Hello squeak-dev, > > I am developing a Squeak application > that is supposed to run on Microsoft Windows > and on Macs. > > Recently I encountered the the following problem: > I do > RecordingControlsMorph new openCenteredInWorld > this uses the SoundRecorder object. > > On Windows everything works fine, but on Mac OS X > I get an error message from SoundRecorder: > <primitive: 'primitiveSoundGetRecordingSampleRate' > module:'SoundPlugin'> > > saying that SoundPlugin is not available. > > I assume there is no SoundPlugin for Mac OS. Would it be possible > to build a VM with this plugin or can I just download and install it > as an external plugin. > > Thank you. > > The systems I am running the application on are > System 1: Microsoft Windows XP prof. Ver 2002 Service Pack 2, > version VM: Squeak3.8-6665. > > System 2: Mac OS X 10.4.6 > version VM: Squeak 3.7-7 (3.7-5989) or Squeak 3.8.14beta7U > > -- > Best regards, > Danil mailto:[hidden email] > > > -- ======================================================================== === John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== === |
Hello, squeak-dev,
We have different problems with RecordingControlsMorph. Mac OS Squeak 3.7-7 (3.7-5989) - VM crashes after rec button/any button Mac OS Squeak 3.8.14b7 (3.8.14b7) - VM crashes after rec button Unix 3.7-7 #1 Sun Oct 8 20:08:59 NOVST 2006 gcc 4.0.2 Squeak3.7 of '4 September 2004' [latest update: #5989] Linux 2.6.16-1.2069_FC4 #1 Tue Mar 28 12:19:10 EST 2006 i686 i686 i386 GNU/Linux default plugin location: /home/squeak/squeak/lib/squeak/3.7-7/*.so - application is buzzing after rec button. Mac OS Squeak 3.7-7 (3.7-5989) // have no crash damp /Users/piumarta/squeak/3.7/platforms/unix/vm-sound-MacOSX/sqUnixSoundMacOSX.c:510: failed assertion `s && s->buffer' Version: Squeak VM 3.8.14b7 (3.8.14b7) PID: 9278 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000004 Thread 0 Crashed: 0 org.squeak.Squeak 0x000ce3c4 Stream_setFormat + 596 1 org.squeak.Squeak 0x000ce3b4 Stream_setFormat + 580 2 org.squeak.Squeak 0x000cf048 sound_StartRecording + 152 3 org.squeak.Squeak 0x0004ef00 primitiveSoundStartRecording.86 + 160 4 org.squeak.Squeak 0x000b298c primitiveExternalCall + 1212 5 org.squeak.Squeak 0x000bdb3c interpret + 6956 6 org.squeak.Squeak 0x000e4f4c EventLoopEventHandler.109 + 156 7 com.apple.HIToolbox 0x9321c794 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 692 8 com.apple.HIToolbox 0x9321beec SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 372 9 com.apple.HIToolbox 0x9321bd68 SendEventToEventTargetWithOptions + 40 10 com.apple.HIToolbox 0x932230c8 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 704 11 com.apple.HIToolbox 0x9321c9e4 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1284 12 com.apple.HIToolbox 0x9321beec SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 372 13 com.apple.HIToolbox 0x93222c8c SendEventToEventTarget + 40 14 com.apple.HIToolbox 0x932639a0 ToolboxEventDispatcher + 92 15 com.apple.HIToolbox 0x9326392c HLTBEventDispatcher + 16 16 com.apple.HIToolbox 0x93261ee4 RunApplicationEventLoop + 148 17 org.squeak.Squeak 0x000e5034 RunApplicationEventLoopWithSqueak + 196 18 org.squeak.Squeak 0x000611cc main + 988 19 org.squeak.Squeak 0x00007608 _start + 392 (crt.c:267) 20 dyld 0x8fe01048 _dyld_start + 60 Thread 1: 0 libSystem.B.dylib 0x90054fc8 semaphore_timedwait_signal_trap + 8 1 libSystem.B.dylib 0x90071648 pthread_cond_timedwait_relative_np + 556 2 ...ple.CoreServices.CarbonCore 0x90bfbe90 TSWaitOnSemaphoreCommon + 176 3 ...ple.CoreServices.CarbonCore 0x90c03e2c TimerThread + 60 4 libSystem.B.dylib 0x9002ba68 _pthread_body + 96 Thread 2: 0 libSystem.B.dylib 0x9000b0a8 mach_msg_trap + 8 1 libSystem.B.dylib 0x9000affc mach_msg + 60 2 com.apple.CoreFoundation 0x907e3b78 __CFRunLoopRun + 832 3 com.apple.CoreFoundation 0x907e347c CFRunLoopRunSpecific + 268 4 com.apple.audio.CoreAudio 0x9148c83c HALRunLoop::OwnThread(void*) + 264 5 com.apple.audio.CoreAudio 0x9148c5dc CAPThread::Entry(CAPThread*) + 96 6 libSystem.B.dylib 0x9002ba68 _pthread_body + 96 Thread 0 crashed with PPC Thread State 64: srr0: 0x00000000000ce3c4 srr1: 0x000000000200f030 vrsave: 0x0000000000000000 cr: 0x24024444 xer: 0x0000000000000004 lr: 0x00000000000ce3b4 ctr: 0x0000000000000001 r0: 0x0000000000000000 r1: 0x00000000bfffc9c0 r2: 0x00000000000ce3b4 r3: 0x0000000000000000 r4: 0x0000000000411710 r5: 0x0000000000000001 r6: 0x00000000ffffffff r7: 0x0000000000000006 r8: 0x000000007fffffff r9: 0x00000000a0001fac r10: 0x000000000000000d r11: 0x0000000044024442 r12: 0x000000009000660c r13: 0x0000000000122c70 r14: 0x00000000bfffcc00 r15: 0x00000000a321c4f8 r16: 0x0000000000412960 r17: 0x00000000bfffd0e0 r18: 0x000000004a4d4d32 r19: 0x000000004a4d4d32 r20: 0x000000000041cc50 r21: 0x00000000ffffd96e r22: 0x0000000000000000 r23: 0x0000000000001340 r24: 0x0000000000122c70 r25: 0x0000000000100000 r26: 0x0000000000000001 r27: 0x00000000000014a8 r28: 0x0000000000100000 r29: 0x000000007fffffff r30: 0x0000000000000001 r31: 0x0000000000411710 Binary Images Description: 0x1000 - 0x107fff org.squeak.Squeak Squeak VM 3.8.14b7 (3.8.14b7) /Users/tester/Desktop/Audioskape/ver32_temp/Squeak 3.8.14beta7U.app/Contents/MacOS/Squeak VM Opt 0x8fe00000 - 0x8fe51fff dyld 44.4 /usr/lib/dyld 0x90000000 - 0x901bbfff libSystem.B.dylib /usr/lib/libSystem.B.dylib 0x90213000 - 0x90218fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib 0x9021a000 - 0x9026dfff com.apple.CoreText 1.0.1 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText 0x9029a000 - 0x9034bfff ATS /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x9037a000 - 0x90734fff com.apple.CoreGraphics 1.258.30 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x907c1000 - 0x9089afff com.apple.CoreFoundation 6.4.6 (368.27) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x908e3000 - 0x908e3fff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x908e5000 - 0x909e7fff libicucore.A.dylib /usr/lib/libicucore.A.dylib 0x90a41000 - 0x90ac5fff libobjc.A.dylib /usr/lib/libobjc.A.dylib 0x90aef000 - 0x90b5dfff com.apple.framework.IOKit 1.4 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x90b74000 - 0x90b86fff libauto.dylib /usr/lib/libauto.dylib 0x90b8d000 - 0x90e65fff com.apple.CoreServices.CarbonCore 681.3 (671.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x90ecb000 - 0x90f4bfff com.apple.CoreServices.OSServices 4.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x90f95000 - 0x90fd6fff com.apple.CFNetwork 4.0 (129.16) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x90feb000 - 0x91003fff com.apple.WebServices 1.1.2 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore 0x91013000 - 0x91094fff com.apple.SearchKit 1.0.5 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x910da000 - 0x91104fff com.apple.Metadata 10.4.4 (121.36) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x91115000 - 0x91123fff libz.1.dylib /usr/lib/libz.1.dylib 0x91126000 - 0x912e9fff com.apple.security 4.3 (25966) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x913ec000 - 0x913f5fff com.apple.DiskArbitration 2.1 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x913fc000 - 0x91423fff com.apple.SystemConfiguration 1.8.2 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x91436000 - 0x91441fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib 0x91446000 - 0x91466fff libmx.A.dylib /usr/lib/libmx.A.dylib 0x9146c000 - 0x91474fff libbsm.dylib /usr/lib/libbsm.dylib 0x91478000 - 0x914f3fff com.apple.audio.CoreAudio 3.0.3 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x91530000 - 0x91530fff com.apple.ApplicationServices 10.4 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x91532000 - 0x9156afff com.apple.AE 1.5 (297) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x91585000 - 0x91652fff com.apple.ColorSync 4.4.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x916a7000 - 0x91738fff com.apple.print.framework.PrintCore 4.5 (177.10) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x9177f000 - 0x91836fff com.apple.QD 3.8.20 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x91873000 - 0x918d1fff com.apple.HIServices 1.5.1 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x918ff000 - 0x91923fff com.apple.LangAnalysis 1.6.1 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x91937000 - 0x9195cfff com.apple.FindByContent 1.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent 0x9196f000 - 0x919b1fff com.apple.LaunchServices 178 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x919cd000 - 0x919e1fff com.apple.speech.synthesis.framework 3.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x919ef000 - 0x91a2efff com.apple.ImageIO.framework 1.4.6 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x91a44000 - 0x91b0cfff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib 0x91b5a000 - 0x91b6ffff libcups.2.dylib /usr/lib/libcups.2.dylib 0x91b74000 - 0x91b91fff libJPEG.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x91b96000 - 0x91c05fff libJP2.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x91c1c000 - 0x91c20fff libGIF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x91c22000 - 0x91c69fff libRaw.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib 0x91c6e000 - 0x91cabfff libTIFF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x91cb2000 - 0x91ccbfff libPng.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x91cd0000 - 0x91cd3fff libRadiance.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x91cd5000 - 0x91cd5fff com.apple.Accelerate 1.2.1 (Accelerate 1.2.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x91cd7000 - 0x91db7fff com.apple.vImage 2.3 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x91dbf000 - 0x91ddefff com.apple.Accelerate.vecLib 3.2.1 (vecLib 3.2.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x91e4a000 - 0x91eb8fff libvMisc.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x91ec3000 - 0x91f57fff libvDSP.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x91f71000 - 0x924f9fff libBLAS.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x9252c000 - 0x92857fff libLAPACK.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x92887000 - 0x9290ffff com.apple.DesktopServices 1.3.3 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x92950000 - 0x92b7bfff com.apple.Foundation 6.4.5 (567.26) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x92c99000 - 0x92d77fff libxml2.2.dylib /usr/lib/libxml2.2.dylib 0x92d97000 - 0x92e85fff libiconv.2.dylib /usr/lib/libiconv.2.dylib 0x92e97000 - 0x92eb5fff libGL.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x92ec0000 - 0x92f1afff libGLU.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x92f38000 - 0x92f38fff com.apple.Carbon 10.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x92f3a000 - 0x92f4efff com.apple.ImageCapture 3.0 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture 0x92f66000 - 0x92f76fff com.apple.speech.recognition.framework 3.4 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x92f82000 - 0x92f97fff com.apple.securityhi 2.0 (203) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x92fa9000 - 0x93030fff com.apple.ink.framework 101.2 (69) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x93044000 - 0x9304ffff com.apple.help 1.0.3 (32) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x93059000 - 0x93086fff com.apple.openscripting 1.2.5 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting 0x930a0000 - 0x930b0fff com.apple.print.framework.Print 5.0 (190.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x930bc000 - 0x93122fff com.apple.htmlrendering 1.1.2 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering 0x93153000 - 0x931a2fff com.apple.NavigationServices 3.4.4 (3.4.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices 0x931d0000 - 0x931edfff com.apple.audio.SoundManager 3.9 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound 0x931ff000 - 0x9320cfff com.apple.CommonPanels 1.2.2 (73) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels 0x93215000 - 0x93522fff com.apple.HIToolbox 1.4.6 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x93671000 - 0x9367dfff com.apple.opengl 1.4.7 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x94180000 - 0x9424afff com.apple.audio.toolbox.AudioToolbox 1.4.1 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x9429e000 - 0x9429efff com.apple.audio.units.AudioUnit 1.4 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x946ea000 - 0x946f9fff libCGATS.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x94701000 - 0x9470dfff libCSync.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x94753000 - 0x9476bfff libRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x94772000 - 0x94a26fff com.apple.QuickTime 7.1.1 /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime 0x94aea000 - 0x94b5bfff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib 0x97ce7000 - 0x97cf4fff com.apple.agl 2.5.6 (AGL-2.5.6) /System/Library/Frameworks/AGL.framework/Versions/A/AGL Model: PowerMac10,1, BootROM 4.8.9f4, 1 processors, PowerPC G4 (1.2), 1.25 GHz, 512 MB Graphics: ATI Radeon 9200, ATY,RV280, AGP, 32 MB Memory Module: DIMM0/J11, 512 MB, DDR SDRAM, PC3200U-30330 Modem: Jump, , V.92, Version 1.0, Network Service: Built-in Ethernet, Ethernet, en0 Parallel ATA Device: ST940110A, 37.26 GB Parallel ATA Device: MATSHITACD-RW CW-8124, USB Device: Generic USB Hub, ALCOR, Up to 12 Mb/sec, 500 mA USB Device: Optical USB Mouse, Logitech, Up to 1.5 Mb/sec, 500 mA USB Device: USB Device, , Up to 1.5 Mb/sec, 500 mA the same problem on UNIX version: here are a few further questions on the SoundPlugin's recording functionality in UNIX versions of the Squeak VM. We have tested it under several operating environments and found it working only on Windows. On Linux the virtual machine starts an indefinite wait in __read_nocancel() when one pushes that same "Record" button in the RecordingControlsMorph. Interestingly, the use of __read_nocancel() suggests running in multiple threads, however we could see only one execution thread in the VM process. Can you give an advice on how to make SoundPlugin recording functionality to work on UNIX? Here is some information on the VM versions that we used Linux: $ ./build/squeak -version 3.7-7 #1 Sun Oct 8 20:08:59 NOVST 2006 gcc 4.0.2 Squeak3.7 of '4 September 2004' [latest update: #5989] Linux 2.6.16-1.2069_FC4 #1 Tue Mar 28 12:19:10 EST 2006 i686 i686 i386 GNU/Linux default plugin location: /home/squeak/squeak/lib/squeak/3.7-7/*.so -- Best regards, Danil mailto:[hidden email] You wrote 23 декабря 2006 г., 0:19:57: > If you try a Carbon Mac VM, say the 3.8.14b7 what happens. > "RecordingControlsMorph Squeak crashes!" > Does this mean the VM application crashes, if so do you have a crash > log from OSX? > Is sound recording running when you ask for the sample rate? If sound > recording is not running again I believe the behavior is to fail the > primitive. > On Dec 22, 2006, at 6:41 AM, efimov wrote: >> for Mac OS Squeak 3.7-7 (3.7-5989): >> Smalltalk listLoadedModules >> #('SocketPlugin 19 March 2005 (i)' >> 'LargeIntegers v1.3 19 March 2005 (i)' >> 'Matrix2x3Plugin 19 March 2005 (i)' >> 'FloatArrayPlugin 19 March 2005 (i)' >> 'B2DPlugin 19 March 2005 (i)' >> 'BitBltPlugin 19 March 2005 (i)' >> 'UnixOSProcessPlugin 19 March 2005 (i)' >> 'SecurityPlugin 19 March 2005 (i)' >> 'FilePlugin 19 March 2005 (i)' >> 'MiscPrimitivePlugin 19 March 2005 (i)') >> >> >> the most interesting is >> for Mac OS Squeak 3.7-7 (3.7-5989) >> Smalltalk listBuiltinModules >> 29 - 'SoundPlugin 19 March 2005 (i)' >> >> but when i try to launch >> >> <primitive: 'primitiveSoundGetRecordingSampleRate' module: >> 'SoundPlugin'> >> self primitiveFailed >> >> - it return - self primitiveFailed. >> >> so i could not look at the primitiveSoundGetRecordingSampleRate value. >> >> After that when I push any button on the RecordingControlsMorph >> Squeak crashes! >> >> John, thank you for your prompt reply. >> -- >> Best regards, >> Danil mailto:[hidden email] > -- > ======================================================================== > === > John M. McIntosh <[hidden email]> > Corporate Smalltalk Consulting Ltd. > http://www.smalltalkconsulting.com > ======================================================================== > === |
Ok, in 3.8.14b7 sqMacMain.c Add signal handler on SIGSEGV, dump all
stacks. Please check your system.log and your console.log. There should be printfs of the Squeak smalltalk process stacks. The MIT media lab folks over Christmas identified a problem in this logic where it would crash on stop recording under 10.3. That seemed to be a race condition between the squeak process deleting the recording stream, and the termination of the async process that uses the recording stream, I will issue a 3.8.14b8 fix in a day or two. However this problem seems to be a different issue, I'm puzzled by the fact the os-x carbon VM did not get the same assert error as the unix vm. On Jan 8, 2007, at 6:11 AM, efimov wrote: > Version: Squeak VM 3.8.14b7 (3.8.14b7) > > PID: 9278 > Thread: 0 > > Exception: EXC_BAD_ACCESS (0x0001) > Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000004 > -- ======================================================================== === John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== === |
Hello, John.
I guess the problem is in the byte order. I took the same Squeak VM 3.8.14b7 (3.8.14b7), the same image, but the results were different on a PowerPC Mac and on an Intel Mac. On PowerPC G4 (1.2) - VM crashed after push rec button in RecordingControlsMorph. On Intel Core Solo - everything is ok, not sure about sound (i worked remote), but the VM did not crash. looking forward for your reply Machine Name: Mac mini Machine Model: PowerMac10,1 CPU Type: PowerPC G4 (1.2) Number Of CPUs: 1 CPU Speed: 1.25 GHz L2 Cache (per CPU): 512 KB Memory: 512 MB Bus Speed: 167 MHz Boot ROM Version: 4.8.9f4 Serial Number: YM52814VTYV Machine Name: Mac mini Machine Model: Macmini1,1 CPU Type: Intel Core Solo Number Of Cores: 1 CPU Speed: 1.5 GHz Memory: 512 MB Bus Speed: 667 MHz Boot ROM Version: MM11.004B.B00 Serial Number: YM613833U35 SMC Version: 1.3f2 L2 Cache: 2 MB -- Best regards, Danil mailto:[hidden email] You wrote 8 jan 2007, 23:16:52: > Ok, in 3.8.14b7 sqMacMain.c Add signal handler on SIGSEGV, dump all > stacks. > Please check your system.log and your console.log. There should be > printfs of the Squeak smalltalk process stacks. > The MIT media lab folks over Christmas identified a problem in this > logic where it would crash on stop recording under 10.3. > That seemed to be a race condition between the squeak process > deleting the recording stream, and the termination of the > async process that uses the recording stream, I will issue a 3.8.14b8 > fix in a day or two. > However this problem seems to be a different issue, I'm puzzled by > the fact the os-x carbon VM did not get the same assert error as the > unix vm. > On Jan 8, 2007, at 6:11 AM, efimov wrote: >> Version: Squeak VM 3.8.14b7 (3.8.14b7) >> >> PID: 9278 >> Thread: 0 >> >> Exception: EXC_BAD_ACCESS (0x0001) >> Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000004 >> > -- > ======================================================================== > === > John M. McIntosh <[hidden email]> > Corporate Smalltalk Consulting Ltd. > http://www.smalltalkconsulting.com > ======================================================================== > === |
Ok, thank you for the information, mind it seems we are copying the
list, plus 5 others so it's quite a crowd. However given the interest in ensuring sound recording works, I'll continue. In looking at the dump, mind I did look at assembler dumps for IBM mainframes for a living in years past so doing this just brings back old memories versus being difficult, I see the following (Hah, assuming I'm not being a bit careless here) anyway... 0x000ce510 <Stream_setFormat+576>: bl 0xcd260 <Buffer_new> 0x000ce514 <Stream_setFormat+580>: lwz r5,4(r31) 0x000ce518 <Stream_setFormat+584>: mr r4,r31 0x000ce51c <Stream_setFormat+588>: stw r3,28(r31) 0x000ce520 <Stream_setFormat+592>: mr r8,r29 0x000ce524 <Stream_setFormat+596>: lwz r7,4(r3) <---- death strikes here 0x000ce528 <Stream_setFormat+600>: lwz r6,20(r31) 0x000ce52c <Stream_setFormat+604>: lis r31,16 0x000ce530 <Stream_setFormat+608>: addi r3,r31,1592 0x000ce534 <Stream_setFormat+612>: bl 0xcd1b0 <dprintf> I believe we take r3 which is r3: 0x0000000000000000 and attempt to index by 4 and get a read failure KERN_PROTECTION_FAILURE (0x0002) at 0x00000004 I believe the C code is s->buffer= Buffer_new((s->direction ? DeviceFrameSize : SqueakFrameSize) * nChannels * frameCount * 2); dprintf("stream %p[%d] sound buffer size %d/%d (%d)\n", s, s- >direction, s->imgBufSize, s->buffer->size, frameCount); The short answer is frameCount is 0x000000007fffffff, and we build a bogus number to attempt to allocate memory with, which fails, which then sets s->buffer to zero, and we die referencing s->buffer->size, which is the software bug. Now lets look at the proof: For non-debug Ian has #ifdefined the dprintf as: inline void dprintf(const char *fmt, ...) {} interestingly enough the compiler still wants to pass the parms to a null routine, but the issue is when we do the s->buffer->size because s->buffer is zero and we die when we deference to access ->size Now why would s->buffer be nil? Buffer *Buffer_new(int size) { Buffer *b= (Buffer *)malloc(sizeof(Buffer)); if (!b) return 0; if (!(b->data= (char *)malloc(size))) { free(b); return 0; } b->size= size; b->avail= 0; b->iptr= 0; b->optr= 0; return b; } We pass in size, and allocate the Buffer structure, if that fails we return zero, then we allocate size for the data, if that fails, then we would return 0. I believe r3 is s->buffer 0x0000000000000000 r4 is s 0x0000000000411920 r5 is s->direction 0x0000000000000001 r6 would be s->imgBufSize we don't assign it before crash r7 would be s->buffer->size but we crash calculating that r8 is frameCount ->>>>>>>>>> 0x000000007fffffff Bad evil thing typedef struct Stream { AudioDeviceID id; // associated with this stream int direction; // 1nput/0utput int sampleRate; // Squeak frames per second int channels; // channels per Squeak frame int devBufSize; // bytes per device buffer int imgBufSize; // bytes per Squeak buffer int cvtBufSize; // bytes per converter buffer Buffer *buffer; // fifo AudioConverterRef converter; // frame format converter int semaphore; // ping me! u_int64_t timestamp; // nominal buffer tail time (uSecs) } I see that we call Stream_setFormat via int sound_StartRecording(int samplesPerSec, int stereo, int semaIndex) { Stream *s= 0; dprintf("snd_StartRecording rate: %d stereo: %d semaIndex: %d\n", samplesPerSec, stereo, semaIndex); if (input) // there might be a change of sample rate sound_StopRecording(); if ((s= Stream_new(1))) // 1nput { // approximate the frameCount that output uses for the same sample rate int frameCount= 5288 * samplesPerSec / 44100; if (( Stream_setFormat(s, frameCount, samplesPerSec, stereo)) && Stream_startSema(s, semaIndex)) I'm wonder here if you have a integer overflow situation calculating frameCount base on your passed in samplesPerSec. Thus you should check the values you are passing into the start sound primitive, it's likely a stack dump at this point would show the variables btw. Thread 0 crashed with PPC Thread State 64: srr0: 0x00000000000ce3c4 srr1: 0x000000000000f030 vrsave: 0x0000000000000000 cr: 0x24024444 xer: 0x0000000000000004 lr: 0x00000000000ce3b4 ctr: 0x0000000000000001 r0: 0x0000000000000000 r1: 0x00000000bfffc9c0 r2: 0x00000000000ce3b4 r3: 0x0000000000000000 r4: 0x0000000000411920 r5: 0x0000000000000001 r6: 0x00000000ffffffff r7: 0x0000000000000007 r8: 0x000000007fffffff r9: 0x00000000a0001fac r10: 0x000000000000000d r11: 0x0000000044024442 r12: 0x000000009000660c r13: 0x0000000000122c70 r14: 0x00000000bfffcc00 r15: 0x00000000a321c4f8 r16: 0x000000000041cca0 r17: 0x00000000bfffd0e0 r18: 0x000000004a4d4d32 r19: 0x000000004a4d4d32 r20: 0x000000000041ce90 r21: 0x00000000ffffd96e r22: 0x0000000000000000 r23: 0x0000000000001340 r24: 0x0000000000122c70 r25: 0x0000000000100000 r26: 0x0000000000000001 r27: 0x00000000000014a8 r28: 0x0000000000100000 r29: 0x000000007fffffff r30: 0x0000000000000001 r31: 0x0000000000411920 On Jan 9, 2007, at 6:58 AM, efimov wrote: > Hello, John. > > I guess the problem is in the byte order. > I took the same Squeak VM 3.8.14b7 (3.8.14b7), > the same image, but the results were different on a PowerPC Mac > and on an Intel Mac. > On PowerPC G4 (1.2) - VM crashed after push rec button in > RecordingControlsMorph. > On Intel Core Solo - everything is ok, not sure about sound > (i worked remote), but the VM did not crash. -- ======================================================================== === John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== === |
Free forum by Nabble | Edit this page |