Setting the `rate` of `GrainBuf` to `inf` causes an Exception Access Violation on Windows
Author: ClemapfelCreated Sep 11, 2026Updated Sep 13, 2026
Labelsbugos: Windowscomp: server plugins
s.waitForBoot {
var def = SynthDef.new(\grainViolation, { arg bufnum;
var grains = GrainBuf.ar(1,
trigger: Impulse.ar(0),
sndbuf: bufnum,
rate: inf // < HERE
);
Out.ar(0, grains.dup);
}).add;
// allocate 1s of white noise in a buffer
var nSamples = 44100;
var buf = Buffer.alloc(s, nSamples);
s.sync;
buf.loadCollection(nSamples.collect { rand(-1.0, 1.0) });
s.sync;
"start".postln;
// start the synth
Synth.new(def.name, [
\bufnum, buf.bufnum
]);
};SuperCollider 3 server ready.
Shared memory server interface initialized
start
Server 'localhost' exited with exit code -1073741819.
server 'localhost' disconnected shared memory interfaceWhere -1073741819 is 0xC0000005, an error thrown by the windows kernel when it detects an app is trying to access RAM outside its address range.
Other inputs for rate do not cause this error. I am unable to confirm what this throws on other platforms. Tested on 3.14.1.
Feel free to close this if this is considered intended behavior, inf is obviously an invalid rate, but I happened upon it in a real project and got stuck with the hardcrash because I didn't notice a UGen outputting inf into the rate.
Source: supercollider/supercollider