OpenMacroBoard / StreamDeckSharp

A simple .NET wrapper for Stream Deck
MIT License
351 stars 47 forks source link

Streamdeck Rev.2 and XL some times have Displayissues #23

Closed patrick-dmxc closed 4 years ago

patrick-dmxc commented 4 years ago

When you send many Frames in a short time. the Images are disturted/corrupted.

There is a Video in our Bugtracker: https://bugs.dmxcontrol-projects.org/index.php?do=details&task_id=3957

And a conversation in our Forum: https://forum.dmxcontrol-projects.org/index.php?thread/14869-stream-deck-setting-up-and-using-with-input-assignment/&postID=126789#post126789

wischi-chr commented 4 years ago

Can you provide a simple repo to reproduce this issue? I have a streamdeck xl and don't see any issues.

wischi-chr commented 4 years ago

Could you try to run the image glitch example code: https://github.com/OpenMacroBoard/OpenMacroBoard.ExampleCollection/tree/master/src/OpenMacroBoard.Examples.ImageGlitchTest

Both settings (synchronous and fast) don't produce any artifacts for me on my StreamDeck XL Anmerkung 2020-03-11 224249

If you want to try synchronous mode in your application (disables fast asynchronous writes to the device) you can set IStreamDeckRefHandle.UseWriteCache before calling .Open()

wischi-chr commented 4 years ago

Ok found it. 🎉

I downloaded DMXControl3 and could reproduce the glitches immediately.

After a few hours of puzzle solving (which I really enjoyed) I found out that it only happens when AbstractMacroBoardManager.StartAnimation is finished, but StreamDeckSharp is still writing the bitmap and inputManager.RegisterSource() is already registering all KeyButtonInputSources

The glitch happens because the serial number is read while the bitmap is still being written.

You can try it for yourself by replacing the GetSerialNumber() call inside IMacroBoardExtentions.GetSerialNumber with a hard coded string return.

It's definitely a bug in StreamDeckSharp and I will fix that in the next few days and keep you updated.

wischi-chr commented 4 years ago

@patrick-dmxc I released a new version on nuget. Could you try it and let me know if it works for you. Thanks

patrick-dmxc commented 4 years ago

oh sorry for not answering. I was busy

but that was very quick now. I will now update and add our beta testers to it. I still have Rev. 1, I can't test it.

patrick-dmxc commented 4 years ago

It works with the new Version Thanks