Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-03-28 23:36:53



Reply to topic  [ 13 posts ]  Go to page Previous  1, 2
Shutdown crash with Debug GL on (was: Slow quit on Windows?) 
Author Message

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
kathrine wrote:
After attaching a debugger i noticed i still had GL debugging activated,
Ouch !... This would tremendously slow down the rendering. To prevent such bad surprises, I need to change how GL debugging is activated and make it so it cannot survive a session restart unless specifically requested by the user.

For next release, I replaced the persistent "RenderDebugGL" debug setting with a new "DebugGLOnRestart" setting, that gets immediately reset to FALSE after use (i.e. after copying its value to the gDebugGL global variable on startup), and only gDebugGL is now toggled during the session (still in the "Advanced" -> "Rendering" -> "Render tests" menu), meaning that if you do need to debug GL from the very start of the rendering, i.e. as soon as the GL initialization is performed (and only in that case), then you must manually set "DebugGLOnRestart" to TRUE before restarting the viewer, or pass the "--set DebugGLOnRestart 1" option in the viewer command line used to start the debug session.

Quote:
so the code entered log_glerror() and promptly crashed there.
Maybe thats new or wasn't tested yet, but glGetError() crashes when no current GL context is around.

So i added a quick check (probably wrong for Linux... like this), and the WERFaults spawn stopped, despite GL debugging being enable.
I changed the code to test for a new gGL.mValid flag instead (which is true only after OpenGL got properly initialized for the calling thread and goes false as soon as it gets stopped, which happens before the corresponding GL context is destroyed).
I also added the same check in clear_glerror(), cleaned up a few misplaced stop_glerror() and replaced some with clear_glerror() (which works to clear GL errors where actually needed even when gDebugGL is false).

It still does not explain why WER gets triggered while the viewer unregisters itself from this "service"... Perhaps because the crashes happen in threads after the viewer crash handler gets unregistered by Windows on viewer exit ?
Yet, for good measure, I now also unregister SLPlugin.exe, SLVoice.exe and dullahan_host.exe from WER on viewer startup.

I will send you in PM a link to a test build, so that you can verify on your system that the shutdown issue is properly fixed... EDIT: link PMed.


2022-10-25 09:26:52
Profile WWW

Joined: 2011-10-07 10:39:20
Posts: 181
Reply with quote
Hello Henri,

thanks for the test build.

I can confirm it works. I enabled DebugGL during the session, then terminated the session.
The session closed quickly and i saw no hangs and no WERFault processes pop up anywhere.

So i guess it fixes the issue.


2022-10-25 16:40:10
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
kathrine wrote:
So i guess it fixes the issue.
Good, and thank you !


2022-10-25 16:47:33
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.