Artemis-RGB / Artemis.Plugins

Repository containing official Artemis plugins
Other
31 stars 37 forks source link

WS281XPlugin not working #215

Open jamiechapmanbrn opened 6 days ago

jamiechapmanbrn commented 6 days ago

Adding an Arduino device with the WS281X plugin is not working. When I add a device instead of success I see the following error:

System.AggregateException: One or more errors occurred. (RGB.NET threw exception: The I/O operation has been aborted because of either a thread exit or an application request.)
 ---> Artemis.Core.ArtemisPluginException: RGB.NET threw exception: The I/O operation has been aborted because of either a thread exit or an application request.
 ---> System.IO.IOException: The I/O operation has been aborted because of either a thread exit or an application request.
   at System.IO.Ports.SerialStream.EndRead(IAsyncResult asyncResult)
   at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
   at System.IO.Ports.SerialStream.Read(Byte[] array, Int32 offset, Int32 count)
   at System.IO.Ports.SerialPort.InternalRead(Char[] buffer, Int32 offset, Int32 count, Int32 timeout, Boolean countMultiByteCharsAsOne)
   at System.IO.Ports.SerialPort.ReadTo(String value)
   at RGB.NET.Devices.WS281X.SerialPortConnection.ReadTo(Char target)
   at RGB.NET.Devices.WS281X.Arduino.ArduinoWS2812USBUpdateQueue.GetChannels()+MoveNext()
   at RGB.NET.Devices.WS281X.Arduino.ArduinoWS281XDeviceDefinition.CreateDevices(IDeviceUpdateTrigger updateTrigger)+MoveNext()
   at RGB.NET.Devices.WS281X.WS281XDeviceProvider.LoadDevices()+MoveNext()
   at RGB.NET.Core.AbstractRGBDeviceProvider.GetLoadedDevices(RGBDeviceType loadFilter)
   at RGB.NET.Core.AbstractRGBDeviceProvider.Initialize(RGBDeviceType loadFilter, Boolean throwExceptions)
   --- End of inner exception stack trace ---
   at Artemis.Core.Services.DeviceService.AddDeviceProvider(DeviceProvider deviceProvider) in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Services\DeviceService.cs:line 92
   at Artemis.Plugins.Devices.WS281X.WS281XDeviceProvider.Enable() in D:\a\Artemis\Artemis\Artemis.Plugins\src\Devices\Artemis.Plugins.Devices.WS281X\WS281XDeviceProvider.cs:line 47
   at Artemis.Core.PluginFeature.InternalEnable() in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Plugins\PluginFeature.cs:line 178
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(TimeSpan timeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
   at Artemis.Core.PluginFeature.SetEnabled(Boolean enable, Boolean isAutoEnable) in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Plugins\PluginFeature.cs:line 151
   at Artemis.Core.Services.PluginManagementService.EnablePluginFeature(PluginFeature pluginFeature, Boolean saveState, Boolean isAutoEnable) in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Services\PluginManagementService.cs:line 743
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)

It doesn't happen if I don't add it on a com port that doesn't do anything, Eg an unconnected COM1 instead of the arduino device on COM4.

If I subsequently attempt to add the device, I will see an error indicating that it cannot access COM4 (as it is probably still in use from the prior crash).

ZumFax131 commented 2 days ago

4 days ago also mine WS281X plugin stopped working.. same error