[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] SCLang crashed by simple switch statement?
Hi -
This looks so straightforward. So is there any reason why it crashes SCLang?
(~vtc = {|phoneme|
switch(phoneme,"i:", {~tract.set(\f1, 300, \f2, 2300, \vnmix, 1.0)},"i", {~tract.set(\f1, 360, \f2, 2100, \vnmix, 1.0)},"e", {~tract.set(\f1, 570, \f2, 1970, \vnmix, 1.0)},"a", {~tract.set(\f1, 750, \f2, 1750, \vnmix, 1.0)},"a:", {~tract.set(\f1, 680, \f2, 1100, \vnmix, 1.0)},"o", {~tract.set(\f1, 600, \f2, 900, \vnmix, 1.0)},"o:", {~tract.set(\f1, 450, \f2, 740, \vnmix, 1.0)},"u", {~tract.set(\f1, 380, \f2, 950, \vnmix, 1.0)},"u:", {~tract.set(\f1, 300, \f2, 940, \vnmix, 1.0)},"ᴧ", {~tract.set(\f1, 720, \f2, 1240, \vnmix, 1.0)},"ə:", {~tract.set(\f1, 580, \f2, 1380, \vnmix, 1.0)});
};)~vtc.value("a");
It crashes the thing whether or not the "~tract" synth exists. Bydeleting some of the cases from the switch statement I can get it towork, but I can't spot a pattern (the "u" case, the "i:" case and the"ə:" case all seem able to crash it).
For what it's worth the crash log has this in it:
Exception: EXC_BAD_ACCESS (0x0001)Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0000000c
Thread 0 Crashed:0 SuperCollider 0x0005ec34 Interpret(VMGlobals*) +20476 (PyrInterpreter3.cpp:2185)1 SuperCollider 0x0005f3dc runInterpreter + 248(PyrInterpreter3.cpp:417)2 SuperCollider 0x00060dd8 runLibrary + 100(PyrLexer.cpp:2388)3 SuperCollider 0x00014c2c -[MyDocumentsendSelection:] + 196 (MyDocument.M:806)4 SuperCollider 0x0001ac50 -[SCTextView keyDown:]+ 564 (SCTextView.M:181)5 com.apple.AppKit 0x936800d8 -[NSWindow sendEvent:] + 64246 com.apple.AppKit 0x93628bfc -[NSApplicationsendEvent:] + 41727 com.apple.AppKit 0x93620090 -[NSApplication run] + 5088 com.apple.AppKit 0x937108bc NSApplicationMain + 4529 SuperCollider 0x0000278c _start + 348 (crt.c:272)10 SuperCollider 0x0000262c start + 60
I'm on 10.4 and using the CVS "Deployment" build (did a freshcheckout--cleanall--build but no change).
ThanksDan
-- http://www.mcld.co.uk