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

Crashing on startup (even after reinstall) #30

Closed
Cuk233 opened this issue Mar 4, 2023 · 13 comments
Closed

Crashing on startup (even after reinstall) #30

Cuk233 opened this issue Mar 4, 2023 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@Cuk233
Copy link

Cuk233 commented Mar 4, 2023

---- Process Info ----
PID: 128856
ProcessName: ShutdownTimerClassic
Arguments:
PriorityClass: Normal
Threads: 9
Responding: True
HasExited: False
StartTime: 05/03/2023 02:35:46
PeakWorkingSet64: 21,1MB (22102016byte)
WorkingSet64: 21,1MB (22097920byte)
PeakWorkingSet64: 21,1MB (22102016byte)
PrivateMemorySize64: 15,7MB (16416768byte)
VirtualMemorySize64: 204,4MB (214355968byte)
PeakVirtualMemorySize64: 204,7MB (214683648byte)
PagedSystemMemorySize64: 310,7KB (318184byte)
NonpagedSystemMemorySize64: 19,5KB (20016byte)
PagedMemorySize64: 15,7MB (16416768byte)
PeakPagedMemorySize64: 15,7MB (16416768byte)
UserProcessorTime: 00:00:00.1718750
TotalProcessorTime: 00:00:00.2656250
PrivilegedProcessorTime: 00:00:00.0937500

---- Application Info ----
Product Name: ShutdownTimerClassic
Product Version: 1.2.3.0
Current Culture: en-ID
Executable Path: C:\Program Files\WindowsApps\19341LukasLangrock.ShutdownTimerClassic_1.2.3.0_x64__jnfph5tq58r4j\ShutdownTimer\ShutdownTimerClassic.exe
MD5 Checksum: f755519e89e2e543ed11f113634d6e20

---- Environment Info ----
64-bit OS: True
64-bit Process: False
OS Version: Microsoft Windows NT 10.0.19044.0
Runtime Version: 4.0.30319.42000
System Uptime: 78664843
Processor Count: 8
Shutdown Started: False

---- Exception ----
Type: UnhandledException
Message: Object reference not set to an instance of an object.
Stack Trace:
at ShutdownTimer.Helpers.SettingsProvider.CheckSettings()
at ShutdownTimer.Helpers.SettingsProvider.Load()
at ShutdownTimer.Program.Main(String[] args)

---- Internal Event Log ----
[Settings] Checking settings object
[Settings] Loading settings.json
[Settings] Loading settings...
[Program] Running Menu
[Program] Attaching ExceptionHandler.cs

---- End of Log ----

@lukaslangrock
Copy link
Owner

lukaslangrock commented Mar 7, 2023

It is possible that for some strange reason, Windows chose to not store the application's settings with the app itself (that way they would have been removed along with the app when uninstalling) but instead used your AppData folder.

In case that's what happened, please do the following:

  1. Open Start, type %APPDATA% and hit enter.
  2. A new Windows Explorer window should appear. Try to find a folder called "Shutdown Timer Classic".
  3. If that folder exists (there should only be a settings file in there), please upload the file here. I'd love to know why it makes the app crash.
  4. To fix your problem, just delete that file/folder.

Please let me know it that helps. There have been similar issues (#6 and #14) but sadly I never got a reply if the fix worked.

@lukaslangrock lukaslangrock added the bug Something isn't working label Mar 7, 2023
@lukaslangrock lukaslangrock self-assigned this Mar 7, 2023
@Cuk233
Copy link
Author

Cuk233 commented Mar 7, 2023

It appears that the setting.json is only blank

@Cuk233
Copy link
Author

Cuk233 commented Mar 7, 2023

settings.zip

@lukaslangrock
Copy link
Owner

interesting...
Does deleting the file/folder resolve the issue?

@Cuk233
Copy link
Author

Cuk233 commented Mar 7, 2023

yep it resolve, but i notice that on the setting is not actually blank, there's like blank 'space'

@lukaslangrock
Copy link
Owner

lukaslangrock commented Mar 7, 2023

hmm yeah, looking at the raw hex data it's just 512B of zeros, so it contains data that represents nothing.
The app can correct a missing or broken config, but maybe having a file existing but not containing anything seems to make it not create an object with data to correct, so there being nothing to work with makes it crash.

But thank you very much, I know have something to work with where this issue has been totally mysterious for me before.

edit: the blank space is probably coming from your text editor (which is quite normal).

@Cuk233
Copy link
Author

Cuk233 commented Mar 8, 2023

Oh and I don't know if it can be helpful for you but some day before it crashed, I used the timer to shut down my laptop, but when I came back my laptop didn't shut down, instead, it just left it at the startup login.

I don't know if it just restart or it fails to shut down or maybe there's a windows update that interrupts the process

@lukaslangrock
Copy link
Owner

lukaslangrock commented Mar 9, 2023

Thanks, that could certainly play a role: Windows Update - in theory - shouldn't run when you initiate a timer with my app, but well it sometimes does it either way and that would of course cancel the timer as Windows would just force a restart.

A different explanation could be that the timer ran successfully, but Windows had an update queued that it installed when the shutdown was initiated by the timer. That update could have resulted in a reboot, and that's why your laptop was on again after you came back.

Failure to shut down can really only occur when you tick the checkbox for graceful mode, as that allows an open application to interrupt the shutdown if, for example, an unsaved document is still open. Otherwise, which is the default behavior, it will just force all applications that are still open and not responding to a "friendly" request (sent to all open applications before being forced), so usually no application should be able to cancel the shutdown once initiated (but well we know Windows do we, it wouldn't surprise me if it could do that for some strange reason).

It's tough to really identify the reason, because Windows Update sometimes does whatever the hell it wants and there is no real stopping it from my experience. At least that was the case 2,5 years ago when I studied that behavior a bit, I don't know if that has changed or not.

@lukaslangrock
Copy link
Owner

I'll pin this issue and use it as the central place for discussing this problem, as there have been many duplicated of this issue before

@lukaslangrock lukaslangrock pinned this issue May 18, 2023
@lukaslangrock lukaslangrock changed the title Crash even after reinstall Crashing on startup (even after reinstall) May 18, 2023
@lukaslangrock lukaslangrock mentioned this issue May 18, 2023
@lukaslangrock
Copy link
Owner

lukaslangrock commented May 18, 2023

If you experienced this problem and need a fix

  1. Open the Start menu and type %APPDATA% and hit enter
  2. Find the folder called Shutdown Timer Classic
  3. Delete it

The problem should now be fixed. If it's not, try resetting or reinstalling the app.

@Cuk233
Copy link
Author

Cuk233 commented May 18, 2023

Hi so apparently I got the problem again and it's because I used the timer when Windows needed to restart and then update, but after Windows finished updating instead of shutting down my PC it restarted my PC and turn it back on, after that, I tried to open your app and it crashed again like before.

I don't know if the problem is really because of the windows or if there might be some conflict with remember last state feature

@lukaslangrock
Copy link
Owner

Thanks for all the info, I hope I can find out why that happens soon. Unfortunately, I don't have much free time at hand with university, work and everything else, so this project has been kind of stale, but I hope I can find some time to work on it soon.

@lukaslangrock
Copy link
Owner

This issue boiled down to the settings file somehow ending up completely empty. I added a fix for this, hopefully it really was this simple.

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

No branches or pull requests

2 participants