I’m loading IRs in the processBlock as suggested in the documentation. Sometimes, not always, the standalone crashes when I close it, this is the stack:
I don’t have any Convolution-related code in my destructor, so the default one is called. I see that also the “Impl” destructor is called and then the same is for the “MessageQueue”. Then something related to that Queue triggers a bad access.
Is there something that I’m doing in the wrong way? I never explicitly deal with that Queue and I have just a single Convolution object.
Thank you.
[UPDATE]
I’ve switched to unique_ptr as hinted by @PaulDriessen and the problem seems solved, I’ve tried multiple times to make it happen again but it didn’t. I’ve also checked with address sanitizer as suggested by @jdv and @duvrin and everything seems ok. For the ones wondering, in CMake in order to use Asan you just have to add these lines:
Actually no, I’m not familiar with that but I will of course look into it, thank you.
I was mainly wondering if I was doing something wrong in the way I define that object or something else.
If you’re on Xcode go to edit scheme->Diagnostics and select the Address Sanitizer check box. This will make your build time a lot slower but that’s ok - because the sanitizer wraps every function in your code with some magic stuff. Once built, use your plugin as you normally do and wait for the sanitizer to stop you.
Don’t forget to uncheck it when you’re done with it.
I remember having a simular problem with Convolution, I switched to unique_ptr, but I dont know why it works better. It just does…
I’ll be following this thread to learn what’s going on here
I’m actually on macOS, and I’m using Visual Studio Code just to write code. I’ve read that it’s pretty simple to add Asan in the CMake file, I’ll try and then update this thread for other users that may have the same problem.