Unexplained crash at startup (no errors in log)
See original GitHub issueI’ve put a HyperionScreenCap shortcut in my startup folder to start with Windows and while sometimes it works fine, sometimes it won’t launch at all and the tray icon will disappear as soon as I hover over it. Sometimes I also get a “HyperionScreenCap has stopped working” message.
There’s nothing mysterious in the log:
2017-12-26 18:43:22 [INFO] [1] HyperionScreenCap.Program.Main:0 - Logger Initialized
2017-12-26 18:43:22 [INFO] [1] HyperionScreenCap.MainForm..ctor:0 - Instantiating MainForm
2017-12-26 18:43:22 [INFO] [1] HyperionScreenCap.SettingsManager.LoadSetttings:0 - Loading settings from user.config
2017-12-26 18:43:22 [INFO] [1] HyperionScreenCap.SettingsManager.LoadSetttings:0 - Loaded settings from user.config
2017-12-26 18:43:22 [INFO] [1] HyperionScreenCap.Helper.UpdateChecker.StartUpdateCheck:0 - Starting update check
2017-12-26 18:43:23 [INFO] [1] HyperionScreenCap.MainForm.Init:0 - Initialization requested with parameters reInit=False, forceOn=False
2017-12-26 18:43:23 [INFO] [1] HyperionScreenCap.MainForm.Init:0 - Initialization lock set
2017-12-26 18:43:23 [INFO] [1] HyperionScreenCap.MainForm.ToggleCapture:0 - Processing toggle capture command: ON
2017-12-26 18:43:23 [INFO] [1] HyperionScreenCap.MainForm.ToggleCapture:0 - Toggle capture lock set
2017-12-26 18:43:23 [INFO] [1] HyperionScreenCap.MainForm.ToggleCapture:0 - Executing toggle capture command on a new Thread[IsBackground = True]
2017-12-26 18:43:23 [INFO] [1] HyperionScreenCap.MainForm.Init:0 - Initialization lock unset
2017-12-26 18:43:23 [INFO] [1] HyperionScreenCap.MainForm..ctor:0 - MainForm Instantiated
…then when I click the Close Program button on the crash popup, a single extra line is added before it is killed:
2017-12-26 18:47:31 [INFO] [4] HyperionScreenCap.MainForm.ExecuteToggleCaptureCommand:0 - Toggle capture lock unset
Bizarrely, if I start it a bunch more times and let it crash each time, suddenly it will work.
My Hyperion server is a Raspberry Pi 3 connected via wired LAN. It’s hard to pin down when this started happening, but it was before I reformatted my PC earlier this month. I’ve tried connecting via both hostname and IP address and the strange behaviour persists.
I can debug further with Visual Studio if you need me to!
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Based on the stacktrace you provided, I think I have found the solution. Will be including that in the next release.
So the unpredictability of this bug is proving very annoying! Whenever I start debugging from VS2017, it seems to run okay. The main installed exe also seems to run file while VS is open. If I close VS, sometimes it runs, sometimes it doesn’t - and if I start a debugging session when the release exe crashes it just says that it crashed in native code. Will keep probing!
EDIT: aha, I’ve gotten it to crash in a debugging session:
Looks like some kind of race condition? It’s worth noting that I have auto start capture at startup enabled.