Codectory / AutoActions

Application-based actions to change Windows settings ( display, audio) or run any program or action
GNU General Public License v3.0
486 stars 18 forks source link

Application crashing after waking up from sleep mode #61

Closed ExpressionlessCode closed 2 years ago

ExpressionlessCode commented 2 years ago

The application is open in the system tray but I notice when I go to launch a game that sometimes the application has crashed and is no longer running. I have to manually open it but I can't reproduce this consistently, it appears to just crash randomly in the background with no errors.

I have enabled the logfile and will update this once I experience the "crash" again, let me know how I can get any other useful information over to you.

ExpressionlessCode commented 2 years ago

Attached the log file but it doesn't show any crash information. Seems to crash when I wake the computer up from sleep AutoHDR.log .

RavenMacDaddy commented 2 years ago

AutoHDR.log AutoHDR.exe.zip UserSettings.zip

Can also confirm that it crashes whenever I'm switching monitor, which has been discussed in another issue.

GODzillaGSPB commented 2 years ago

Can confirm, it does this when switching monitors. I'm currently playing RDR2 on my TV for better HDR and more immersion and use Auto HDR to switch on HDR. When I exit the game, AutoHDR switches off HDR as it should. And then I switch back to my pc monitor....and AutoHDR crashes.

Which is funny because I would've closed AutoHDR anyway. So...a feature maybe, can it read my mind? :D

Codectory commented 2 years ago

Fixed in 1.7.17

ExpressionlessCode commented 2 years ago

This is still happening for me on 1.7.17.

Waking my computer from sleep causes the application to crash.

Codectory commented 2 years ago

Please send me a log and give me the time you waked up your pc. Monitor swithc doesn't cause AutoHDR to crash anymore, but this is another issue.

ExpressionlessCode commented 2 years ago

Sure, log is attached. The computer was woken from sleep at 16:57 AutoHDR.log .

Codectory commented 2 years ago

Please test again with 1.7.19

ExpressionlessCode commented 2 years ago

Still crashing. AutoHDR.log

Codectory commented 2 years ago

Does it work afte restart?

Codectory commented 2 years ago

Please try this one Release_AutoHDR_1.7.20_x64.zip Release_AutoHDR_1.7.20_x86.zip

ExpressionlessCode commented 2 years ago

If I restart or start my computer from cold. The application is open in Task Manager but there is no tray icon, yet when I open a game it toggles HDR on and the tray icon then appears.

I then closed the game, HDR stayed enabled the AutoHDR crashed.

Reopened AutoHDR, opened the game again and HDR mode didn't get enabled and AutoHDR crashed again.

I've then reopened AutoHDR and it's working as intended. Getting some really inconsistent behaviour with this latest version.

AutoHDR.log

ExpressionlessCode commented 2 years ago

I have just done another sleep/wake test and AutoHDR has remained open without crashing.

Codectory commented 2 years ago

with 1.7.20?

ExpressionlessCode commented 2 years ago

1.7.19. Can't see .20 yet.

Codectory commented 2 years ago

image

ExpressionlessCode commented 2 years ago

Ah, didn't see that message. Will test and report back.

ExpressionlessCode commented 2 years ago

This is an example of the "restart/cold start" scenario: image

Application is open but no tray icon, attached the log for this point. AutoHDR.log

It seems to take about 3 minutes to initialize. Here's the log after the tray icon has appeared. AutoHDR.log

Not a big deal that there is a delay but just worth mentioning.

Now after it's initialized and I open up a game, it toggled HDR on, but when closing the game the application crashed leaving HDR enabled. Log attached after the crash. AutoHDR.log

Codectory commented 2 years ago

Did you closed AutoHDR between these to entries? 2021.12.15 13:55:56:6573967 Info: Settings loaded 2021.12.15 13:55:56:6573967 Info: Initializing...

Codectory commented 2 years ago

Please try this one and send me the logs; Release_AutoHDR_1.7.21_x64.zip Release_AutoHDR_1.7.21_x86.zip

ExpressionlessCode commented 2 years ago

Did you closed AutoHDR between these to entries? 2021.12.15 13:55:56:6573967 Info: Settings loaded 2021.12.15 13:55:56:6573967 Info: Initializing...

No, I did not touch AutoHDR. I left it sitting open until it fully intialized.

Please try this one and send me the logs; [Release_AutoHDR_1.7.21_x64.zip]

Will try this now.

ExpressionlessCode commented 2 years ago

Here is the log after a "restart/cold boot". Seems to be loading up quickly now, although there is an error in the log. AutoHDR.log

HDR was left enabled by mistake, opening a game caused AutoHDR to crash. AutoHDR.log

ExpressionlessCode commented 2 years ago

Tested again with HDR off this time. Fresh restart and again it's taking a few minutes for the tray icon to appear AutoHDR.log

Tray icon is now loaded here AutoHDR.log

Opening a game and it switched to HDR, closing the game disabled HDR and the application did not crash. So it's working as expected there.

But it crashed after going to sleep and waking up. AutoHDR.log

Codectory commented 2 years ago

Once again please: Release_AutoHDR_1.7.22_x64.zip Release_AutoHDR_1.7.22_x86.zip

ExpressionlessCode commented 2 years ago

Seemed to load up instantly after a restart but when launching a game it crashed and didn't enable HDR. AutoHDR.log

I reopened AutoHDR, loaded a game and again HDR wasn't enabled and the application crashed. AutoHDR.log

Codectory commented 2 years ago

Do you use audio actions? I removed them for now, because they are a little bit buggy.
So the steps were:

  1. Start AutoHDR
  2. Sleep
  3. Resume
  4. Reopen AutoHDR
  5. Launch game directly
  6. AutoHDR crashed

Is that correct?

ExpressionlessCode commented 2 years ago

Nope, no audio actions. At this point i'm doing the following actions, I haven't tested the Sleep/Wake function yet as I can't even get .22 to work without crashing when I load a game.

Steps are:

  1. Restart computer
  2. Login
  3. Load game
  4. AutoHDR crashes and HDR is not enabled

If I test the Sleep/Wake function, the application is not crashing on .22 at present. But the app doesn't actually work (crashes when opening a game and no HDR enabled etc.) AutoHDR.log

I just tested the main functionality of the application again and it was:

  1. Launch game
  2. HDR get's enabled
  3. AutoHDR crashes. AutoHDR.log
Codectory commented 2 years ago

Alright, so the crash is not related to sleep mode. Please send me you UserSettings.json

ExpressionlessCode commented 2 years ago

Sure, sleep mode doesn't seem to be triggering a crash anymore. But the application seems to crash when opening a game, sometimes HDR get's enabled before the crash, sometimes it doesn't enable HDR before crashing. AutoHDR.log

UserSettings.txt

Had to rename it to .txt to upload here.

Codectory commented 2 years ago

Can you test other games?

ExpressionlessCode commented 2 years ago

Okay, even stranger. Other games seem to work as expected... AutoHDR.log

I tried launching Halo Wars 2 after Halo Infinite and it crashed without enabling HDR. Weird as the application used to work fine with Halo Wars 2 before

Codectory commented 2 years ago

So just to make it clear. AutoHDR crashes, not Halo Wars 2 right?

ExpressionlessCode commented 2 years ago

Yes, AutoHDR is crashing. Halo Wars 2 doesn't crash.