WM_PAINT and some else is triggered for all other windows outside of the main application seemingly every frame
microdee opened this issue · 5 comments
Describe the bug
WM_PAINT
, WM_NCPAINT
, WM_ERASEBKGND
, WM_CTLCOLORDLG
is triggered for all other application open while an App using MethaneKit is running seemingly every frame. This occurs when the mouse cursor is over the main App window. This also causes the Triangle example to drop framerate from let's say ~2500 FPS to ~65 FPS.
Steps To Reproduce
Steps to reproduce the behavior:
- Build via
Build\Windows\Build.bat
- Run
Build\Output\VisualStudio\Win64-Release\Install\Apps\MethaneHelloTriangle.exe
- Hover the cursor over the main window then move it outside the window to see the effect
- Optionally open a program which flickers or freezes when WM_PAINT is called (like Task Manager, RegEdit, Spy++ etc.)
Expected behavior
MethaneKit app should not affect other apps, and performance should stay consistent when moving the cursor over it.
Desktop:
- OS: Windows 10
- Version: 20H2 19042
- Build environment: Default (orchestrated by Build.bat)
I'm investigating more a little bit but I figured I'd post this and update with my findings.
Hello @microdee, thank you for the detailed description of the problem. Unfortunately, I was not able to reproduce the described behavior on several Windows systems at hand. Methane applications do not affect other applications and do not send any of the listed messages to the outer space. You can double check it in Windows platform code Modules/Platform/App/Sources/Methane/Platform/Windows/AppWin.cpp (there's no other Windows message processing code anywhere else). The only messages that are properly posted with window handle are WM_ALERT
and WM_CLOSE
. Application does not rely on WM_PAINT
message, instead it is doing frame rendering in UpdateAndRenderWithErrorHandling() function after every message processing in the main message loop while (m_is_message_processing) { ... }
. I could guess that observed glitch could be related to the bugged graphics drivers. Could you please try updating your graphics driver to the latest version and check if the problem has gone?
@microdee I'm waiting for a few days more and closing this defect as not reproducible in case of no reply.
oh yeah sorry atm I'm busy with something completely different I can have a look again on next Thursday. I'm also pretty sure that I have some weird service settings or driver present. I've made an issue because so far only MethaneKit examples behaved like this on my computer.
I've tried it on an other machine and I couldn't reproduce as well. I don't have time unfortunately to go down the rabbit hole, which shoddy service/driver/config/virus is freaking out by MethaneKit on the previous computer I used, so I consider that my own fault.
Thanks for double check! So I’m closing the issue as not reproducible.