clone45 / voxglitch

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

Windows crash #173

Closed SteveRussell33 closed 2 years ago

SteveRussell33 commented 2 years ago

Crashes opening browser with library build

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff82a3ce435 in plugin!_ZN11ImageWidget4drawERKN4rack6widget6Widget8DrawArgsE () from /c/Program Files/VCV/Rack2 Pro/plugins/voxglitch/plugin.dll
(gdb) bt
#0  0x00007ff82a3ce435 in plugin!_ZN11ImageWidget4drawERKN4rack6widget6Widget8DrawArgsE () from /c/Program Files/VCV/Rack2 Pro/plugins/voxglitch/plugin.dll
#1  0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x15482558860, child=0x1548255c340, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#2  0x00007ff8414025e2 in rack::widget::Widget::draw (this=this@entry=0x15482558860, args=...) at src/widget/Widget.cpp:280
#3  0x00007ff8413d431b in rack::app::ParamWidget::draw (this=0x15482558860, args=...) at src/app/ParamWidget.cpp:189
#4  0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154821b6c70, child=0x15482558860, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#5  0x00007ff8414025e2 in rack::widget::Widget::draw (this=this@entry=0x154821b6c70, args=...) at src/widget/Widget.cpp:280
#6  0x00007ff8413c790a in rack::app::ModuleWidget::draw (this=0x154821b6c70, args=...) at src/app/ModuleWidget.cpp:213
#7  0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154828fa340, child=0x154821b6c70, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#8  0x00007ff8414025e2 in rack::widget::Widget::draw (this=this@entry=0x154828fa340, args=...) at src/widget/Widget.cpp:280
#9  0x00007ff8413ffc43 in rack::widget::FramebufferWidget::drawFramebuffer (this=0x154828fa340) at src/widget/FramebufferWidget.cpp:293
#10 0x00007ff841400739 in rack::widget::FramebufferWidget::render (this=0x154828fa340, scale=..., offsetF=..., clipBox=...) at src/widget/FramebufferWidget.cpp:247
#11 0x00007ff841400db2 in rack::widget::FramebufferWidget::draw (this=0x154828fa340, args=...) at src/widget/FramebufferWidget.cpp:130
#12 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154828fa570, child=0x154828fa340, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#13 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x154828fa570, args=...) at src/widget/Widget.cpp:280
#14 0x00007ff84140286d in rack::widget::ZoomWidget::draw (this=0x154828fa570, args=...) at src/widget/ZoomWidget.cpp:54
#15 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x15482487f80, child=0x154828fa570, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#16 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x15482487f80, args=...) at src/widget/Widget.cpp:280
#17 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x15482487ed0, child=0x15482487f80, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#18 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x15482487ed0, args=...) at src/widget/Widget.cpp:280
#19 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154824d9790, child=0x15482487ed0, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#20 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x154824d9790, args=...) at src/widget/Widget.cpp:280
#21 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154824d96c0, child=0x154824d9790, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#22 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x154824d96c0, args=...) at src/widget/Widget.cpp:280
#23 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154824d93e0, child=0x154824d96c0, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#24 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x154824d93e0, args=...) at src/widget/Widget.cpp:280
#25 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154824d9320, child=0x154824d93e0, args=..., layer=layer@entry=0)
    at src/widget/Widget.cpp:311
#26 0x00007ff8414025e2 in rack::widget::Widget::draw (this=this@entry=0x154824d9320, args=...) at src/widget/Widget.cpp:280
#27 0x00007ff8413fb54f in rack::ui::ScrollWidget::draw (this=0x154824d9320, args=...) at src/ui/ScrollWidget.cpp:68
--Type <RET> for more, q to quit, c to continue without paging--c
#28 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154824315f0, child=0x154824d9320, args=..., layer=layer@entry=0) at src/widget/Widget.cpp:311
#29 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x154824315f0, args=...) at src/widget/Widget.cpp:280
#30 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x1548110fef0, child=0x154824315f0, args=..., layer=layer@entry=0) at src/widget/Widget.cpp:311
#31 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x1548110fef0, args=...) at src/widget/Widget.cpp:280
#32 0x00007ff8414024c8 in rack::widget::Widget::drawChild (this=this@entry=0x154826e5ab0, child=0x1548110fef0, args=..., layer=layer@entry=0) at src/widget/Widget.cpp:311
#33 0x00007ff8414025e2 in rack::widget::Widget::draw (this=0x154826e5ab0, args=...) at src/widget/Widget.cpp:280
#34 0x00007ff841406872 in rack::window::Window::step (this=this@entry=0x1548250f9f0) at src/window/Window.cpp:504
#35 0x00007ff841406998 in rack::window::Window::run (this=0x1548250f9f0) at src/window/Window.cpp:409
#36 0x00007ff7f91b163b in main (argc=<optimized out>, argv=<optimized out>) at adapters/standalone.cpp:240
clone45 commented 2 years ago

Hi Steve! If you have a moment, could you see if there's a voxglitch.json file in your /Rack2/ folder? (It's the same folder where the log.txt is generated)

SteveRussell33 commented 2 years ago

Hey Bret, there is indeed:

{
  "theme":"default"
}

There's a line in log.txt that might be of interest:

[13.501 warn src/window/Window.cpp:751 loadImage] Cannot read file ./plugins/voxglitch/./plugins/voxglitch/res/themes/default/round_shadow.png
clone45 commented 2 years ago

Thanks Steve. I'll do my best to figure this one out.

clone45 commented 2 years ago

It's really interesting to me that the path listed is

./plugins/voxglitch/./plugins/voxglitch/res/themes/default/round_shadow.png

That's the first thing that caught my eye. It seems like one of the ./plugins/voxglitch/ is redundant. However, what's even more strange is that some code just prior to the round_shadow.png being loaded is almost identical, and it didn't throw an error. Check it out:

nearly_identical

If the path was wrong, then I would have expected Big-Knob.png to throw an error as well. Did you see anything like that in the log file?

Ahh... regardless, I see the issue. It's honestly surprising that it works for me and others since the code is double-specifying the path to the asset folder. What version of Windows are you using? I'll have this patched tomorrow and get a fixed version submitted to Rack ASAP!!

SteveRussell33 commented 2 years ago

Hi Bret, Windows 10 here, this machine won't update to v11; not bothered really tbh. I happened to look in the log file as I usually use GDB for debugging purposes; I go by the log there as opposed to Rack's log file.

The two lines previous to that one were:

[13.375 info src/window/Window.cpp:73 loadFile] Loaded image ./plugins/voxglitch/res/themes/default/background2.jpg
[13.409 info src/window/Window.cpp:73 loadFile] Loaded image ./plugins/voxglitch/res/autobreak/themes/default/details.png

So I assumed that as some images load and that particular image didn't, the problem would be where you pointed to in your post above or possibly an error with the image itself, which in this case seemed unlikely. Generally speaking, I see nothing wrong with the code - I've seen similar in the past e.g. MSM's MSMPanel; like you said it didn't throw an error.

clone45 commented 2 years ago

Hi Steve,

Could I burden you with a request? Could you test with this build and see if it fixed the issue? https://drive.google.com/file/d/1UD1x6NDPSVh-waMX1PSGlnU-SZf7YqZr/view?usp=sharing

Thanks, Bret

SteveRussell33 commented 2 years ago

Perfect Bret! No crash and the log is clean, so all good. Nice work!

I'll close this issue; see you in the forum!