Skip to content

OMT Mini 0.8.1

Choose a tag to compare

@ForesterMW ForesterMW released this 17 Sep 01:32
· 8 commits to main since this release

Fixes the control panel freezing OMT Mini. Required if you are on 0.8.0.

What was happening

One command worked, then nothing did, then the application would not respond at all.

The panel's state was being built on the socket thread, and building it called the routine that tidies up closed viewers. That erases viewer objects, which joins their receive threads and calls DestroyWindow on windows the interface thread owns, and it updates the tray icon through Shell_NotifyIcon.

None of those may be done from another thread. It ran on every poll, roughly once a second, so the first poll that raced the interface wedged the whole application.

The fix

The socket thread now only ever reads a snapshot. The snapshot is taken under a lock and built on the interface thread, on a timer and immediately after any command so the panel sees the result of what it just did. Nothing reachable from a web request touches a window any more.

I also audited everything else a request can reach. Discovery, the announcer and the multiview engine all carry their own locks, and the monitor and desktop queries are safe from any thread. That audit is what was missing when this went in.

Also

The refresh runs twice a second now, so a window you drag on the desktop itself shows up in the panel promptly rather than a second later.