Closed scabug closed 13 years ago
Imported From: https://issues.scala-lang.org/browse/SI-3366?orig=1 Reporter: @Sciss
@paulp said: It is in their nature to require some effort to distill into a test case. But I haven't yet seen the one where that couldn't be done. As always, tickets lacking a test case are necessarily of lower priority than the ones which do have one. (See #3363 for an example of what happens when one persists.)
@dubochet said: Before we go further in trying to understand what is going on, could you please confirm that this issue is also reproducible with the latest trunk (or wait for RC2 in a few days and test it on this).
@Sciss said: Yes, sure, I will test again against RC2.
@Sciss said: same behaviour in RC2...
@Sciss said: another occasion where i ran into it today. this throws compiler error:
val x = (SynthDef("deepsea" ) {
val out = "out".kr
val pan = "pan".kr
val amp = "amp".kr(0.1)
val variation = "variation".kr(0.9)
val n = Rand(7, 46);
var dt = 25.0 + Rand(-1.7, 1.7);
dt = dt + LFNoise2.kr(2)* variation * 0.001;
val freq = 901 + Rand(0, 65);
val t = Impulse.ar(dt.reciprocal)* 100
val count = PulseCount.ar(t);
val mul = count < n;
var u = BPF.ar(mul * t, freq, 0.1);
u = BPF.ar(u, freq * (count % LFNoise1.kr(1).madd(9,11) + 1), 0.2);
DetectSilence.ar(u, doneAction = 2);
Out.ar(out, Pan2.ar(u, pan, amp * 10));
}).play(s)
this does ok:
val x = (SynthDef("deepsea" ) {
val out = "out".kr
val pan = "pan".kr
val amp = "amp".kr(0.1)
val variation = "variation".kr(0.9)
val n = Rand(7, 46);
var dt = 25.0 + Rand(-1.7, 1.7);
dt = dt + LFNoise2.kr(2)* variation * 0.001;
val freq = 901 + Rand(0, 65);
val t = Impulse.ar(dt.reciprocal)* 100
val count = PulseCount.ar(t);
val mul = count < n;
var u = BPF.ar(mul * t, freq, 0.1);
u = BPF.ar(u, freq * (count % LFNoise1.kr(1).madd(9,11) + 1), 0.2);
DetectSilence.ar(u, doneAction = 2);
Out.ar(out, Pan2.ar(u, pan, amp * 10));
}); x.play(s)
Exception in thread "AWT-EventQueue-0" java.lang.Error: symbol value out$$1 does not exist in line4$$object$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw.<init>
at scala.tools.nsc.symtab.SymbolTable.abort(SymbolTable.scala:34)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:844)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.genLoadArguments(GenICode.scala:1031)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:664)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:878)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:870)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.genLoadArguments(GenICode.scala:1031)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:743)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:513)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genStat(GenICode.scala:184)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase$$$$anonfun$$genStat$$1.apply(GenICode.scala:156)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase$$$$anonfun$$genStat$$1.apply(GenICode.scala:156)
at scala.collection.LinearSeqOptimized$$class.foldLeft(LinearSeqOptimized.scala:124)
at scala.collection.immutable.List.foldLeft(List.scala:46)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.genStat(GenICode.scala:156)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:869)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genStat(GenICode.scala:173)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase$$$$anonfun$$genStat$$1.apply(GenICode.scala:156)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase$$$$anonfun$$genStat$$1.apply(GenICode.scala:156)
at scala.collection.LinearSeqOptimized$$class.foldLeft(LinearSeqOptimized.scala:124)
at scala.collection.immutable.List.foldLeft(List.scala:46)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.genStat(GenICode.scala:156)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:869)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.gen(GenICode.scala:127)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase$$$$anonfun$$gen$$1.apply(GenICode.scala:82)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase$$$$anonfun$$gen$$1.apply(GenICode.scala:82)
at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:62)
at scala.collection.immutable.List.foreach(List.scala:46)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.gen(GenICode.scala:82)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.gen(GenICode.scala:149)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.gen(GenICode.scala:101)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase$$$$anonfun$$gen$$1.apply(GenICode.scala
... (etc)
again sorry for not being able to provide an isolated example. the above codes can be executed in the REPL fo scalacollider-swing though ( http://github.com/Sciss/ScalaColliderSwing )
@Sciss said: shortened
val x = (SynthDef("deepsea") {
val out = "out".kr
Out.ar(out, Silent.ar(2))
}).play(s)
@magarciaEPFL said:
The last snippet was "shortened", what about "self-contained"?
@Sciss said: the library currently doesn't compile against RC3 (due to the @ _* issue). i can try to narrow it down with RC4...
@Sciss said: the problem is still there in RC5. strangely, it doesn't occur with overloaded methods:
val x = (SynthDef("X") {
val freq = 333
Out.ar( 0, SinOsc.ar( freq ))
}).play( s.defaultGroup )
this one fails with
java.lang.Error: symbol value freq$$1 does not exist in line30$$object$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw$$$$iw.<init>
at scala.tools.nsc.symtab.SymbolTable.abort(SymbolTable.scala:33)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:843)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.genLoadArguments(GenICode.scala:1030)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:663)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:877)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:869)
but this one:
val x = (SynthDef("X") {
val freq = 333
Out.ar( 0, SinOsc.ar( freq ))
}).play
has no problems. the respective methods in SynthDef are:
def play: Synth = play()
def play( target: Node = Server.default, args: Seq[ ControlSetMap ] = Nil, addAction: AddAction = addToHead ) : Synth = { ... }
trying to isolate this, but it's difficult...
hi,
i am getting a compiler error with
"Error:Caused by java.lang.Error: symbol value player$$1 does not exist in de.sciss.synth.Buffer.play"
for the last change committed to http://github.com/Sciss/ScalaCollider (# f675b4b051969e9c4b852b444829b03eafd4cd2a )... the lines in charge are in de.sciss.synth.Buffer :
the exception:
the project is fairly complex and in this case uses a lot of implicits, so it will be difficult to create an isolated case...
this is with Scala 2.8 RC1.
a workaround has been committed in the next version # aec41adf6a91ad7ecf5b0028bb79359d06b9a3ef , which uses an explicit method for creating the Synth instead:
this still leaves me with a strange runtime error i will need to examine, though...
sorry for not being able to provide easier cases, but i guess that is the nature of nasty compiler bugs....