Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 25-10-2008
Member
 
Join Date: Mar 2008
Posts: 177
Unhandled exception

When I try to end my program, which is written in VC++6.0 and runs on WinXP,
I get an error message "Unhandled exception with my.exe (NTDLL.DLL). Access
violation." My code is like this:
case WM_DESTROY:

Code:
{
// tell the rendering loop to terminate itself
EnterCriticalSection(&csThreadSafe);
rsRenderData.bTerminate = TRUE;
rsRenderData.bModifyFlag = TRUE;
LeaveCriticalSection(&csThreadSafe);

WaitForSingleObject(hThreadHandle, 5000);

DeleteCriticalSection(&csThreadSafe);

delete pScene;

glDeleteLists(nFontList, 12;

// shut down OpenGL Rendering context
wglMakeCurrent(hDC, 0);
wglDeleteContext(hRC);

ReleaseDC(hWnd, hDC);
PostQuitMessage(0);
}

Can anyone give me some suggestion what might be the problem?

Thanks
Reply With Quote
  #2  
Old 25-10-2008
Member
 
Join Date: Oct 2008
Posts: 55
Re: Unhandled exception

I suggest that you try a debugger, if that doesn't help then try removing
code until you eliminate the problem, that should give you a clue as to
which line is causing the problem. If you are still stuck ask in a Windows
programming group such as comp.os.ms-windows.programmer.win32.
Reply With Quote
  #3  
Old 25-10-2008
Member
 
Join Date: Mar 2008
Posts: 429
Re: Unhandled exception

The first problem is that you're asking about this in the wrong place. We only discuss ISO standard C++

The place to ask about Windows programming issues is newsgroup comp.os.ms-windows.programmer.win32
Reply With Quote
  #4  
Old 25-10-2008
kex kex is offline
Member
 
Join Date: May 2008
Posts: 143
Re: Unhandled exception

i got the answer
as i faced the same access violation problem
at EnetrCriticalSection(&urobject)

u created object its nice but .., u did EnterCriticalSection(&urobject);
without initialising the object for the critical section
u have to do InitializeCriticalSection(&urObject);
i.e..,
CRITICAL_SECTION urobject;
InitializeCriticalSection(&urObject);
EnterCriticalSection(&urobject);
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Unhandled exception"
Thread Thread Starter Forum Replies Last Post
Getting Unhandled Exception Error Number: ib acer Chillam Portable Devices 3 22-02-2011 08:11 AM
NAT IP .Net Framework Unhandled exception error ashenoy Software Development 9 24-08-2010 04:04 PM
AxAcroPDF throws unhandled exception on click of TAB Who is it Windows Software 5 14-07-2010 03:38 AM
Internet Explorer Unhandled Exception Error savio Technology & Internet 3 23-12-2009 06:46 PM
an unhandled win32 exception occurred in explorer.exe meditative MediaCenter 2 06-10-2008 07:33 AM


All times are GMT +5.5. The time now is 04:36 PM.