Motherboard Forums


Reply
Thread Tools Display Modes

Thread hangs after wglMakeCurrent(NULL, NULL); or some other OpenGlcommands

 
 
Equilibrium
Guest
Posts: n/a
 
      08-04-2009, 02:26 PM
Hi All,

Using 9600 GT driver 6.14.11.8120
WinXP

During running our application the Thread that is responsible for
drawing get "Freezed"
Code of rendering

Code:
if(m_pGLContext)
{
BOOL bRes = m_pGLContext->MakeCurrent();
if(bRes)
{
const BSTAT eRet = m_pGLContext->Render(); // Some OpenGL calls
CDC* pDC = GetDC();
m_pGLContext->Swap();
ReleaseDC(pDC);
} else
{
m_pGLContext->ReleaseCurrent();
return;
}

m_pGLContext->ReleaseCurrent();
}

where MakeCurrent() and ReleaseCurrent () stands for:

Code:
BOOL COGLContext::MakeCurrent()
{
#ifdef _DEBUG
const DWORD dwThread = GetCurrentThreadId();
UI_ASSERT_AND_LOG(m_cOwner.IsCurrent(), "Sharing a context between
threads is a bad idea!");
#endif
const HGLRC hGLRC = wglGetCurrentContext();
if(hGLRC != m_hGLContext)
{
const BOOL bRet = wglMakeCurrent(m_hDC, m_hGLContext);
if(!bRet)
{
const DWORD dwError = GetLastError();
return FALSE;
}
}

return TRUE;
}

void COGLContext::ReleaseCurrent()
{
wglMakeCurrent(NULL, NULL);
}
after a while , most of the times in Release build the Drawing thread
is freezed.
Last code statement is wglMakeCurrent(NULL, NULL);

It seems that the thread is stuck in the Video adapter dll......

here is the call stack

Code:
nvoglnt.dll!6977f56a()
nvoglnt.dll!6977fae7()
nvoglnt.dll!697812fd()
gdi32.dll!77f1c55e()
gdi32.dll!77f1c55e()
ntdll.dll!7c912c06()
ntdll.dll!7c910098()
ntdll.dll!7c910021()
ntdll.dll!7c91003d()
kernel32.dll!7c812c2a()
kernel32.dll!7c812c3d()
nvoglnt.dll!69765661()
nvoglnt.dll!6956ddcb()
nvoglnt.dll!6975b956()
gdi32.dll!77f1b271()
gdi32.dll!77f1b297()
ntdll.dll!7c91003d()
nvoglnt.dll!6957c415()
gdi32.dll!77f1b821()
gdi32.dll!77f1b7da()
gdi32.dll!77f16e1d()
gdi32.dll!77f16f0a()
gdi32.dll!77f16e71()
nvoglnt.dll!698e792c()
gdi32.dll!77f1c573()
gdi32.dll!77f1c553()
gdi32.dll!77f1c55e()
nvoglnt.dll!698e5d5a()
nvoglnt.dll!69780bd8()
nvoglnt.dll!6978142f()
nvoglnt.dll!6977e7b5()
nvoglnt.dll!6977ed49()
nvoglnt.dll!6977f464()
nvoglnt.dll!6977fae7()
nvoglnt.dll!697812fd()
nvoglnt.dll!6978130f()
nvoglnt.dll!69781316()
gdi32.dll!77f1b271()
nvoglnt.dll!6973eee3()
nvoglnt.dll!69763005()
nvoglnt.dll!69765ab6()
nvoglnt.dll!69743f92()
nvoglnt.dll!6973b81c()
nvoglnt.dll!69743f9c()
nvoglnt.dll!6979f5f2()
nvoglnt.dll!69794ddc()
nvoglnt.dll!695916b9()
nvoglnt.dll!6957c13d()
nvoglnt.dll!695917dd()
nvoglnt.dll!6959196d()
nvoglnt.dll!695757f1()
nvoglnt.dll!6975f84c()
nvoglnt.dll!6975f942()
nvoglnt.dll!6975fa34()
nvoglnt.dll!695c8c9a()
opengl32.dll!5ed19bef()
user32.dll!7e4184ba()
user32.dll!7e4186be()
UIFramework.dll!COGLContext::ReleaseCurrent()  Line 1268	C++
>	UIFramework.dll!CBVRView::_Render(const int bFromUIThread=0)  Line 194 + 0xb	C++
Views.dll!CBaseTacticalView::_Render(const int bFromUIThread=0)
Line 2475 + 0xd	C++
UIFramework.dll!CBVRView::Render(const int bFromUIThread=0)  Line
157	C++
UIFramework.dll!CViewsManager::UpdateViews()  Line 394 + 0x9	C++
UIFramework.dll!CDisplayUpdater::_Update(const int
iCounter=15660641)  Line 54	C++
UIFramework.dll!CQuotaDisplayUpdaterThread::Update()  Line 54	C++
UIFramework.dll!CQuotaUpdaterThread::Run()  Line 106	C++
MFC71.DLL!7c1b1a13()
MSVCR71.DLL!7c36b381()
gdi32.dll!77f176ab()
MSVCR71.DLL!7c3638e2()
kernel32.dll!7c80b713()
gdi32.dll!77f176ab()

Please assist.

Regard
Eq.
 
Reply With Quote
 
 
 
 
deimos
Guest
Posts: n/a
 
      08-04-2009, 11:45 PM
Equilibrium wrote:
> Hi All,
>
> Using 9600 GT driver 6.14.11.8120
> WinXP
>
> During running our application the Thread that is responsible for
> drawing get "Freezed"
> Code of rendering
>
>
Code:
> if(m_pGLContext)
> 	{
> 		BOOL bRes = m_pGLContext->MakeCurrent();
> 		if(bRes)
> 		{
> 			const BSTAT eRet = m_pGLContext->Render(); // Some OpenGL calls
> 			CDC* pDC = GetDC();
> 			m_pGLContext->Swap();
> 			ReleaseDC(pDC);
> 		} else
> 		{
> 			m_pGLContext->ReleaseCurrent();
> 			return;
> 		}
>
> 		m_pGLContext->ReleaseCurrent();
> 	}
>
>
>
> where MakeCurrent() and ReleaseCurrent () stands for:
>
>
Code:
>
> BOOL COGLContext::MakeCurrent()
> {
> #ifdef _DEBUG
> 	const DWORD dwThread = GetCurrentThreadId();
> 	UI_ASSERT_AND_LOG(m_cOwner.IsCurrent(), "Sharing a context between
> threads is a bad idea!");
> #endif
> 	const HGLRC hGLRC = wglGetCurrentContext();
> 	if(hGLRC != m_hGLContext)
> 	{
> 		const BOOL bRet = wglMakeCurrent(m_hDC, m_hGLContext);
> 		if(!bRet)
> 		{
> 			const DWORD dwError = GetLastError();
> 			return FALSE;
> 		}
> 	}
>
> 	return TRUE;
> }
>
> void COGLContext::ReleaseCurrent()
> {
> 	wglMakeCurrent(NULL, NULL);
> }
>
>
>
> after a while , most of the times in Release build the Drawing thread
> is freezed.
> Last code statement is wglMakeCurrent(NULL, NULL);
>
> It seems that the thread is stuck in the Video adapter dll......
>
> here is the call stack
>
>
Code:
>
> nvoglnt.dll!6977f56a()
>  	nvoglnt.dll!6977fae7()
>  	nvoglnt.dll!697812fd()
>  	gdi32.dll!77f1c55e()
>  	gdi32.dll!77f1c55e()
>  	ntdll.dll!7c912c06()
>  	ntdll.dll!7c910098()
>  	ntdll.dll!7c910021()
>  	ntdll.dll!7c91003d()
>  	kernel32.dll!7c812c2a()
>  	kernel32.dll!7c812c3d()
>  	nvoglnt.dll!69765661()
>  	nvoglnt.dll!6956ddcb()
>  	nvoglnt.dll!6975b956()
>  	gdi32.dll!77f1b271()
>  	gdi32.dll!77f1b297()
>  	ntdll.dll!7c91003d()
>  	nvoglnt.dll!6957c415()
>  	gdi32.dll!77f1b821()
>  	gdi32.dll!77f1b7da()
>  	gdi32.dll!77f16e1d()
>  	gdi32.dll!77f16f0a()
>  	gdi32.dll!77f16e71()
>  	nvoglnt.dll!698e792c()
>  	gdi32.dll!77f1c573()
>  	gdi32.dll!77f1c553()
>  	gdi32.dll!77f1c55e()
>  	nvoglnt.dll!698e5d5a()
>  	nvoglnt.dll!69780bd8()
>  	nvoglnt.dll!6978142f()
>  	nvoglnt.dll!6977e7b5()
>  	nvoglnt.dll!6977ed49()
>  	nvoglnt.dll!6977f464()
>  	nvoglnt.dll!6977fae7()
>  	nvoglnt.dll!697812fd()
>  	nvoglnt.dll!6978130f()
>  	nvoglnt.dll!69781316()
>  	gdi32.dll!77f1b271()
>  	nvoglnt.dll!6973eee3()
>  	nvoglnt.dll!69763005()
>  	nvoglnt.dll!69765ab6()
>  	nvoglnt.dll!69743f92()
>  	nvoglnt.dll!6973b81c()
>  	nvoglnt.dll!69743f9c()
>  	nvoglnt.dll!6979f5f2()
>  	nvoglnt.dll!69794ddc()
>  	nvoglnt.dll!695916b9()
>  	nvoglnt.dll!6957c13d()
>  	nvoglnt.dll!695917dd()
>  	nvoglnt.dll!6959196d()
>  	nvoglnt.dll!695757f1()
>  	nvoglnt.dll!6975f84c()
>  	nvoglnt.dll!6975f942()
>  	nvoglnt.dll!6975fa34()
>  	nvoglnt.dll!695c8c9a()
>  	opengl32.dll!5ed19bef()
>  	user32.dll!7e4184ba()
>  	user32.dll!7e4186be()
>  	UIFramework.dll!COGLContext::ReleaseCurrent()  Line 1268	C++
>> 	UIFramework.dll!CBVRView::_Render(const int bFromUIThread=0)  Line 194 + 0xb	C++
>  	Views.dll!CBaseTacticalView::_Render(const int bFromUIThread=0)
> Line 2475 + 0xd	C++
>  	UIFramework.dll!CBVRView::Render(const int bFromUIThread=0)  Line
> 157	C++
>  	UIFramework.dll!CViewsManager::UpdateViews()  Line 394 + 0x9	C++
>  	UIFramework.dll!CDisplayUpdater::_Update(const int
> iCounter=15660641)  Line 54	C++
>  	UIFramework.dll!CQuotaDisplayUpdaterThread::Update()  Line 54	C++
>  	UIFramework.dll!CQuotaUpdaterThread::Run()  Line 106	C++
>  	MFC71.DLL!7c1b1a13()
>  	MSVCR71.DLL!7c36b381()
>  	gdi32.dll!77f176ab()
>  	MSVCR71.DLL!7c3638e2()
>  	kernel32.dll!7c80b713()
>  	gdi32.dll!77f176ab()
>
>
>
>
> Please assist.
>
> Regard
> Eq.


Not too many systems programmers 'round these parts. Can't remember a
time when there was either... </oldcoot>

You'll stand a better chance with NV developer relations or MSDN honestly.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how is the thread/process awakened after it slept? linq936 Embedded 21 10-16-2007 05:02 AM
Other options other than Entourage for email cline on Mac OS X (Tiger or Panther) pointed to an Exchange Server Davidaarong Apple 6 03-14-2006 01:26 AM
USB modem (CDC ACM) problem on some PCs (hangs) Magnus Nilsson Embedded 2 02-17-2005 04:58 PM
atisgkaf.sys hangs, chkdsk/r hangs at 50% kotya Shuttle 2 11-04-2004 12:30 AM
P4P800-E Deluxe "HANGS" on some apps John Blaustein Asus 4 09-04-2004 07:23 PM


All times are GMT. The time now is 08:03 AM.


Welcome!
Welcome to Motherboard Point
 

Advertisment