-
Notifications
You must be signed in to change notification settings - Fork 13
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
Buzzmachines can receive "0" instrument number #80
Comments
With 'instrument' do you mean 'wave' ? If you get a crash please get a backtrace. If you need help, maybe join the chat room I just tried it and did not get a crash. |
I think I did mean wave, yes. Does this song crash for you?
|
Backtrace: Thread 27 "Matilde-Tracker" received signal SIGSEGV, Segmentation fault. |
I think that assuming wave 0 is given to Matilde Tracker, then the vtbl is being overridden on Matilde/Tracker/CTrack.cpp:134
|
This calls CWavetableManager::GetInstrument -- probably easier to look there. |
Yeah, if I run:
We should probably change the wavetable to return a built-in silence buffer as a fallback. I'll give it a shot. |
I'll need to test in buzz (in my windows vm what the behavior is when requesting wavelevels (pCB->GetNearestWaveLevel() ) and having no wave loaded. |
Repro:
From Matilde Tracker's source in the buzzmachines project, it seems to assume that it will never be asked to play an instrument with a number less than 1. In this case, it receives instrument 0 and it indexes an array with "instrument_num - 1", which overwrites pointer data in its class and causes a crash.
Other machines may be making similar assumptions. Should buzztrax ensure that machines will always get instrument numbers >= 1?
The text was updated successfully, but these errors were encountered: