Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WS281XPlugin not working #215

Open
jamiechapmanbrn opened this issue Nov 23, 2024 · 0 comments
Open

WS281XPlugin not working #215

jamiechapmanbrn opened this issue Nov 23, 2024 · 0 comments

Comments

@jamiechapmanbrn
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant