Fatal signal 11-22

Good evening / good morning. I made my first module, a multiple 3in> 1out and 1in> 3out (to gain experience I copied the code of sections A and C of the Audible Instruments module, I take this opportunity to ask: is it publishable? Or should I rewrite my own code ? I don’t understand anything about licensing)

Initially I came up with a lot of errors, but thanks to MinGWx64 I understood where and why I went wrong. I fixed everything and I managed to “make install” without errors, in the path Documents/Rack2/plugins there is my folder with my plugin, but I still can’t see it in the browser on VCV Rack. I think the plugin.cpp and plugin.hpp files are compiled correctly. I cannot understand what is missing.

Edit: Ok, log.txt says there is an error in plugin.json

5:30 ‘}’ expected near ‘GPL’

I have tried them all but I can’t solve.

Edit 2: I can see the plugin but VCV Rack crashes in 3 seconds. If I delete my plugin it doesn’t crash anymore :face_with_symbols_over_mouth:

That looks like there’s a missing quote, comma or brace in the plugin.json.

Evolution has been pretty confusing. Log.txt said a parenthesis was missing next to the license, I tried to put that parenthesis everywhere but without success. Then the error became “version 1.0.0”, I wrote “version 2.0.0”, without adding the parenthesis it said before, and the plugin appeared in the browser, but Rack crashes every time I open the browser. I tried to open old patches and it works perfectly, as soon as I do a right click it crashes. I double checked log.txt and it says something like this: fatal adapters standalone.cpp 49 FatalSignalHandler fatal signal 22 stack trace …

The line for version in the plugin json should look like this:

"version": "2.0.0",

The module browser crashing where the patch doesn’t can be caused by accessing the module pointer in the widget without first checking for null. The browser doesn’t instantiate a module, only the widget.

I do not understand…

(the version is correct)

In the meantime it has become “fatal signal 11” … I don’t understand anything anymore, every ten minutes the error changes hahaha

You mentioned issues with the json around the version value, I was pointing out the correct format.

The second part was about the right click crashing rack where loading a patch doesn’t.

Patch loading works!

On Rack I have an empty template, if I open Rack it stays open.

If I open the saved patches (so without my modules because I just created the first one) the patches open and everything works, I can play, move the cables, turn the knobs, everything is fine.

For example, if I want to add a VCO and then press the right button, Rack crashes.

But this only does it with my plugin installed, if I delete it it works fine.

OK, that makes sense.

Are you accessing the module from anywhere within the module widget? i.e. module->someVariable)

Sorry, I find it hard to understand, could you explain otherwise please? Consider that the development of modules for me is an experiment, I have never developed anything in my life, not even “Hello world”

1 Like

Can you post your code?

1 Like
#include "plugin.hpp"


struct Nsiem : Module {
	enum ParamId {
		PARAMS_LEN
	};
	enum InputId {
		INA_INPUT,
		INB_INPUT,
		IN2B_INPUT,
		IN3B_INPUT,
		INPUTS_LEN
	};
	enum OutputId {
		OUTA_OUTPUT,
		OUT2A_OUTPUT,
		OUT3A_OUTPUT,
		OUTB_OUTPUT,
		OUTPUTS_LEN
	};
	enum LightId {
		LIGHTS_LEN
	};

	Nsiem() {
		config(PARAMS_LEN, INPUTS_LEN, OUTPUTS_LEN, LIGHTS_LEN);
		configInput(INA_INPUT, "Input A");
		configInput(INB_INPUT, "Input B");
		configInput(IN2B_INPUT, "Input B2");
		configInput(IN3B_INPUT, "Input B3");
		configOutput(OUTA_OUTPUT, "Output A");
		configOutput(OUT2A_OUTPUT, "Output A2");
		configOutput(OUT3A_OUTPUT, "Output A3");
		configOutput(OUTB_OUTPUT, "Output B");
	}

	void process(const ProcessArgs& args) override {
        // Section A
        {
            int channels = std::max(inputs[INA_INPUT].getChannels(), 1);
            float in[16];
            for (int c = 0; c < channels; c++) {
                in[c] = inputs[INA_INPUT].getVoltage(c);
                outputs[OUTA_OUTPUT].setVoltage(in[c], c);
                outputs[OUT2A_OUTPUT].setVoltage(in[c], c);
                outputs[OUT3A_OUTPUT].setVoltage(in[c], c);
                }
            outputs[OUTA_OUTPUT].setChannels(channels);
            outputs[OUT2A_OUTPUT].setChannels(channels);
            outputs[OUT3A_OUTPUT].setChannels(channels);
                }
        //Section B
        {
            int channels = std::max(std::max(std::max(inputs[INB_INPUT].getChannels(), inputs[IN2B_INPUT].getChannels()), inputs[IN3B_INPUT].getChannels()), 1);
            float in[16];
            for (int c = 0; c < channels; c++) {
                in[c] = inputs[INB_INPUT].getPolyVoltage(c) + inputs[IN2B_INPUT].getPolyVoltage(c) + inputs[IN3B_INPUT].getPolyVoltage(c);
                outputs[OUTB_OUTPUT].setVoltage(in[c], c);
                }
            outputs[OUTB_OUTPUT].setChannels(channels);
            }
    }
};


struct NsiemWidget : ModuleWidget {
	NsiemWidget(Nsiem* module) {
		setModule(module);
		setPanel(createPanel(asset::plugin(pluginInstance, "res/Nsiem.svg")));

		addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
		addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
		addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
		addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

		addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 29.866)), module, Nsiem::INA_INPUT));
		addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.603, 78.493)), module, Nsiem::INB_INPUT));
		addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 88.58)), module, Nsiem::IN2B_INPUT));
		addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 98.667)), module, Nsiem::IN3B_INPUT));

		addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 44.025)), module, Nsiem::OUTA_OUTPUT));
		addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.637, 54.113)), module, Nsiem::OUT2A_OUTPUT));
		addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.637, 64.2)), module, Nsiem::OUT3A_OUTPUT));
		addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 113.367)), module, Nsiem::OUTB_OUTPUT));
	}
};


Model* modelNsiem = createModel<Nsiem, NsiemWidget>("Nsiem");

I think you may need to set the number of channels for the outputs before you set the voltages.

Also you are trying to get voltages for channels that may not exist on all of the inputs in section B. You are getting the max number of channels across the 3 inputs but that doesn’t mean all inputs will have values for those channels. For example, if INB_INPUT has 3 channels and IN2B_INPUT has only one or none, you will be trying to read the voltage for channels that don’t exist on IN2B_INPUT. I’m not sure if the SDK has safeguards against this.

1 Like

Mmmh, ok, I’ll study and experiment again. Thank you for giving me a direction to follow. I thought it was all correct since the Audible multiple has the same inputs and outputs and the two modules should have the same operation.

OK, looking at the Audible code, it looks like the SDK will handle the mismatch in poly channels OK then.

Only other thing I can see different is the use of createPanel and how the screws are added.

And could this be the cause of the crashes? Looking for log.txt errors both on the forum and around the internet, they do not seem to be related to the code, also because until now MinGW has always returned all code errors to me, denying me the installation of the plugin. But I’m sure I’m the one who understands the least here.

I can’t say for sure as you are looking at a runtime error rather than a compile time error.

Try commenting out the screw code and using the same panel setting method as the Audible module just to eliminate them.

Some further questions: Are you running the 64 bit Mingw? Are you using the correct version of the SDK for the rack version you are running?

I just tried using Svg::load, and I removed the screws part, it shouldn’t be a problem since they are just graphic elements, it should load the panel without the screws.

Nothing changes, Rack crashes.

Yes, MinGW x64 and latest SDK.

Hmm. I’m out of ideas. Maybe post the full log.txt produced by the crash and someone else might be able to see something I’m not seeing.

Now there are both errors, 11 and 22.

[0.004 info adapters/standalone.cpp:127 main] VCV Rack Pro v2.0.6
[0.004 info adapters/standalone.cpp:128 main] Standalone
[0.004 info adapters/standalone.cpp:129 main] Windows 10.0
[0.004 info adapters/standalone.cpp:135 main] Args: C:\Program Files\VCV\Rack2Pro\Rack.exe 
[0.004 info adapters/standalone.cpp:138 main] System directory: C:\Program Files\VCV\Rack2Pro
[0.004 info adapters/standalone.cpp:139 main] User directory: C:/Users/Menni/Documents/Rack2
[0.006 info adapters/standalone.cpp:143 main] System time: 2022-01-29 13:12:43 ora solare Europa occidentale
[0.007 info src/settings.cpp:455 load] Loading settings C:/Users/Menni/Documents/Rack2/settings.json
[0.018 info adapters/standalone.cpp:166 main] Initializing network
[0.030 info adapters/standalone.cpp:169 main] Initializing audio
[0.030 info src/rtaudio.cpp:244 RtAudioDriver] Creating RtAudio WASAPI driver
[0.034 info src/network.cpp:201 requestDownload] Requesting download https://api.vcvrack.com/licenses/Rack2Pro.vcvkey?version=2&machineId=03E361FA6C
[0.078 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio WASAPI device 0: CABLE Input (VB-Audio Virtual Cable) (0 in, 2 out)
[0.088 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio WASAPI device 1: Cassa/Cuffie (Realtek High Definition Audio) (0 in, 2 out)
[0.097 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio WASAPI device 2: Missaggio stereo (Realtek High Definition Audio) (2 in, 0 out)
[0.106 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio WASAPI device 3: CABLE Output (VB-Audio Virtual Cable) (2 in, 0 out)
[0.106 info src/rtaudio.cpp:244 RtAudioDriver] Creating RtAudio ASIO driver
[0.363 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio ASIO device 0: ASIO4ALL v2 (2 in, 2 out)
[0.363 info src/rtaudio.cpp:244 RtAudioDriver] Creating RtAudio DirectSound driver
[0.522 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio DirectSound device 0: Default Device (2 in, 2 out)
[0.537 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio DirectSound device 1: Cassa/Cuffie (Realtek High Definition Audio) (0 in, 2 out)
[0.552 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio DirectSound device 2: CABLE Input (VB-Audio Virtual Cable) (0 in, 2 out)
[0.553 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio DirectSound device 3: CABLE Output (VB-Audio Virtual Cable) (2 in, 0 out)
[0.554 info src/rtaudio.cpp:259 RtAudioDriver] Found RtAudio DirectSound device 4: Missaggio stereo (Realtek High Definition Audio) (2 in, 0 out)
[0.554 info adapters/standalone.cpp:172 main] Initializing MIDI
[0.555 info adapters/standalone.cpp:177 main] Initializing plugins
[0.555 info src/plugin.cpp:152 loadPlugin] Loading Core plugin
[0.556 info src/plugin.cpp:212 loadPlugin] Loaded Core v2.0.6

(all plugins loaded correctly)

[0.716 info src/plugin.cpp:154 loadPlugin] Loading plugin from C:/Users/Menni/Documents/Rack2/plugins/DR4
[0.719 info src/plugin.cpp:212 loadPlugin] Loaded DR4 v2.0.0

[1.235 info adapters/standalone.cpp:179 main] Initializing browser
[1.277 info adapters/standalone.cpp:181 main] Initializing library
[1.301 info adapters/standalone.cpp:185 main] Initializing UI
[1.301 info adapters/standalone.cpp:187 main] Initializing window
[1.336 info adapters/standalone.cpp:193 main] Creating engine
[1.336 info adapters/standalone.cpp:195 main] Creating history state
[1.336 info adapters/standalone.cpp:197 main] Creating event state
[1.336 info adapters/standalone.cpp:199 main] Creating scene
[1.341 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/Rail.svg
[1.351 info adapters/standalone.cpp:202 main] Creating patch manager
[1.352 info adapters/standalone.cpp:205 main] Creating window
[1.605 info src/window/Window.cpp:352 Window] Window content scale: 1.000000
[1.674 info src/window/Window.cpp:413 Window] Renderer: Intel Intel(R) HD Graphics
[1.675 info src/window/Window.cpp:414 Window] OpenGL: 4.3.0 - Build 10.18.15.4248
[1.740 info src/window/Window.cpp:50 loadFile] Loaded font C:/Program Files/VCV/Rack2Pro/res/fonts/DejaVuSans.ttf
[3.339 info adapters/standalone.cpp:240 main] Running window
[4.701 info src/app/Browser.cpp:195 createPreview] Creating module widget DR4 Nsiem
[4.710 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/Menni/Documents/Rack2/plugins/DR4/res/Nsiem.svg
[4.711 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Program Files/VCV/Rack2Pro/res/ComponentLibrary/PJ301M.svg
[5.288 info src/network.cpp:147 requestJson] Requesting JSON GET https://api.vcvrack.com/version?edition=Pro
[5.786 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
45:  0x0
44:  0x0
43: _C_specific_handler 0x7ffb75837bc0
42: _chkstk 0x7ffb7833f6c0
41: RtlWalkFrameChain 0x7ffb782ac460
40: KiUserExceptionDispatcher 0x7ffb7833e6e0
39: RegisterProcTableCallback 0x7ffb24a184c0
38: RegisterProcTableCallback 0x7ffb24a184c0
37: RegisterProcTableCallback 0x7ffb24a184c0
36: RegisterProcTableCallback 0x7ffb24a184c0
35: ZN4rack10contextSetEPNS_7ContextE 0x7ffb30943610
34: nvgEndFrame 0x7ffb30914c10
33: ZN4rack6widget17FramebufferWidget15drawFramebufferEv 0x7ffb309c4640
32: ZN4rack6widget17FramebufferWidget6renderENS_4math3VecES3_NS2_4RectE 0x7ffb309c4c30
31: ZN4rack6widget17FramebufferWidget4drawERKNS0_6Widget8DrawArgsE 0x7ffb309c5450
30: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
29: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
28: ZN4rack6widget10ZoomWidget4drawERKNS0_6Widget8DrawArgsE 0x7ffb309c72e0
27: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
26: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
25: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
24: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
23: ZN4rack3app7browser8ModelBox4drawERKNS_6widget6Widget8DrawArgsE 0x7ffb30e1cfb0
22: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
21: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
20: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
19: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
18: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
17: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
16: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
15: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
14: ZN4rack2ui12ScrollWidget4drawERKNS_6widget6Widget8DrawArgsE 0x7ffb309bf2a0
13: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
12: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
11: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
10: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
9: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
8: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
7: ZN4rack6window6Window4stepEv 0x7ffb309c9560
6: ZN4rack6window6Window3runEv 0x7ffb309c9f20
5: ZN4rack6window6Window3runEv 0x7ffb309c9f20
4: ZN4rack6window6Window3runEv 0x7ffb309c9f20
3: ZN4rack6window6Window3runEv 0x7ffb309c9f20
2: ZN4rack6window6Window3runEv 0x7ffb309c9f20
1: BaseThreadInitThunk 0x7ffb781c4020
0: RtlUserThreadStart 0x7ffb78313670

[5.800 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 22. Stack trace:
62:  0x0
61: raise 0x7ffb7583a7e0
60: abort 0x7ffb7583edd0
59: ZN9__gnu_cxx27__verbose_terminate_handlerEv 0x7ffb33e2f4c0
58: ZN10__cxxabiv111__terminateEPFvvE 0x7ffb33e25cd0
57: ZSt9terminatev 0x7ffb33f178d0
56: stbi_write_png 0x7ffb30951c60
55: gai_strerrorW 0x7ffb30ded7c0
54: gai_strerrorW 0x7ffb30ded7c0
53: gai_strerrorW 0x7ffb30ded7c0
52: RtlActivateActivationContextUnsafeFast 0x7ffb782db460
51: LdrShutdownProcess 0x7ffb782e7e60
50: RtlExitUserProcess 0x7ffb782e7d70
49: FatalExit 0x7ffb781cca70
48: exit 0x7ffb75849c70
47: initterm_e 0x7ffb7584a110
46: raise 0x7ffb7583a7e0
45: raise 0x7ffb7583a7e0
44: raise 0x7ffb7583a7e0
43: _C_specific_handler 0x7ffb75837bc0
42: _chkstk 0x7ffb7833f6c0
41: RtlWalkFrameChain 0x7ffb782ac460
40: KiUserExceptionDispatcher 0x7ffb7833e6e0
39: RegisterProcTableCallback 0x7ffb24a184c0
38: RegisterProcTableCallback 0x7ffb24a184c0
37: RegisterProcTableCallback 0x7ffb24a184c0
36: RegisterProcTableCallback 0x7ffb24a184c0
35: ZN4rack10contextSetEPNS_7ContextE 0x7ffb30943610
34: nvgEndFrame 0x7ffb30914c10
33: ZN4rack6widget17FramebufferWidget15drawFramebufferEv 0x7ffb309c4640
32: ZN4rack6widget17FramebufferWidget6renderENS_4math3VecES3_NS2_4RectE 0x7ffb309c4c30
31: ZN4rack6widget17FramebufferWidget4drawERKNS0_6Widget8DrawArgsE 0x7ffb309c5450
30: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
29: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
28: ZN4rack6widget10ZoomWidget4drawERKNS0_6Widget8DrawArgsE 0x7ffb309c72e0
27: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
26: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
25: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
24: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
23: ZN4rack3app7browser8ModelBox4drawERKNS_6widget6Widget8DrawArgsE 0x7ffb30e1cfb0
22: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
21: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
20: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
19: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
18: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
17: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
16: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
15: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
14: ZN4rack2ui12ScrollWidget4drawERKNS_6widget6Widget8DrawArgsE 0x7ffb309bf2a0
13: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
12: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
11: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
10: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
9: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffb309c6e70
8: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffb309c6ff0
7: ZN4rack6window6Window4stepEv 0x7ffb309c9560
6: ZN4rack6window6Window3runEv 0x7ffb309c9f20
5: ZN4rack6window6Window3runEv 0x7ffb309c9f20
4: ZN4rack6window6Window3runEv 0x7ffb309c9f20
3: ZN4rack6window6Window3runEv 0x7ffb309c9f20
2: ZN4rack6window6Window3runEv 0x7ffb309c9f20
1: BaseThreadInitThunk 0x7ffb781c4020
0: RtlUserThreadStart 0x7ffb78313670


Does the slug for your module in the plugin.json match the one specified in the module code? Have you added the model in your plugin.cpp?