Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Stage 0.5.0-beta.3 crashes on Windows #4

Closed
dhemery opened this issue Jan 30, 2018 · 13 comments
Closed

Stage 0.5.0-beta.3 crashes on Windows #4

dhemery opened this issue Jan 30, 2018 · 13 comments

Comments

@dhemery
Copy link
Owner

dhemery commented Jan 30, 2018

Crashes with error:

This application has requested the Runtime to terminate it in an unusual way.

Microsoft says:

This problem may occur when you use the /GR and the /MD compiler switches, and the version of the Msvcrt.dll file and of the Msvcirt.dll file is 7.0.x.

Microsoft offers a hotfix, but it seems rude to ask my users to apply a hotfix, so still researching.

EDIT: The Microsoft info above may not be directly relevant. It's about compiling with Visual C++, but this error resulted from compiling with g++

@ghost
Copy link

ghost commented Jan 30, 2018

Studio@Studio-PC MINGW64 ~/Rack-0.5/plugins/DHE-Modules
$ make
g++ -fPIC -I../../include -I../../dep/include -DVERSION=0.5.0-beta.4 -MMD -g -O 3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-para meter -DARCH_WIN -D_USE_MATH_DEFINES -I./src -Wsuggest-override -std=c++11 -c -o build/src/gui/widget.cpp.o src/gui/widget.cpp
g++ -fPIC -I../../include -I../../dep/include -DVERSION=0.5.0-beta.4 -MMD -g -O 3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-para meter -DARCH_WIN -D_USE_MATH_DEFINES -I./src -Wsuggest-override -std=c++11 -c -o build/src/plugin/dhe-modules.cpp.o src/plugin/dhe-modules.cpp
g++ -fPIC -I../../include -I../../dep/include -DVERSION=0.5.0-beta.4 -MMD -g -O 3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-para meter -DARCH_WIN -D_USE_MATH_DEFINES -I./src -Wsuggest-override -std=c++11 -c -o build/src/stage/stage.cpp.o src/stage/stage.cpp
g++ -fPIC -I../../include -I../../dep/include -DVERSION=0.5.0-beta.4 -MMD -g -O 3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-para meter -DARCH_WIN -D_USE_MATH_DEFINES -I./src -Wsuggest-override -std=c++11 -c -o build/src/stage/stage-widget.cpp.o src/stage/stage-widget.cpp
g++ -fPIC -I../../include -I../../dep/include -DVERSION=0.5.0-beta.4 -MMD -g -O 3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-para meter -DARCH_WIN -D_USE_MATH_DEFINES -I./src -Wsuggest-override -std=c++11 -c -o build/src/upstage/upstage-widget.cpp.o src/upstage/upstage-widget.cpp
g++ -o plugin.dll build/src/gui/widget.cpp.o build/src/plugin/dhe-modules.cpp.o build/src/stage/stage.cpp.o build/src/stage/stage-widget.cpp.o build/src/upstage /upstage-widget.cpp.o -shared -L../../ -lRack

@dhemery
Copy link
Owner Author

dhemery commented Jan 30, 2018

@Phal-anx Can you attach the entire runtime command line output, starting from the point where you launch Rack?

@ghost
Copy link

ghost commented Jan 30, 2018

starting Rack with 'make run' on windows
linux gives the same error message on the end

Studio@Studio-PC MINGW64 ~/Rack-0.5
$ make run

TODO get rid of the mingw64 path

env PATH=dep/bin:/mingw64/bin ./Rack.exe
[info] Current working directory: C:\msys64\home\Studio\Rack-0.5
[info] Global directory: ./
[info] Local directory: ./
[info] Loading plugins from ./plugins
[info] Loaded plugin ./plugins/DHE-Modules/plugin.dll
[info] Loaded plugin ./plugins/Fundamental/plugin.dll
[info] Loaded plugin ./plugins/Jaffasplaffa/plugin.dll
[info] Loaded plugin ./plugins/JW-Modules/plugin.dll
[info] Loaded plugin ./plugins/LRTRack-0.5.210/plugin.dll
[info] Loaded plugin ./plugins/mtsch-vcvrack-plugins-0.5.2/plugin.dll
[info] Loaded plugin ./plugins/mtsch-vcvrack-plugins-master/plugin.dll
[info] Loaded plugin ./plugins/Nohmad/plugin.dll
[info] Loaded plugin ./plugins/Open-Data/plugin.dll
[info] Loaded plugin ./plugins/RJModules-master/plugin.dll
[info] Loaded plugin ./plugins/southpole-vcvrack-0.5.1/plugin.dll
[info] Loaded font ./res/DejaVuSans.ttf
[info] Loading patch ./autosave.vcv
[info] Loading settings ./settings.json
terminate called after throwing an instance of 'std::bad_function_call'
what(): bad_function_call

@dhemery
Copy link
Owner Author

dhemery commented Jan 30, 2018

terminate called after throwing an instance of 'std::bad_function_call'

Ah, that's very helpful. It looks as if I've got an uninitialized std::function somewhere.

@ghost
Copy link

ghost commented Jan 30, 2018

thats quite interesting for me because I would think that stuff like this normally shows up while compiling..
but I m still a noob with C++ so maybe it doesnt with std::function :D

@dhemery
Copy link
Owner Author

dhemery commented Jan 30, 2018

My comment was imprecise. Everything is initialized (so the compiler is happy), but some std::function ends up empty (no actual function to call). So when I try to call it, it throws a bad_function_call exception.

I've pushed a debug/issue-4 branch with debug statements in it.

And I may have also fixed the bug ;-)

Can you build that, try to add one Stage, and attach the entire console printout?

I'm a noob with this version of C++. I'm using features that I (clearly!) don't sufficiently understand.

@dizzisound
Copy link

dizzisound commented Feb 1, 2018

Hi Dale, it looks like the std::bad_function_call is gone, I followed the following steps:

  • I checked out the debug-issue-4 branch and launched the build which completed successfully
  • I launched a make debug in the master branch of Rack, and I could load both the modules without problems
  • then back again to my <plugins/DHE-modules-beta> folder and I launched a make VERSION=0.5.0-beta.4 dist command in it
  • I moved the dist folder content to the external folder with all the other third-party released plugins, the one pointed by my installed Rack standalone app
  • I launched Rack from my desktop shortcut and I loaded the modules in it with no issue

I attach the console log from the "make debug", a screenshot of the loaded modules, and the zip-file from the "make dist"

Best regards


CONSOLE OUTPUT

danielez@sfmi-nb-tec113 MINGW64 /vcvrack/Rack-0.5.0
$ make debug

TODO get rid of the mingw64 path

##env PATH=dep/bin:/mingw64/bin gdb -ex run ./Rack
env PATH=dep/bin:/mingw64/bin:/usr/bin:/usr/local/csound/bin:/usr/local/csound/plugins64 gdb -ex run ./Rack
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-msys".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Traceback (most recent call last):
File "", line 3, in
ImportError: No module named libstdcxx.v6.printers
/etc/gdbinit:6: Error in sourced command file:
Error while executing Python code.
Reading symbols from ./Rack...done.
Starting program: /vcvrack/Rack-0.5.0/Rack
[New Thread 22152.0x3580]
[info] Current working directory: C:\msys64\vcvrack\Rack-0.5.0
[info] Global directory: ./
[info] Local directory: ./
[info] Loading plugins from ./plugins
[info] Loaded plugin ./plugins/AepelzensModules/plugin.dll
[info] Loaded plugin ./plugins/Alikins-rack-plugins/plugin.dll
[info] Loaded plugin ./plugins/AS/plugin.dll
[info] Loaded plugin ./plugins/Bidoo/plugin.dll
[info] Loaded plugin ./plugins/BogaudioModules/plugin.dll
[info] Loaded plugin ./plugins/CastleRocktronics/plugin.dll
[info] Loaded plugin ./plugins/cf/plugin.dll
[info] Loaded plugin ./plugins/Csound/plugin.dll
[info] Loaded plugin ./plugins/dBiz/plugin.dll
[warning] Failed to load library ./plugins/DHE-Modules/plugin.dll: 126
[info] Loaded plugin ./plugins/DHE-modules-debug/plugin.dll
[info] Loaded plugin ./plugins/Fundamental/plugin.dll
[info] Loaded plugin ./plugins/mlove-au/plugin.dll
[info] Loaded plugin ./plugins/moDLLz_0.5.2_master/plugin.dll
[info] Loaded plugin ./plugins/moDllz_0.5.3_master/plugin.dll
[info] Loaded plugin ./plugins/morten-leerhoy/plugin.dll
[info] Loaded plugin ./plugins/mtsch-vcvrack-plugins/plugin.dll
[info] Loaded plugin ./plugins/NauModular/plugin.dll
[info] Loaded plugin ./plugins/PvC/plugin.dll
[info] Loaded plugin ./plugins/RJModules/plugin.dll
[info] Loaded plugin ./plugins/UModules/plugin.dll
[info] Loaded plugin ./plugins/vcvrack-rtlsdr/plugin.dll
[info] Loaded plugin ./plugins/vcvrackplugins_dekstop/plugin.dll
[info] Loaded plugin ./plugins/VCV_moDllz/plugin.dll
[info] Loaded plugin ./plugins/wizardishungry/plugin.dll
[New Thread 22152.0x7fb0]
[New Thread 22152.0x3fc8]
[New Thread 22152.0x7e24]
[info] Loaded font ./res/DejaVuSans.ttf
[info] Loading patch ./autosave.vcv
[info] Loaded SVG ./plugins/DHE-modules-debug/res/Upstage.svg
[info] Loaded SVG ./res/ComponentLibrary/RoundBlack.svg
[info] Loaded SVG ./res/ComponentLibrary/PJ301M.svg
[info] Loaded SVG ./res/ComponentLibrary/LEDButton.svg
[info] Loaded SVG ./res/ComponentLibrary/ScrewSilver.svg
[info] Loaded SVG ./res/ComponentLibrary/ScrewBlack.svg
[debug] >DFlipFlop(signal, 0.000000, 1.000000)
[debug] <DFlipFlop(signal, 0.000000, 1.000000)
[debug] >DFlipFlop(signal)
[debug] <DFlipFlop(signal)
[debug] >Ramp(phase_increment_supplier)
[debug] <Ramp(phase_increment_supplier)
[debug] >Ramp(0.001000, step_duration_supplier)
[debug] <Ramp(0.001000, step_duration_supplier)
[debug] >Ramp(phase_increment_supplier)
[debug] <Ramp(phase_increment_supplier)
[debug] >Ramp(ramp_duration_supplier, step_duration_supplier)
[debug] <Ramp(ramp_duration_supplier, step_duration_supplier)
[debug] >DFlipFlop(signal, 0.000000, 1.000000)
[debug] <DFlipFlop(signal, 0.000000, 1.000000)
[debug] >DFlipFlop(signal)
[debug] <DFlipFlop(signal)
[debug] >Follower(supplier)
[debug] <Follower(supplier)
[debug] >Stage()
[debug] >Latch::on_rising_edge(action)
[debug] <Latch::on_rising_edge(action)
[debug] >Latch::on_falling_edge(action)
[debug] <Latch::on_falling_edge(action)
[debug] >Latch::on_rising_edge(action)
[debug] <Latch::on_rising_edge(action)
[debug] >Ramp::on_end_of_cycle(action)
[debug] >Latch::on_falling_edge(action)
[debug] <Latch::on_falling_edge(action)
[debug] <Ramp::on_end_of_cycle(action)
[debug] <Stage()
[info] Loaded SVG ./plugins/DHE-modules-debug/res/Stage.svg
[info] Loading settings ./settings.json
[New Thread 22152.0x57f0]
[debug] >DFlipFlop(signal, 0.000000, 1.000000)
[debug] <DFlipFlop(signal, 0.000000, 1.000000)
[debug] >DFlipFlop(signal)
[debug] <DFlipFlop(signal)
[debug] >Ramp(phase_increment_supplier)
[debug] <Ramp(phase_increment_supplier)
[debug] >Ramp(0.001000, step_duration_supplier)
[debug] <Ramp(0.001000, step_duration_supplier)
[debug] >Ramp(phase_increment_supplier)
[debug] <Ramp(phase_increment_supplier)
[debug] >Ramp(ramp_duration_supplier, step_duration_supplier)
[debug] <Ramp(ramp_duration_supplier, step_duration_supplier)
[debug] >DFlipFlop(signal, 0.000000, 1.000000)
[debug] <DFlipFlop(signal, 0.000000, 1.000000)
[debug] >DFlipFlop(signal)
[debug] <DFlipFlop(signal)
[debug] >Follower(supplier)
[debug] <Follower(supplier)
[debug] >Stage()
[debug] >Latch::on_rising_edge(action)
[debug] <Latch::on_rising_edge(action)
[debug] >Latch::on_falling_edge(action)
[debug] <Latch::on_falling_edge(action)
[debug] >Latch::on_rising_edge(action)
[debug] <Latch::on_rising_edge(action)
[debug] >Ramp::on_end_of_cycle(action)
[debug] >Latch::on_falling_edge(action)
[debug] <Latch::on_falling_edge(action)
[debug] <Ramp::on_end_of_cycle(action)
[debug] <Stage()
[info] Loaded SVG ./plugins/DHE-modules-debug/res/Stage.svg
[info] Saving patch ./autosave.vcv
[info] Saving settings ./settings.json
[Thread 22152.0x57f0 exited with code 0]
[info] Saving settings ./settings.json
[info] Saving patch ./autosave.vcv
[Thread 22152.0x7e24 exited with code 0]
[Thread 22152.0x3fc8 exited with code 0]
[Thread 22152.0x7fb0 exited with code 0]
[Inferior 1 (process 22152) exited normally]
(gdb) quit

danielez@sfmi-nb-tec113 MINGW64 /vcvrack/Rack-0.5.0


RACK SCREENSHOT

dhe-modules-rack-screenshot


BETA.4 WIN64 DISTRIBUTABLES

DHE-Modules-0.5.0-beta.4-win.zip

@dhemery
Copy link
Owner Author

dhemery commented Feb 1, 2018

@dizzisound Thank you!

In a few hours (after coffee) I will make a tag for the beta, to ensure that all of the release files come from the same source code. And without debug code in it 😄

When the time comes, you can simply make dist, without specifying the version on the command line.

@dhemery
Copy link
Owner Author

dhemery commented Feb 1, 2018

I've added a v0.5.0-beta.4 tag.

I'm now seeking volunteers to build on Windows and Linux. A simple make dist (with the v0.5.0-beta.4 tag checked out) should do the trick. The Makefile specifies the version, so you don't need to specify a version on the command line.

If you can add both an Upstage module and a Stage module, and (optional but very helpful) if they both appear to behave properly, please attach your zip file here.

@phdsg
Copy link

phdsg commented Feb 1, 2018

DHE-Modules-0.5.0-beta.4-win.zip
not really "tested" but it's running. both modules. nice work.

edit: did some chaining (by instinct, not really read the manual yet) and yes, it does fancy envelopes :)
really nice! cv over the knobs would be nice too...

@dhemery
Copy link
Owner Author

dhemery commented Feb 1, 2018

@phdsg My next module, Booster Stage, will have CV on the level, duration, and shape knobs. I decided to keep Stage simple so that it could remain very slim (only 4HP). Time will tell whether that was a good decision.

@ghost
Copy link

ghost commented Feb 1, 2018

@dhemery ... Sorry wasnt on github last day..

just tested the windows version from above compiled by @phdsg ... working fine.. doesnt crash anymore.

@dhemery
Copy link
Owner Author

dhemery commented Feb 1, 2018

@Phal-anx I'm not paying you enough to be available on short notice ;-)

I greatly appreciated your help over the past few days.

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

No branches or pull requests

3 participants