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

dmdext 2.2.1 error with play command #442

Open
lglinux3d opened this issue Oct 12, 2023 · 5 comments
Open

dmdext 2.2.1 error with play command #442

lglinux3d opened this issue Oct 12, 2023 · 5 comments

Comments

@lglinux3d
Copy link

lglinux3d commented Oct 12, 2023

Hello,
if i test this command :
C:\spinner>C:\spinner\VisualPinball\VPinMAME\dmdext play --f=C:\spinner\VisualPinball\VPinMAME\default.png -d zedmd on 2.2.1 x64 the command doesn't work

LOG :

`C:\spinner>C:\spinner\VisualPinball\VPinMAME\dmdext play --f=C:\spinner\VisualPinball\VPinMAME\default.png -d zedmd
[1] 2023/10/11 16:59:30.521 INFO | Launching console tool v2.2.1
[4] 2023/10/11 16:59:31.738 INFO | Starting ZeDMD frame thread.
[1] 2023/10/11 16:59:32.295 INFO | ZeDMD device found on port COM4 with a resolution of 128x32 LEDs
[1] 2023/10/11 16:59:32.295 INFO | Added ZeDMD renderer.
[1] 2023/10/11 16:59:32.307 INFO | Setting up Render Graph for 1 destination(s) [ ZeDMD ]
[1] 2023/10/11 16:59:32.307 INFO | -> Connecting Image Source to ZeDMD (Bitmap -> Rgb24)
[1] 2023/10/11 16:59:32.322 INFO | Press CTRL+C to close.

[17] 2023/10/11 16:59:32.322 ERROR | The calling thread cannot access this object because a different thread owns it.
[17] 2023/10/11 16:59:32.322 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.<>c__DisplayClass62_0.b__14(BmpFrame frame)
at System.Reactive.Linq.ObservableImpl.Select2._.OnNext(TSource value) --- End of stack trace from previous location where exception was thrown --- at System.Reactive.PlatformServices.DefaultExceptionServices.Rethrow(Exception exception) at System.Reactive.Stubs.<.cctor>b__1(Exception ex) at System.Reactive.AnonymousSafeObserver1.OnError(Exception error)
at System.Reactive.Linq.ObservableImpl.Select2._.OnNext(TSource value) at System.Reactive.Linq.ObservableImpl.Select2._.OnNext(TSource value)
at System.Reactive.ScheduledObserver1.Dispatch(ICancelable cancel) at System.Reactive.Concurrency.Scheduler.<ScheduleLongRunning>b__72(Action1 a, ICancelable c)
at System.Reactive.Concurrency.DefaultScheduler.LongRunning.<>c__DisplayClassc`1.b__b(Object arg)
at System.Reactive.Concurrency.DefaultConcurrencyAbstractionLayer.<>c__DisplayClass5.b__4()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
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()

Exception non gérée : 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.<>c__DisplayClass62_0.b__14(BmpFrame frame)
at System.Reactive.Linq.ObservableImpl.Select2._.OnNext(TSource value) --- End of stack trace from previous location where exception was thrown --- at System.Reactive.PlatformServices.DefaultExceptionServices.Rethrow(Exception exception) at System.Reactive.Stubs.<.cctor>b__1(Exception ex) at System.Reactive.AnonymousSafeObserver1.OnError(Exception error)
at System.Reactive.Linq.ObservableImpl.Select2._.OnNext(TSource value) at System.Reactive.Linq.ObservableImpl.Select2._.OnNext(TSource value)
at System.Reactive.ScheduledObserver1.Dispatch(ICancelable cancel) at System.Reactive.Concurrency.Scheduler.<ScheduleLongRunning>b__72(Action1 a, ICancelable c)
at System.Reactive.Concurrency.DefaultScheduler.LongRunning.<>c__DisplayClassc1.<ScheduleLongRunning>b__b(Object arg) at System.Reactive.Concurrency.DefaultConcurrencyAbstractionLayer.<>c__DisplayClass5.<StartThread>b__4() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 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()

if i test on 2.1.1 that's works No error. but pinup still doesn't close the Zedmd correctly and the same goes for Pin2dmd, the image remains displayed until a new table is launched, and only on Altcolor.

@gustavoalara
Copy link

Same error using a ZeDMD 256x64 panel too

@ginzu2077
Copy link

Same error, 128x32 matrix led DMD

C:\Program Files\DMD Extensions>dmdext.exe play -f "chasehq.gif" -d zedmd
[1] 2024/08/08 23:32:15.103 INFO | Launching console tool v2.2.1
[1] 2024/08/08 23:32:16.240 INFO | Reading 144 frames from chasehq.gif...
[1] 2024/08/08 23:32:16.274 INFO | GIF animation is looped.
[5] 2024/08/08 23:32:16.291 INFO | Starting ZeDMD frame thread.
[1] 2024/08/08 23:32:17.282 INFO | ZeDMD device found on port COM3 with a resolution of 128x32 LEDs
[1] 2024/08/08 23:32:17.282 INFO | Added ZeDMD renderer.
[1] 2024/08/08 23:32:17.300 INFO | Setting up Render Graph for 1 destination(s) [ ZeDMD ]
[1] 2024/08/08 23:32:17.306 INFO | -> Connecting GIF Source to ZeDMD (Bitmap -> Rgb24)
[1] 2024/08/08 23:32:17.341 INFO | Press CTRL+C to close.
[14] 2024/08/08 23:32:17.341 ERROR | The calling thread cannot access this object because a different thread owns it.
[14] 2024/08/08 23:32:17.341 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.<>c__DisplayClass62_0.b__14(BmpFrame frame)
at System.Reactive.Linq.ObservableImpl.Select2._.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>b__1(Exception ex) at System.Reactive.AnonymousSafeObserver1.OnError(Exception error)
at System.Reactive.Linq.ObservableImpl.Select2._.OnNext(TSource value) at System.Reactive.Linq.ObservableImpl.Select2._.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()

Exception non gérée : 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.<>c__DisplayClass62_0.b__14(BmpFrame frame)
at System.Reactive.Linq.ObservableImpl.Select2._.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>b__1(Exception ex) at System.Reactive.AnonymousSafeObserver1.OnError(Exception error)
at System.Reactive.Linq.ObservableImpl.Select2._.OnNext(TSource value) at System.Reactive.Linq.ObservableImpl.Select2._.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()

on the other hand, if i launch the following command, my gif appear on a virtual DMD on the main screen (not what i want) :
C:\Program Files\DMD Extensions>dmdext.exe play -f "chasehq.gif"
[1] 2024/08/08 23:37:04.399 INFO | Launching console tool v2.2.1
[1] 2024/08/08 23:37:05.527 INFO | Reading 144 frames from chasehq.gif...
[1] 2024/08/08 23:37:05.561 INFO | GIF animation is looped.
[1] 2024/08/08 23:37:05.644 INFO | Added virtual DMD renderer.
[1] 2024/08/08 23:37:05.662 INFO | Setting up Render Graph for 1 destination(s) [ Virtual DMD ]
[1] 2024/08/08 23:37:05.668 INFO | -> Connecting GIF Source to Virtual DMD (Bitmap -> Bitmap)
[1] 2024/08/08 23:37:05.705 INFO | Press CTRL+C to close.
[1] 2024/08/08 23:37:05.884 INFO | Creating FBOs for 128x32

@ojacques
Copy link

You may want to try one of the snapshot release from : https://ci.appveyor.com/project/freezy/dmd-extensions/builds/50030013

(Also issued a very new PR #493 to get snapshot builds directly in GitHub).

@gustavoalara
Copy link

Hi @ojacques

I just tested these snapshot and now the dmdext play command works correctly

Thanks a lot

@VincentMolinie
Copy link

Hi @ojacques,

Could you do a release with the fix or put a link to the installer with the fix here 👼 ?

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

5 participants