clone45 / voxglitch

Modules for VCV Rack
GNU General Public License v3.0
98 stars 16 forks source link

Groovebox module browser crash after #149 fix #151

Closed RareBreeds closed 1 year ago

RareBreeds commented 2 years ago

This bug report is for the recent commit 7ab431fd119bfd59526e733b76e0131b01d683b5 which isn't in any release yet. Previous commits don't reproduce the issue.

After this commit opening the module browser sometimes causes Rack to crash. I'm building from source and running on macOS.

The output from address sanitizer is copied below, the stack backtrace without an address sanitizer build is the same but it happens more reliably with address sanitizer enabled.

AddressSanitizer:DEADLYSIGNAL
=================================================================
==85914==ERROR: AddressSanitizer: SEGV on unknown address 0x17d7d7d7d82e4314 (pc 0x00000fdb732a bp 0x000204554e30 sp 0x000204554920 T0)
==85914==The signal is caused by a READ memory access.
    #0 0xfdb732a in UpdatesVisualizerWidget::UpdatesVisualizerWidget() UpdatesVisualizer.hpp:22
    #1 0xfdaa57b in GrooveBoxWidget::GrooveBoxWidget(GrooveBox*) GrooveBoxWidget.hpp:408
    #2 0xfd91ada in rack::plugin::Model* rack::createModel<GrooveBox, GrooveBoxWidget>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::TModel::createModuleWidget(rack::engine::Module*) helpers.hpp:37
    #3 0x1d05940 in rack::app::browser::ModelBox::createPreview() Browser.cpp:202
    #4 0x1d052fa in rack::app::browser::ModelBox::draw(rack::widget::Widget::DrawArgs const&) Browser.cpp:211
    #5 0x1d77751 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) Widget.cpp:280
    #6 0x1d77751 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) Widget.cpp:280
    #7 0x1d77751 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) Widget.cpp:280
    #8 0x1d77751 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) Widget.cpp:280
    #9 0x1d71103 in rack::ui::ScrollWidget::draw(rack::widget::Widget::DrawArgs const&) ScrollWidget.cpp:68
    #10 0x1d77751 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) Widget.cpp:280
    #11 0x1d77751 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) Widget.cpp:280
    #12 0x1d77751 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) Widget.cpp:280
    #13 0x1d7c2b1 in rack::window::Window::step() Window.cpp:504
    #14 0x1d7bbd7 in rack::window::Window::run() Window.cpp:409
    #15 0x69d75 in main standalone.cpp:239
    #16 0x10041110a  (<unknown module>)

==85914==Register values:
rax = 0x17d7d7d7d82e4314  rbx = 0x0000000204554d40  rcx = 0x0000100000000000  rdx = 0x000060d000084d38  
rdi = 0xbebebebec17218a5  rsi = 0x0000000000000004  rbp = 0x0000000204554e30  rsp = 0x0000000204554920  
 r8 = 0x00000000006836cf   r9 = 0xffffffff00000000  r10 = 0x00007ff84c911de0  r11 = 0x00001c100001ee3f  
r12 = 0x0000000204554a00  r13 = 0x0000000204554ba8  r14 = 0x0000000204554a88  r15 = 0x00001000408aa951  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV UpdatesVisualizer.hpp:22 in UpdatesVisualizerWidget::UpdatesVisualizerWidget()
==85914==ABORTING
Abort trap: 6

I enabled address sanitizer by building the plugin with: make -j8 EXTRA_FLAGS=-fsanitize=address EXTRA_LDFLAGS=-fsanitize=address

bret-2600 commented 2 years ago

Thanks for the heads up! The updates visualizer that threw the error was an idea that ended up being a dead end, and I'll be removing it before the next release. I appreciate the bug report!

clone45 commented 1 year ago

This should be fixed!