SDL2 app rendering freezes and update fails

We have a large SDL2 based app deployed in a number of locations on both Ubuntu and Windows machines. We get very occasional reports of ‘freezes’ of the app; with animations and screen updates stopping for a few seconds. Mouse clicks appear to be ignored for the duration and then when the app ‘wakes up’ the clicks are processed. At the extreme, the app appears to stop responding completely. We have been chasing this bug for many hours across many weeks now but are not getting very far narrowing it down.
Only recent clues are it possibly happens more on Windows after a wake-from-screen-blank. Although we know in production, the machines do not use screenblanks. A second Ubuntu dev machine has also now stopped rendering completely, unless the window is moved or desktop-swapped or other window revent. gdb’ing show that the main loop is still running, events seem to be handled, the RGB Surfaces are still being created (found by dumping the pixel data), RenderPresent is still being called. We make use of the ability to make additional SDL Windows, and IF a second window is created and IF the main app is then forced fullscreen (from the Taskbar) it then updates properly.
99.9999% of the time everything runs smoothly and flawlessly.
I can’t post the app or even useful chunks of it, and I understand that’s far from ideal, but has anyone seen any issues like this with any other SDL app? Any clues as to possible avenues to explore or debug greatfully received.
Thank you