Closed hrueger closed 1 year ago
Hm, after some more playing around, it now also crashes with Segmentation Fault
in WSL2 on Windows 11. The first time I've tried it, it didn't crash. I tried to get the inputs 5 or 6 times. The next time, it crashed shortly after printing undefined
.
Now, it almost always crashes.
I was able to get the following using segfault-handler
. Hope that helps
PID 19694 received SIGSEGV for address: 0x0
/home/hannes/tests/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x370d)[0x7f40acb3370d]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f40af38c520]
/home/hannes/tests/node_modules/@julusian/midi/prebuilds/midi-linux-x64/node-napi-v7.node(_ZN13NodeMidiInput7cleanupEv+0x10)[0x7f409dc14ec0]
/home/hannes/tests/node_modules/@julusian/midi/prebuilds/midi-linux-x64/node-napi-v7.node(_ZN13NodeMidiInputD2Ev+0x30)[0x7f409dc14fa0]
/home/hannes/tests/node_modules/@julusian/midi/prebuilds/midi-linux-x64/node-napi-v7.node(_ZN4Napi10ObjectWrapI13NodeMidiInputE16FinalizeCallbackEP10napi_e>node(_ZN4node13CallbackQueueIvJPNS_11EnvironmentEEE12CallbackImplIZN15node_napi_env__13CallFinalizerILb1EEEvPFvP10napi_env__PvS9_ES9_S9_EUlS2_E0_E4CallES2_>node(_ZN4node11Environment27RunAndClearNativeImmediatesEb+0x1bc)[0xa8ac3c]
node[0xa8b1fc]
node[0x154ca06]
node[0x155f134]
node(uv_run+0x138)[0x154d358]
node(_ZN4node13SpinEventLoopEPNS_11EnvironmentE+0x145)[0xa43975]
node(_ZN4node16NodeMainInstance3RunEv+0x186)[0xb487e6]
node(_ZN4node5StartEiPPc+0x9c)[0xacd2ac]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f40af373d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f40af373e40]
node[0xa4080c]
Unfortunately, Sentry is somehow not able to catch that, so I can't get those nicely formatted crash reports.
This should be fixed now in v3.0.0
Can confirm that the bug is resolved now, thanks a ton!
Hi @Julusian, it's me again. I've just ran into a very strange issue: On my Windows 10 PC with Ubuntu in WSL2, I get a
Segmentation Fault
every time I try to list the Inputs.It's very easy to reproduce:
I'd like this to just return nothing or fail, so that I can catch the error. However, I get the following:
Segmentation Fault
happens about 1s after thetry ... catch
call.It's fine for me that MIDI is not working inside WSL (that's probably an issue of my setup, I haven't really looked into this yet, but it shouldn't crash so hard.
This happens with Ubuntu on WSL2 on Windows 10:
Interestingly, on my Windows 11 machine, it works just fine (meaning
getInputs()
throws an error but does not crash withSegmentation Fault
.Do you have any idea?