Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resuming a game app will sometimes not work #51

Closed
ceedveed opened this issue Aug 25, 2021 · 14 comments · Fixed by #70
Closed

Resuming a game app will sometimes not work #51

ceedveed opened this issue Aug 25, 2021 · 14 comments · Fixed by #70
Labels
bug Something isn't working

Comments

@ceedveed
Copy link

ceedveed commented Aug 25, 2021

Describe the bug
Resuming a game app will not work correctly all the time. But I cannot identify a specific pattern or cause. This only uncommonly happens (maybe once every 20 suspend/resumes?). Not sure. Only clue I have is the log.

To Reproduce
Steps to reproduce the behavior:

  1. Suspend app in Nyrna
  2. Resume app in Nyrna
  3. Status of app stays "orange" (suspended) despite several clicks. I've also tried manually refreshing by turning off auto refresh.
  4. Open Resource Monitor of Windows 10.
  5. Resume then suspend app in Resource Monitor.
  6. Go back to Nyrna and resume app.
  7. Now app is resumed correctly.

Expected behavior
Expect app to resume without using Resource Monitor.

Screenshots
If applicable, add screenshots to help explain your problem.

Software (please complete the following information):

  • OS: Windows 10 20H2, Nyrna v2.2.0

Additional context
LOG files (ALL):

2021-08-25 11:40:04.944296
WARNING
Logger: Win32Process
Error getting executable name: 6


EDIT: okay as soon as it happened again I took a look at the log:

2021-08-26 23:03:19.939150
WARNING
Logger: Win32Process
Error getting executable name: 6

I think this executable name error is causing this.

@Merrit
Copy link
Owner

Merrit commented Aug 27, 2021

Hi, thanks for the issue!

I'll see if I can investigate this when I get a little time. If you are comfortable sharing, knowing what you were trying to suspend might help as well.

@ceedveed
Copy link
Author

Hi, thanks for the issue!

I'll see if I can investigate this when I get a little time. If you are comfortable sharing, knowing what you were trying to suspend might help as well.

The app is a game, Phoenix Point

@Merrit
Copy link
Owner

Merrit commented Oct 30, 2021

When this happens, if you restart Nyrna does resuming the app work properly?

1 similar comment
@Merrit
Copy link
Owner

Merrit commented Dec 3, 2021

When this happens, if you restart Nyrna does resuming the app work properly?

@Merrit Merrit closed this as completed Dec 3, 2021
@mrrfv
Copy link

mrrfv commented Jan 2, 2022

Please re-open this issue @Merrit - I have the exact same issue on Windows 10. It seems to happen after suspending the system (i.e. closing the lid) and when the app hasn't been resumed for a few hours.

I just force-closed the game that didn't want to resume (and lost all my progress), but I'll make sure to make screenshots and try to restart Nyrna if it happens again.

@Merrit
Copy link
Owner

Merrit commented Jan 3, 2022

@mrrfv Yes, restarting Nyrna would be good. If that fails then also please try running Nyrna as admin and see if that has any effect.

I'll look into the possibility of adding additional logging for the issue. 👍

@Merrit Merrit reopened this Jan 3, 2022
@mrrfv
Copy link

mrrfv commented Jan 19, 2022

@Merrit Managed to reproduce this issue on Windows for 3 apps (Paint, Minecraft launcher, Minecraft). It's as simple as suspending an app and closing the laptop lid (putting it to sleep). Upon opening the lid, Windows will say the app is 'not responding' and Nyrna won't be able to resume it. If Nyrna is restarted, it thinks that the suspended app is resumed.

@Merrit
Copy link
Owner

Merrit commented Jan 19, 2022

@mrrfv Thanks for the info, I think I can now reproduce this issue. I will see if I can do some debugging on it :)

Merrit added a commit that referenced this issue Jan 25, 2022
The current implementation was probably an attempt to reduce
resource usage for Windows, however it was poorly done and was
causing existing windows to not update their status unless that
tile specifically was clicked.

Fixes #51
@Merrit Merrit added the bug Something isn't working label Jan 25, 2022
@Merrit
Copy link
Owner

Merrit commented Jan 25, 2022

@ceedveed @mrrfv I think I may have resolved the issue, would you be willing to test the new build?

Nyrna-Windows-Installer.zip
Nyrna-Windows-Portable.zip

@mrrfv
Copy link

mrrfv commented Jan 26, 2022

I suspended 3 apps (Discord, Brave mid-sleep, Spotify) on the new Portable build, closed and opened my laptop's lid and Nyrna went crazy - Brave was correctly reported as suspended, but other apps weren't. When I tried to resume Spotify, Nyrna crashed. I don't know what happened there...

image


After restarting Nyrna, it correctly resumes all the apps, so I suppose the issue is somewhere in auto refresh.

@mrrfv
Copy link

mrrfv commented Jan 26, 2022

I tried to resume 2 apps at once and it showed a lot of PowerShell errors (which I think is related to Nyrna, as it uses that under the hood).

image
image
image

@Merrit
Copy link
Owner

Merrit commented Jan 26, 2022

Wow, that's something.

Are you able to trigger the issue in any way besides suspending your computer?

@mrrfv
Copy link

mrrfv commented Jan 26, 2022

Not sure to be honest.

Merrit added a commit that referenced this issue Jan 31, 2022
The current implementation was probably an attempt to reduce
resource usage for Windows, however it was poorly done and was
causing existing windows to not update their status unless that
tile specifically was clicked.

Fixes #51
@Merrit
Copy link
Owner

Merrit commented Jan 31, 2022

I presume that Nyrna being suspended itself when you suspend the computer causes its refresh timer to break.

This kind of issue is definitely why we have a disclaimer that funny things can happen when suspending a process.. I don't think there is really a way to check for and recover from such an issue. I'd suggest if you are suspending the entire computer to either switch Nyrna to manual refresh, or to close it before suspending the computer.

I have definitely cleaned up the code where we update the status of a process, and it is much more reliable now and that specific bug appears to be resolved. Thanks for all the help with troubleshooting and figuring out this issue! 🎉

Merrit added a commit that referenced this issue Jan 31, 2022
The current implementation was probably an attempt to reduce
resource usage for Windows, however it was poorly done and was
causing existing windows to not update their status unless that
tile specifically was clicked.

Fixes #51
Merrit added a commit that referenced this issue Jan 31, 2022
The current implementation was probably an attempt to reduce
resource usage for Windows, however it was poorly done and was
causing existing windows to not update their status unless that
tile specifically was clicked.

Fixes #51
Merrit added a commit that referenced this issue Jan 31, 2022
The current implementation was probably an attempt to reduce
resource usage for Windows, however it was poorly done and was
causing existing windows to not update their status unless that
tile specifically was clicked.

Fixes #51
Merrit added a commit that referenced this issue Jan 31, 2022
The current implementation was probably an attempt to reduce
resource usage for Windows, however it was poorly done and was
causing existing windows to not update their status unless that
tile specifically was clicked.

Fixes #51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants