fred_em

Long delay in wglDeleteContext on application exit

Discussion created by fred_em on Nov 8, 2010
Latest reply on Dec 16, 2010 by gsellers

Hi,

My application takes a long time (15-20 seconds) to exit as soon as I am using a shader.

It seems the delay happens in wglDeleteContext. If I pause the application under VS2008 to try to understand what's going on, I get the following call stack:

>    ntdll.dll!_ZwWaitForSingleObject@12()  + 0x15 bytes   
     ntdll.dll!_ZwWaitForSingleObject@12()  + 0x15 bytes   
     kernel32.dll!_WaitForSingleObjectExImplementation@12()  + 0x43 bytes   
     kernel32.dll!_WaitForSingleObject@8()  + 0x12 bytes   
     atioglxx.dll!6927f9fb()    
     [Frames below may be incorrect and/or missing, no symbols loaded for atioglxx.dll]   
     atioglxx.dll!6927fa2e()    
     atioglxx.dll!692805d4()    
     atioglxx.dll!691dd191()    
     atioglxx.dll!691df751()    
     atioglxx.dll!693fdac9()    
     atioglxx.dll!6937aafb()    
     atioglxx.dll!69088374()    
     atioglxx.dll!690881d9()    
     atioglxx.dll!6909ef49()    
     atioglxx.dll!69083872()    
     atioglxx.dll!6908ba3b()    
     atioglxx.dll!69047f83()    
     opengl32.dll!_wglDeleteContext@4()  + 0x58 bytes   
     opengl32.dll!_vCleanupAllLRC@0()  + 0x42 bytes   
     opengl32.dll!_GLUnInitializeProcess@4()  + 0x25 bytes   
     opengl32.dll!_DllMain@12()  + 0x35 bytes   
     opengl32.dll!__CRT_INIT@12()  + 0x27e bytes   
     ntdll.dll!_LdrpCallInitRoutine@16()  + 0x14 bytes   
     ntdll.dll!_LdrShutdownProcess@0()  + 0x141 bytes   
     ntdll.dll!_RtlExitUserProcess@4()  + 0x74 bytes   
     kernel32.dll!766f7363()    

Any idea about what's going on in there, or a possible way to investigate the issue? The problem also happens when I manually clean up all shader-related code prior to exiting. Just making use of a shader seems to trigger this behavior.

Thanks,
Fred

Mobility Radeon HD5470
Catalyst 10.10 drivers 8.782-100930m-106237C-ATI
OpenGL version 6.14.10.10243
Windows 7 x64

 

Outcomes