Skip to content
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

Rack v1: Crash when loading modules in module browser #42

Closed
cschol opened this issue Jun 19, 2019 · 12 comments
Closed

Rack v1: Crash when loading modules in module browser #42

cschol opened this issue Jun 19, 2019 · 12 comments

Comments

@cschol
Copy link

cschol commented Jun 19, 2019

Backtrace on Ubuntu 18.04:

Thread 1 "Rack" received signal SIGSEGV, Segmentation fault.
0x00007fffec46f4b1 in MsDisplayWidget::draw (this=0x555557019710, args=...) at src/DelayPlusStereo.cpp:365
365         to_display << std::right  << std::setw(5) << *value;
(gdb) bt
#0  0x00007fffec46f4b1 in MsDisplayWidget::draw(rack::widget::Widget::DrawArgs const&) (this=0x555557019710, args=...) at src/DelayPlusStereo.cpp:365
#1  0x000055555578d209 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) (this=this@entry=0x555556f70260, args=...) at src/widget/Widget.cpp:174
#2  0x00005555557795df in rack::app::ModuleWidget::draw(rack::widget::Widget::DrawArgs const&) (this=0x555556f70260, args=...) at src/app/ModuleWidget.cpp:259
#3  0x000055555578d209 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) (this=this@entry=0x555556f701f0, args=...) at src/widget/Widget.cpp:174
#4  0x000055555578c072 in rack::widget::ZoomWidget::draw(rack::widget::Widget::DrawArgs const&) (this=0x555556f701f0, args=...) at src/widget/ZoomWidget.cpp:38
#5  0x000055555578d209 in rack::widget::Widget::draw(rack::widget::Widget::DrawArgs const&) (this=this@entry=0x555556f70140, args=...) at src/widget/Widget.cpp:174
#6  0x000055555578b6a7 in rack::widget::FramebufferWidget::drawFramebuffer() (this=0x555556f70140) at src/widget/FramebufferWidget.cpp:187
#7  0x000055555578bb48 in rack::widget::FramebufferWidget::step() (this=0x555556f70140) at src/widget/FramebufferWidget.cpp:79
#8  0x000055555578dd08 in rack::widget::Widget::step() (this=0x555556285650) at src/widget/Widget.cpp:151
#9  0x000055555578dd08 in rack::widget::Widget::step() (this=0x5555562855e0) at src/widget/Widget.cpp:151
#10 0x000055555578dd08 in rack::widget::Widget::step() (this=this@entry=0x555556282da0) at src/widget/Widget.cpp:151
#11 0x000055555574abba in rack::ui::SequentialLayout::step() (this=0x555556282da0) at src/ui/SequentialLayout.cpp:14
#12 0x000055555578dd08 in rack::widget::Widget::step() (this=this@entry=0x55555627fd40) at src/widget/Widget.cpp:151
#13 0x000055555574ab11 in rack::ui::MarginLayout::step() (this=0x55555627fd40) at src/ui/MarginLayout.cpp:10
#14 0x000055555578dd08 in rack::widget::Widget::step() (this=0x55555627fca0) at src/widget/Widget.cpp:151
#15 0x000055555578dd08 in rack::widget::Widget::step() (this=this@entry=0x555556282c90) at src/widget/Widget.cpp:151
#16 0x000055555574be16 in rack::ui::ScrollWidget::step() (this=0x555556282c90) at src/ui/ScrollWidget.cpp:36
#17 0x000055555578dd08 in rack::widget::Widget::step() (this=0x555556288310) at src/widget/Widget.cpp:151
#18 0x000055555578dd08 in rack::widget::Widget::step() (this=0x55555627f840) at src/widget/Widget.cpp:151
#19 0x000055555578dd08 in rack::widget::Widget::step() (this=this@entry=0x555555e3ed90) at src/widget/Widget.cpp:151
#20 0x000055555577f98c in rack::app::Scene::step() (this=0x555555e3ed90) at src/app/Scene.cpp:51
#21 0x000055555573ad59 in rack::Window::run() (this=0x555555e67450) at src/window.cpp:363
#22 0x00005555556b44f5 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at src/main.cpp:185
@AScustomWorks
Copy link
Owner

Thanks, can't test on Linux right now, but I think I found the error (missing NULL declaration to avoid the module browser crash):
dd1d381

@cschol
Copy link
Author

cschol commented Jun 20, 2019

I'll test it. Thanks.

@cschol
Copy link
Author

cschol commented Jun 20, 2019

That fixes it. Thanks.

@cschol cschol closed this as completed Jun 20, 2019
@Coirt
Copy link

Coirt commented Jun 20, 2019

There might be a few couple more BPMcalc:
@AScustomWorks

Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000000067eba94e in std::operator<< <char, std::char_traits<char>, std::allocator<char> > (__str=..., __os=...)
    at C:/msys64/mingw64/include/c++/8.2.1/bits/basic_string.h:6323
6323        operator<<(basic_ostream<_CharT, _Traits>& __os,
(gdb) bt
#0  0x0000000067eba94e in std::operator<< <char, std::char_traits<char>, std::allocator<char> > (__str=..., __os=...)
    at C:/msys64/mingw64/include/c++/8.2.1/bits/basic_string.h:6323
#1  TempodisplayWidget::draw (this=0x2e314cd0, args=...)
    at src/BPMCalc.cpp:344
#2  0x00000000004a2388 in rack::widget::Widget::draw (
    this=this@entry=0x2e321860, args=...) at src/widget/Widget.cpp:174
#3  0x000000000048e3cb in rack::app::ModuleWidget::draw (this=0x2e321860,
    args=...) at src/app/ModuleWidget.cpp:259
#4  0x00000000004a2388 in rack::widget::Widget::draw (this=0x2e3217a0,
    args=...) at src/widget/Widget.cpp:174
#5  0x00000000004a2f0f in rack::widget::ZoomWidget::draw (this=0x2e3217a0,
    args=...) at src/widget/ZoomWidget.cpp:38
#6  0x00000000004a2388 in rack::widget::Widget::draw (
    this=this@entry=0x2e3216a0, args=...) at src/widget/Widget.cpp:174
#7  0x00000000004a3a2b in rack::widget::FramebufferWidget::drawFramebuffer (
    this=0x2e3216a0) at src/widget/FramebufferWidget.cpp:187
#8  0x00000000004a32fa in rack::widget::FramebufferWidget::step (
    this=0x2e3216a0) at src/widget/FramebufferWidget.cpp:79
#9  0x00000000004a2bd7 in rack::widget::Widget::step (this=0x6d461c0)
    at src/widget/Widget.cpp:151
#10 0x00000000004a2bd7 in rack::widget::Widget::step (this=0x6d46120)
    at src/widget/Widget.cpp:151
#11 0x00000000004a2bd7 in rack::widget::Widget::step (
    this=this@entry=0x6d3cb60) at src/widget/Widget.cpp:151
#12 0x00000000004a11fb in rack::ui::SequentialLayout::step (this=0x6d3cb60)
    at src/ui/SequentialLayout.cpp:14
#13 0x00000000004a2bd7 in rack::widget::Widget::step (
    this=this@entry=0x6d3ca90) at src/widget/Widget.cpp:151
#14 0x000000000049f0dd in rack::ui::MarginLayout::step (this=0x6d3ca90)
    at src/ui/MarginLayout.cpp:10
#15 0x00000000004a2bd7 in rack::widget::Widget::step (this=0x6d3c7e0)
    at src/widget/Widget.cpp:151
#16 0x00000000004a2bd7 in rack::widget::Widget::step (
    this=this@entry=0x6d3c750) at src/widget/Widget.cpp:151
#17 0x000000000049ead3 in rack::ui::ScrollWidget::step (this=0x6d3c750)
    at src/ui/ScrollWidget.cpp:36
#18 0x00000000004a2bd7 in rack::widget::Widget::step (this=0x6d3bd50)
    at src/widget/Widget.cpp:151
#19 0x00000000004a2bd7 in rack::widget::Widget::step (this=0x6d3bce0)
    at src/widget/Widget.cpp:151
#20 0x00000000004a2bd7 in rack::widget::Widget::step (this=0x6cc70d0)
    at src/widget/Widget.cpp:151
#21 0x000000000048e0c4 in rack::app::Scene::step (this=0x6cc70d0)
    at src/app/Scene.cpp:51
#22 0x0000000000454bf0 in rack::Window::run (this=0x6cd3450)
    at src/window.cpp:363
#23 0x000000000079c7dd in main (argc=<optimized out>, argv=<optimized out>)
    at src/main.cpp:175
(gdb) make: *** [Makefile:64: debug] Interrupt

@cschol cschol reopened this Jun 20, 2019
@cschol
Copy link
Author

cschol commented Jun 20, 2019

@Coirt Is this in the module browser or when the module is running?

@Coirt
Copy link

Coirt commented Jun 20, 2019

Browser

@cschol
Copy link
Author

cschol commented Jun 20, 2019

Confirmed. It is seemingly timing related whether the crash occurs. A few times I got it to work...but it is definitely an issue. Thanks for reporting.

@cschol
Copy link
Author

cschol commented Jun 20, 2019

This should do it:

diff --git a/src/BPMCalc.cpp b/src/BPMCalc.cpp
index f8a353a..30d15f4 100755
--- a/src/BPMCalc.cpp
+++ b/src/BPMCalc.cpp
@@ -312,7 +312,7 @@ struct BPMCalc : Module {
 
 ////////////////////////////////////
 struct TempodisplayWidget : TransparentWidget {
-  std::string *value;
+  std::string *value = NULL;
   std::shared_ptr<Font> font;
 
   TempodisplayWidget() {
@@ -634,4 +634,4 @@ struct BPMCalcWidget : ModuleWidget {
 };
 
 
-Model *modelBPMCalc = createModel<BPMCalc, BPMCalcWidget>("BPMCalc");
\ No newline at end of file
+Model *modelBPMCalc = createModel<BPMCalc, BPMCalcWidget>("BPMCalc");
diff --git a/src/BPMCalc2.cpp b/src/BPMCalc2.cpp
index 62d9d2d..08995a0 100755
--- a/src/BPMCalc2.cpp
+++ b/src/BPMCalc2.cpp
@@ -312,7 +312,7 @@ struct BPMCalc2 : Module {
 
 ////////////////////////////////////
 struct TempodisplayWidget : TransparentWidget {
- std::string *value;
+ std::string *value = NULL;
   std::shared_ptr<Font> font;
 
   TempodisplayWidget() {
@@ -425,4 +425,4 @@ struct BPMCalc2Widget : ModuleWidget {
 };
 
 
-Model *modelBPMCalc2 = createModel<BPMCalc2, BPMCalc2Widget>("BPMCalc2");
\ No newline at end of file
+Model *modelBPMCalc2 = createModel<BPMCalc2, BPMCalc2Widget>("BPMCalc2");

@Coirt
Copy link

Coirt commented Jun 20, 2019

Interesting, yeah confirmed now loading! 🍶

@AScustomWorks
Copy link
Owner

Oh, missed those two. fixed now:
15e8965
And added "Distortion" tag to the Overdrive FX module in plugin.json
730c764

@cschol
Copy link
Author

cschol commented Jun 20, 2019

Thanks!

@cschol cschol closed this as completed Jun 20, 2019
@Coirt
Copy link

Coirt commented Jun 20, 2019

Seems fixed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants