MattFiler/OpenCAGE

unhandled exception causes silent crash while scrolling through entity list

ghramsey opened this issue ยท 14 comments

I got a silent crash while scrolling through the entity list. I have multiple tabs view open, but I close
the lot when it seems like it's chugging to draw them.

I feel like this is related some how to #319 because the symptoms are similar. Doing something "too fast".
I'm scrolling through the list of entities and it's still drawing/populating the list as I get to the next item
and there seems like a blink and then CTD. No error from opencage.

This is staging ver. .35

Windows Event viewer shows this as the reason for the crash:

-
-

1026 0 2 0 0 0x80000000000000 217238 Application ghram [-](https://github.com/MattFiler/OpenCAGE/issues/new#) Application: CommandsEditor.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.CreateGraphicsInternal() at System.Windows.Forms.ThreadExceptionDialog..ctor(System.Exception) at System.Windows.Forms.Application+ThreadContext.OnThreadException(System.Exception) at System.Windows.Forms.Control.WndProcException(System.Exception) at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

It did happen again.

I've been renaming the speech files in SOLACE because they're named using text from the script
and it's harder to follow them. All seemed OK as I was scrolling through the list. The silent CTD.

Application: CommandsEditor.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.CreateGraphicsInternal() at System.Windows.Forms.ThreadExceptionDialog..ctor(System.Exception) at System.Windows.Forms.Application+ThreadContext.OnThreadException(System.Exception) at System.Windows.Forms.Control.WndProcException(System.Exception) at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

I think this should hopefully now be fixed. Please let me know if it happens again!

I'm gonna close this one - but yeah please reopen if you encounter it again!

I'm not sure which bug it's related to. The nodegraph bug seems solved and it's misbehavior likewise has stopped.
I have three different similar bugs I reported so I'll add it on this one b/c it's related again to a silent crash.
I'm not sure why this time. I was scrolling through entities, but I didn't see anything acting slow this time.

It was actually working great until it crashed. Not sure if it's related. I'd just added a new speech entity before this.
I think the crash was as it was refreshing/repopulating the entitiy list.

Only details I have are again from windows event viewer because it was not trapped by Commands Editor.

Application: CommandsEditor.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled
exception. Exception Info: System.ComponentModel.Win32Exception at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.CreateGraphicsInternal() at System.Windows.Forms.ThreadExceptionDialog..ctor(System.Exception) at System.Windows.Forms.Application+ThreadContext.OnThreadException(System.Exception) at System.Windows.Forms.Control.WndProcException(System.Exception) at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

I've used the script editor extensively today and not encountered this problem - will leave this ticket open though for now.

If you encounter it again please try and capture what you were doing at the time of the crash ๐Ÿ‘

I saw the exception again last night once, but before you pushed the 0.12 update.
I'll report if I encounter it again with this update.

Given your change log I have a feeling it's fixed though.

:notlikethis: Sorry to say this darn bug has reared it's ugly head again. Same issue as before scrolling through entities
probably a little faster than the screen was drawing. It froze then crashed to desktop without error message.

I confess though I think there is a component to this issue that is being missed. It's not just scrolling through the entities. I've been scrolling fast as lightening through the list after restarting the editor and the bug is not only not showing again
but the editor is not slowing down at all. I'm at a loss to explain that.

Windows Event Viewer log:

Application: CommandsEditor.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.CreateGraphicsInternal() at System.Windows.Forms.ThreadExceptionDialog..ctor(System.Exception) at System.Windows.Forms.Application+ThreadContext.OnThreadException(System.Exception) at System.Windows.Forms.Control.WndProcException(System.Exception) at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

Hmm yeah I'm at a bit of a loss here as I've not been able to replicate the issue locally & the error isn't particularly helpful. The fact that you're getting it in relation to a more general slowdown makes me wonder if it's just a lack of resources available on your machine, as I don't tend to get the lag you're mentioning.

If it happens again could you try keep an eye on task manager to see what % CPU/GPU are at? Additionally - do you have entity tabs enabled? Worth keeping on top of how many are active there if that's the case.

I have an idea of what it could be outside of that, and I'll run you a build after work to see if it helps :)

I think this last time I had tabs off but this has happened with both on and off. After that last crash opened what must have
been 50 entities and nothing bad happened. And I was scrolling through at warp speed. Could it be a cache thing . ?
Disk cache? The program is on an NvME m.2 on my mainboard but maybe there's a bottle neck somewhere that happens suddenly.

I'll see if I can open taskmanager but I have only two monitors so it might not help to catch the event there...

I've pushed some changes in 0.12.0.1 (now live on main) which should hopefully fix this issue. If you get it again please let me know :)

No crashes so far though I've been playing the game; testing mostly vs using editor.

Hopefully it holds.

I'm not sure if it's related and I might have mentioned it before when you made some changes:
speechscript entities populate really slow. This evening they are the only hiccup when scrolling through entities.
But in the past when it hiccupped like that it would also sometimes be followed by crashes.
That it is not crashing tells me you might have fixed the issue.

I'm gonna close this one in the hope that the latest update fixed it!

If you get any further issues, as always lemme know!

-
-

1026
0
2
0
0
0x80000000000000

922695


Application
ghram


-
Application: CommandsEditor.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams) at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.CreateGraphicsInternal() at System.Windows.Forms.ThreadExceptionDialog..ctor(System.Exception) at System.Windows.Forms.Application+ThreadContext.OnThreadException(System.Exception) at System.Windows.Forms.Control.WndProcException(System.Exception) at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

Got a random crash. Sorry to say this bug seems to have recurred.
Only once so hopefully isolated.