My extension randomly calls ControllerExtension.exit () at runtime.
The extension connects to two USB interfaces of the controller, one of them is the bulk interface of the controller screen and the other is the HID interface of the controller. To connect to the bulk interface, I use the built-in functions of the Bitwig API, and to connect to the HID, I use purejavahiapi 0.16. All this works in the DrivenByMoss framework.
I managed to find out that the ControllerExtension.exit () call occurs when I disconnect any of the other USB devices connected to the computer on Windows 10.
Debugging the Java machine does nothing, since judging by the debug stack, the call exit () comes directly from the internal functions of Bitwig.
What are the ways to solve this problem? Obviously, the problem is in the USB connection, and apparently in the connection to the screens, since when I disabled the HID purejavahiapi initialization inside the extension, the problem still remained.
Controller extension arbitrarily calls ControllerExtension.exit ()
- KVRAF
- 4888 posts since 13 May, 2004
This is expected behaviour. If one of the selected MIDI in-/outputs or USB ports becomes unavailable Bitwig shuts down the extension.
-
- KVRer
- Topic Starter
- 6 posts since 16 Jun, 2020
Hi Moss! Thanks for the answer.moss wrote: Thu Dec 23, 2021 10:56 am This is expected behaviour. If one of the selected MIDI in-/outputs or USB ports becomes unavailable Bitwig shuts down the extension.
I ran tests again today with unplugging USB devices and the problem was not reproducible. Yesterday, when other devices were disconnected, exit () was called 100% of the time. This is most likely a WinUSB driver problem and occurs when an extension session ends with an exception and WinUSB USB does not terminate correctly. During normal operation of the extension, the problem has not been reproduced yet.
Moss, are you familiar with the Rebellion project?
https://github.com/terminar/rebellion
Hopefully I will soon forget about WinUSB) Rebellion will allow you to work with NI devices without changing the driver. Alpha 2 can already make NIHA think it is part of NI and work with screens.
- KVRAF
- 4888 posts since 13 May, 2004
Thanks for the pointer.k0k0c wrote: Thu Dec 23, 2021 12:30 pm Moss, are you familiar with the Rebellion project?
https://github.com/terminar/rebellion
Hopefully I will soon forget about WinUSB) Rebellion will allow you to work with NI devices without changing the driver. Alpha 2 can already make NIHA think it is part of NI and work with screens.
