LCD-Smartie / LCDSmartie

The New Official LCD Smartie Repository (LCD Smartie Lazarus port)
GNU General Public License v2.0
33 stars 5 forks source link

LCD loses connection when unminimizing Firefox? #19

Closed elektroencefalografista closed 10 months ago

elektroencefalografista commented 10 months ago

I'm encountering the most mind bending issue with Firefox.

When I unminimize the program from taskbar, LCDSmartie loses communication with the LCD (using matrix.dll plugin running on COM port). LCDSmartie doesn't hang or crash, I can still interact with it, it just doesn't update the display. I'm not sure if that helps, but when connection drops my 4x20 LCD displays the 8 custom characters on line 3, then it stays like this until I close and restart LCDSmartie.

It doesn't happen when I start Firefox initially, it doesn't happen when I focus on it after it's covered by other windows, just when it's unminimized from taskbar.

It doesn't seem to happen with any other program. I tested both my desktop (AMD CPU + AMD GPU) and laptop (Intel CPU + iGPU), x86 and x64 versions of LCDSmartie, as well as Windows 10 and a fresh install of Windows 11, I was able to reproduce the bug in all these cases.

It doesn't happen on the original LCDSmartie, just the Lazarus port, including the earliest version in this repo.

While writing this issue I thought to check the ESR version of Firefox (115 at the moment) and that seems to work fine, so it must be something Firefox did since then that somehow triggers the bug. For now I just switched to ESR as a workaround.

Let me know how I can help troubleshoot this issue further.

EDIT: I just thought to launch LCDSmarie with admin privileged and the bug doesn't seem to trigger.

stokie-ant commented 10 months ago

I think I might have located and fixed the issue but can you just confirm a behaviour for me? Check your shutdown message in settings -> startup/shutdown. Is this what is displayed on screen when the bug is triggered?

elektroencefalografista commented 10 months ago

Thank you for looking into it so quickly.

I only have text with in my shutdown message but it still blurps out some custom characters, and yes it's the same sequence of characters.

stokie-ant commented 10 months ago

Can you try this for me before I make a commit LCDSmartie_exe_5.6.0.1 (1).zip

elektroencefalografista commented 10 months ago

I tested the new exe on all of my systems and sure enough it fixed the issue.

Thank you for resolving it so fast.

stokie-ant commented 10 months ago

You're welcome. Thanks for the report