scriptnode / convolution + oversampling = read access violation. mtx was 0x100.
-
Can you reliably make it crash with oversampling?
yeah, here's a minimal example that uses a timer to toggle between impulses. The exact time it takes to crash isn't consistent, but it takes less than a minute.
I believe it may have something to do with multithreading.
https://hub.korneffaudio.com/index.php/s/MBtPXHXXtZYcLZW -
definitely something with multi-threading. I turned it off on the example project and I just ran the compiled plugin for over 10 minutes now. No crashes.
-
@Christoph-Hart anything else I can do to get this on your radar? I think it's the source of some Logic crash reports I'm getting with projects containing scriptnode/convoltion/oversampling.
-
@Dan-Korneff do I have to compile the minimal project to a plugin or does it crash in HISE too?
-
@Christoph-Hart You'll have to compile. It doesn't crash HISE.
-
@Dan-Korneff Alright. And do I have to run it in Logic or is it crashing in other hosts too?
And I assume you're using the latest HISE, right? I fixed a few multithreading issues with convolution in December.
-
@Christoph-Hart I'm using the commit from Feb 6.
I have only tested on PC with Reaper and Cubase, but the Logic crash reports I get are Memory Access error so I'm assuming it's related. -
I'm having trouble with the oversampling as well but not on convolution, on just sample based instruments. The weird thing is: I have built some to success using oversample2x. But I have one project using 3 samplers unisono and this leads to crashing my DAW, though I have plugins running, that make extensive use of oversampling.
Currently, I'm running a build of the latest develop branch. Everything else is fine.
-
@Frankbeat It might be the case that the oversampling will lead to audio buffer sizes that exceed the streaming buffers for the voices (I implemented oversampling after putting up all safeguards for the streaming engine so I wouldn't be surprised if this creates an edge case that leads to a buffer overflow).
Can you reliably reproduce that? I can take a look at an example that crashes deterministically.
-
@Christoph-Hart I just noticed issues with oversampling not related to convolution as well.
-
@Christoph-Hart From now, it could take me a few days to reply with a sample of the project, but what you describe seems to make sense. AFAIK the generic buffer size is set to 512. I will see if it helps to increase that. My other plugins based on 1 or 2 samplers are fine with double rate oversampling.
-
Okay, now I have investigated on this… I Changed the buffer size in HISE Settings –> All to 1024. Now it doesn't crash anymore. But this is only tested for 2x so far
-
If I want my whole plugin to oversample its processes, do I even need to set the Oversampler as ScriptFX? Or can I just paste
Engine.setMinimumSampleRate(88200)
into my Init script?
-
@Frankbeat no actually if you use both the oversamplers stack onto each other.
-
This post is deleted! -
Actually, Engine.setMinimumSampleRate() seems to do something different to the Oversampler: It Changes the rate, a sampler reads waveforms on.
Example: If I enter 88200, my waveforms (rating 44100 Hz) appear to be red with half speed.
-
@Christoph-Hart Were you able to load up this test project? Crash on your end?
https://hub.korneffaudio.com/index.php/s/MBtPXHXXtZYcLZW