ArtGateOne / dot2apcmini

nodejs code to control dot2 software use Akai APC mini controller
10 stars 5 forks source link

Program crashing #2

Closed Nat-intosh closed 1 year ago

Nat-intosh commented 1 year ago

I'm on windows 11 with the nodejs version that you asked, and after a long time or when i touch to many faders at the same time, it happens that suddenly the program just crash, like there is nothing in the CMD Window, a ctrlC to force stop the task don't work, and if i relaunch the js it can't detect my apc mini, i have to reboot to get it to work again Force closing nodejs via taskmanager don't work either

Do you know something to do to be able to force close the thing to restart it or just relaunch it without rebooting the wole pc ? Thank's

Nat-intosh commented 1 year ago

When i try to relaunch it after the crash : image

ArtGateOne commented 1 year ago

In the previous version of the apc mini controller - there was such a problem, the faders were sending so many messages - that everything could hang and as you write - it was not possible to close nodejs and only a reset helped. I tried to work around this quality and limit the flow of midi messages to a minimum and it can be said that they work stably. The version for mk2 is a copy - with corrections for changed button codes and of course colors. But why it hangs with this new controller - I have no idea - it's also strange that the controller is not visible.

ArtGateOne commented 1 year ago

Unfortunately, I have no idea where the problem could be - because as you write - there is no error message in nodejs. Let's hope it's not a problem with the drivers in win11 or a problem with the power supply of the controller itself. If you have the opportunity - test on win 10, or possibly set the brightness to the lowest

ArtGateOne commented 1 year ago

most midi messages are sent in color palette mode (def page 5) - did it happen in this view?

You can also try to reduce the frequency of requests to dot2 for feedback - in line 372

setInterval(interval, 100);

change 100 to a larger value, e.g. 200

Nat-intosh commented 1 year ago

THank's for your fast reponse ! Yes, i'm most of the time in the color palette but i remember it happened outside of this view. I tried to turned down the luminosity, but it didn't work, so i will try to reduce the frequency like you said I hope this issue is not due to the hardware, or windows 11, i will try on a win10 machine this weekend

Also, when the issue happened the lights keep flashing on the color palette view, and i can't shutdown my laptop without forcing it :/

ArtGateOne commented 1 year ago

I guess that was the problem that a very large amount of midi notes was sent to the controller - in the color view. We managed to reduce the amount of uploading these notes - so now this situation should not happen so often. The corrected version is now available.

ArtGateOne commented 1 year ago

Also I hope this problem is not caused by hardware or Windows 11 - I sold my old apc mini and bought two new ones to work on - so it would be a disaster!

Sometimes he works on two computers in one session - so in the event of such a failure - I can safely reset the computer - and continue working on the second one - which automatically takes over the role of master.

Nat-intosh commented 1 year ago

I don't have the budget to have a second one but yes, it would definitively be a disaster ! Thank's for the update, i will try it now :) (for your information with a interval value of 200 and the brightness to the minimum with the old code i got the same crash 2minutes ago)

ArtGateOne commented 1 year ago

In the earlier version - in color mode - every time feedback from dot2 was received - all midi to apc messages were sent - now they are sent once - and then only the changes - so it should be stable

Nat-intosh commented 1 year ago

Oh yes, I understand. I've been using it for like 2 hours, and it's so much better now, thank you very much for this edit and for your work, it's awesome to use the APC with Dot2 , I close the issue :)

ArtGateOne commented 1 year ago

That's what I use at work too, so I'm glad it worked. Try not to go crazy with sliders :D