question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexplained crash at startup (no errors in log)

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sabaatworldcommented, Jan 28, 2018

Based on the stacktrace you provided, I think I have found the solution. Will be including that in the next release.

1reaction
jonty-compcommented, Jan 4, 2018

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:

System.InvalidOperationException
  HResult=0x80131509
  Message=Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
  Source=System.Windows.Forms
  StackTrace:
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at System.Windows.Forms.Control.Invoke(Delegate method)
   at HyperionScreenCap.MainForm.ExecuteToggleCaptureCommand(CaptureCommand command) in C:\Users\jonty\Source\HyperionScreenCap\HyperionScreenCap\Form\MainForm.cs:line 195
   at HyperionScreenCap.MainForm.<>c__DisplayClass19_0.<ToggleCapture>b__1() in C:\Users\jonty\Source\HyperionScreenCap\HyperionScreenCap\Form\MainForm.cs:line 177
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Looks like some kind of race condition? It’s worth noting that I have auto start capture at startup enabled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Programs randomly freeze-crashing with no errors in ...
Click on the Startup Tab and click open task manager. This will open another window which contains all your startup applications on the ......
Read more >
Games Crashing Without Error Messages: Why & How to ...
You might be able to fix games crashing without error with the potential solutions in this troubleshooting guide.
Read more >
Game crashes instantly at startup, log says it can't execute ...
Try starting not the launcher but Z:\Games\StarCitizen\LIVE\Bin64\StarCitizen.exe directly, see if it throws up any error message before it ...
Read more >
VS 2019 crashes without displaying any error after opening ...
Hi,. Can you check in the Windows Event Viewer (Start -> Event viewer->Windows Logs->Application) and see if there are error logs ...
Read more >
React Native app crashes without any error log
my bug was fixed by deleting the build folder(inside android/app) and running npx react-native run-android.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found