jeremywen/JW-Modules

Uninitialized pointer in MinMax widget

Closed this issue · 6 comments

Hi Jeremy, I stumbled on an access to an uninitialized pointer in the MinMax module: module won't be initialized when the widget is rendered in the module browser.

JW-Modules/src/MinMax.cpp

Lines 149 to 150 in 3dfdfa5

statsX.calculate(module->bufferX);
statsY.calculate(module->bufferY);

but it doesn't error out because frame is zero, right?

does it only call draw once?

Hm, yes, you're right.
I implemented an alternative module browser which allows resizing the previews and I noticed the crashes while changing the preview size while the browser is open. Everytime the size is changed draw is called again.
You can try it here if you like, the module is called "MB": https://github.com/stoermelder/vcvrack-packtau/releases/tag/Nightly

ah yes i tried that out with the v0.6 mode because i love favorites, but i also love the previews, so oh well - i can add a simple check for my next update if that helps you

Yes that would be great, thanks!

fix is released