attractplus icon indicating copy to clipboard operation
attractplus copied to clipboard

Fix issue #226

Open oomek opened this issue 4 months ago • 13 comments

Fix frozen window after resuming from sleep

oomek avatar Sep 01 '25 22:09 oomek

Will run this build over the next few days and report my results.

Chadnaut avatar Sep 01 '25 22:09 Chadnaut

So far so good (564), but the issue is seemingly random so will keep testing (566).

Chadnaut avatar Sep 04 '25 15:09 Chadnaut

Survived another wake-up. Then I locked my machine, made a coffee, unlocked, browsed the web, and then found it had frozen again... Not sure exactly when it occurred, more testing required.

Chadnaut avatar Sep 04 '25 23:09 Chadnaut

The only thing I can do is also postpone window create by 2s like with audio. It is a sfml bug, all I can do are workarounds.

oomek avatar Sep 05 '25 10:09 oomek

I've already postponed it by 2 seconds in my initial commit. The window is recreated after audio reinitialization, so honestly I don't know what else I can do here.

oomek avatar Sep 08 '25 07:09 oomek

Locking is different to sleeping, so maybe a separate issue. Will keep testing the sleep/wake cycle.

Chadnaut avatar Sep 08 '25 07:09 Chadnaut

Right, Maybe I could raise this flag also when display isn't called for several seconds?

oomek avatar Sep 08 '25 07:09 oomek

That would also get flagged when returning from a game, since AM is not displayed at that time? This could fix a semi-related window bug:

  • Occasionally when returning from a launched game the window contents get "offset" (-8,-31) pixels
  • This leaves a space inside the bottom & right edges that does not get redrawn

Chadnaut avatar Sep 08 '25 08:09 Chadnaut

FeWindow::display() is still called when locked unfortunately, so false lead.

Occasionally when returning from a launched game the window contents get "offset" (-8,-31) pixels

Hmm, never seen that on my machines. Is it dependent on emulator, window mode, gpu etc?

oomek avatar Sep 08 '25 08:09 oomek

Regular Window Mode + Mame. Sees like a resolution-change-related issue, since the -31px vert offset is the same height as the window header. Another randomly occurring issue - will screenshot when it happens next.

Chadnaut avatar Sep 08 '25 08:09 Chadnaut

I've never seen this artifact and I run AM+ in window mode 99% of the time. What is your gpu?

oomek avatar Sep 08 '25 08:09 oomek

nVidia Quadro T1000 nothing fancy, but still shouldn't be exhibiting these issues.

Chadnaut avatar Sep 08 '25 08:09 Chadnaut

Of course, Quadro... I'm 99% sure all 3 issues are caused by the Quadro driver. We've had many odd behaviours from Quadro users reported over the years, including yourself 😉

oomek avatar Sep 08 '25 08:09 oomek