Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crash when calling play on a not-yet ready Buffer #2005

Closed
patrickdupuis opened this issue Apr 25, 2016 · 6 comments
Closed

Server crash when calling play on a not-yet ready Buffer #2005

patrickdupuis opened this issue Apr 25, 2016 · 6 comments
Milestone

Comments

@patrickdupuis
Copy link
Contributor

This was reported on sc-users.
http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/beginner-question-on-samples-td7624999.html

Evaluating the following line crashes the server for some users:

b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav"); b.play;

I'm on 3.7.1 linux. It has been reported to crash on OSX as well.

@patrickdupuis
Copy link
Contributor Author

Post window says:
-> Synth('temp__0' : 1000)
RESULT= 0

@gusano
Copy link
Member

gusano commented Apr 25, 2016

With 3.8dev (linux) I only get an error, no crash:

ERROR: a PlayBuf: wrong number of channels (nil)

PROTECTED CALL STACK:
    MultiOutUGen:initOutputs    0x332de80
        arg this = a PlayBuf
        arg numChannels = nil
        arg rate = audio
...

Full error here

@jamshark70
Copy link
Contributor

@patrickdupuis do you have any extensions that might be overriding core Buffer methods?

As far as I can see in the main 3.7 class library, the crash should be impossible -- as gusano noted, Buffer:play should fail even to build the SynthDef. The only ways that Buffer:play could be sending a SynthDef and trying to play anything in this case are:

  • the play method is overridden somewhere with a buggy, unsafe alternative;
  • or, something else is overridden so that the Buffer object's default numChannels is a number (rather than nil, as in the main library).

@jamshark70
Copy link
Contributor

Disregard my last comment. It's a genuine bug in 3.7 that is fixed in 3.8.

We should backport the fix into 3.7. Commit = 727f7b3

@telephon
Copy link
Member

No need to backport IMO, 3.8 will come out in 12 days.

@telephon telephon added this to the 3.8 milestone May 18, 2016
@vivid-synth
Copy link
Member

This can be closed, no?

@nhthn nhthn closed this as completed Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants