freezy / dmd-extensions

A toolbox for virtual pinball dot matrix displays.
GNU General Public License v2.0
129 stars 55 forks source link

Access to COM3 is denied? #455

Closed dig65 closed 6 months ago

dig65 commented 10 months ago

Trying to get my cabinet going again, haven't updated things in a while. Maybe I have a software mismatch somewhere causing this? I see in previous issues this has required a special build of the .exe to fix.

My PINDMDv3 is on COM3.

Anyway, here's what's happening. Any hints?:

dmdext test -d auto [1] 2023/12/30 18:48:08.701 INFO | Launching console tool v2.2.1 [1] 2023/12/30 18:48:09.888 INFO | PinDMDv1 device not found. [1] 2023/12/30 18:48:09.888 WARN | Device PinDMDv1 is not available. [1] 2023/12/30 18:48:09.918 INFO | PinDMDv2 device not found. [1] 2023/12/30 18:48:09.918 WARN | Device PinDMDv2 is not available. [1] 2023/12/30 18:48:09.927 INFO | Checking port COM3 for PinDMDv3... [1] 2023/12/30 18:48:10.051 INFO | Found PinDMDv3 device on COM3. [1] 2023/12/30 18:48:10.051 DEBUG | Firmware: REV-vPin-01014R [1] 2023/12/30 18:48:10.051 DEBUG | Resolution: 128x32 [1] 2023/12/30 18:48:10.051 DEBUG | Revision: 1014 [1] 2023/12/30 18:48:10.051 INFO | Colored 4-bit frames for PinDMDv3 enabled. [1] 2023/12/30 18:48:10.168 INFO | Added PinDMDv3 renderer. [5] 2023/12/30 18:48:10.172 INFO | Starting ZeDMD frame thread. [1] 2023/12/30 18:48:10.172 INFO | ZeDMD device not found [1] 2023/12/30 18:48:10.172 WARN | Device LibDmd.Output.ZeDMD.ZeDMD is not available. [1] 2023/12/30 18:48:10.172 WARN | Device PIN2DMD is not available. [1] 2023/12/30 18:48:10.194 WARN | Device PIN2DMDXL is not available. [1] 2023/12/30 18:48:10.194 WARN | Device PIN2DMDHD is not available. [1] 2023/12/30 18:48:10.206 INFO | Checking port COM3 for Pixelcade... [1] 2023/12/30 18:48:10.307 ERROR | Error: Access to the port 'COM3' is denied. [1] 2023/12/30 18:48:10.307 INFO | Pixelcade device not found. [1] 2023/12/30 18:48:10.307 WARN | Device Pixelcade is not available. [1] 2023/12/30 18:48:10.471 INFO | Added virtual DMD renderer. [1] 2023/12/30 18:48:10.507 INFO | Setting up Render Graph for 2 destination(s) [ PinDMD v3, Virtual DMD ] [1] 2023/12/30 18:48:10.518 INFO | -> Connecting Image Source to PinDMD v3 (Bitmap -> Rgb24) [1] 2023/12/30 18:48:10.547 INFO | -> Connecting Image Source to Virtual DMD (Bitmap -> Bitmap) [1] 2023/12/30 18:48:10.547 INFO | Press CTRL+C to close. [16] 2023/12/30 18:48:10.547 ERROR | The calling thread cannot access this object because a different thread owns it. [16] 2023/12/30 18:48:10.547 ERROR | System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it. at System.Windows.Threading.Dispatcher.VerifyAccess() at System.Windows.Media.Imaging.BitmapSource.get_PixelWidth() at LibDmd.Common.ImageUtil.ConvertToRgb24(BitmapSource bmp, Int32 offset, Double lum) at LibDmd.Frame.BmpFrame.ConvertToRgb24() at LibDmd.RenderGraph.<>cDisplayClass62_0.b_14(BmpFrame frame) at System.Reactive.Linq.ObservableImpl.Select`2..OnNext(TSource value) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Reactive.Stubs.<.cctor>b1(Exception ex) at System.Reactive.AnonymousSafeObserver1.OnError(Exception error) at System.Reactive.Linq.ObservableImpl.Select2..OnNext(TSource value) at System.Reactive.Linq.ObservableImpl.Select`2..OnNext(TSource value) at System.Reactive.ScheduledObserver`1.Dispatch(ICancelable cancel) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

Unhandled Exception: System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it. at System.Windows.Threading.Dispatcher.VerifyAccess() at System.Windows.Media.Imaging.BitmapSource.get_PixelWidth() at LibDmd.Common.ImageUtil.ConvertToRgb24(BitmapSource bmp, Int32 offset, Double lum) at LibDmd.Frame.BmpFrame.ConvertToRgb24() at LibDmd.RenderGraph.<>cDisplayClass62_0.b_14(BmpFrame frame) at System.Reactive.Linq.ObservableImpl.Select`2..OnNext(TSource value) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Reactive.Stubs.<.cctor>b1(Exception ex) at System.Reactive.AnonymousSafeObserver1.OnError(Exception error) at System.Reactive.Linq.ObservableImpl.Select2..OnNext(TSource value) at System.Reactive.Linq.ObservableImpl.Select`2..OnNext(TSource value) at System.Reactive.ScheduledObserver`1.Dispatch(ICancelable cancel) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() [1] 2023/12/30 18:48:11.317 INFO | Creating FBOs for 128x32

freezy commented 6 months ago

Should be fixed. Here's a build to test.