Jump to content

  • Log In with Google      Sign In   
  • Create Account


unhandled exception CreateWindow()


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 lomateron   Members   -  Reputation: 339

Like
0Likes
Like

Posted 25 April 2014 - 06:33 AM

It doesn't matter which directx 10 sample of the 2010 Directx SDK I try to run in debugging mode on visual studio 2013 or 2010 or 2012, I always get an unhandled exception on the CreateWindow() function

I didn't get this exception before and I don't know how it started

anyone with this problem too?


Edited by lomateron, 25 April 2014 - 06:37 AM.


Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7235

Like
0Likes
Like

Posted 25 April 2014 - 06:43 AM

Could you post the exception ?



#3 lomateron   Members   -  Reputation: 339

Like
0Likes
Like

Posted 25 April 2014 - 06:48 AM

running the RaycastTerrain sample in the directx 10 samples

 

First-chance exception at 0x1000238E (DestructionView.dll) in RaycastTerrain.exe: 0xC0000005: Access violation writing location 0x00000000.
First-chance exception at 0x1000238E (DestructionView.dll) in RaycastTerrain.exe: 0xC0000005: Access violation writing location 0x00000000.
First-chance exception at 0x1000238E (DestructionView.dll) in RaycastTerrain.exe: 0xC0000005: Access violation writing location 0x00000000.
First-chance exception at 0x73374D66 in RaycastTerrain.exe: 0xC0000005: Access violation reading location 0x00000010.
 
 
 *** An Access Violation occurred in "F:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D10\RaycastTerrain\Debug\RaycastTerrain.exe" :
 
The instruction at 0000000073374D66 tried to read from an invalid address, 0000000000000010
 
 *** enter .exr 000000000024B9B0 for the exception record
 ***  enter .cxr 000000000024B4C0 for the context
 *** then kb to get the faulting stack
 
Unhandled exception at 0x73374D66 in RaycastTerrain.exe: 0xC000041D: An unhandled exception was encountered during a user callback.
 

and this is the line that is the same no matter which sample I run

 

HWND hWnd = CreateWindow( L"Direct3DWindowClass", strWindowTitle, WS_OVERLAPPEDWINDOW,
                                                  x, y, ( rc.right - rc.left ), ( rc.bottom - rc.top ), 0,  hMenu, hInstance, 0 );

Edited by lomateron, 25 April 2014 - 06:50 AM.


#4 NightCreature83   Crossbones+   -  Reputation: 2754

Like
1Likes
Like

Posted 25 April 2014 - 07:02 AM

You are passing a pointer somewhere that is 0 and shouldnt be zero. This 0xC0000005: Access violation writing location 0x00000000 exception always means you are trying to write to something through a pointer that has value 0.

 

I expect either strWindowTitle, hMenu or hInstance to be 0.


Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, Mad Max

#5 lomateron   Members   -  Reputation: 339

Like
0Likes
Like

Posted 25 April 2014 - 07:04 AM

but I haven't modified those samples, and as I said no matter which random sample I select, It allways gets that exception



#6 BitMaster   Crossbones+   -  Reputation: 3919

Like
0Likes
Like

Posted 25 April 2014 - 07:15 AM

You are passing a pointer somewhere that is 0 and shouldnt be zero. This 0xC0000005: Access violation writing location 0x00000000 exception always means you are trying to write to something through a pointer that has value 0.
 
I expect either strWindowTitle, hMenu or hInstance to be 0.


Actually, considering the text

Unhandled exception at 0x73374D66 in RaycastTerrain.exe: 0xC000041D: An unhandled exception was encountered during a user callback.


I would be more inclined to believe the window procedure is null or does something with something null.

#7 Buckeye   Crossbones+   -  Reputation: 4584

Like
1Likes
Like

Posted 25 April 2014 - 08:58 AM

Although the last error occurs during the execution of the CreateWindow function, that may just be the culmination of the previous errors. I.e., something else may be getting trashed before that line.

 

I would start by looking at the exceptions before that line.

 

E.g., googling indicates DestructionView.dll is a part of NVIDIA PhysX. That library looks suspicious to be part of an SDK example. Have you been working with that library before? Driver libraries do get loaded, but I would look at those errors before worrying about a CreateWindow function.

 

I don't know what IDE you're working in (Visual Studio?), but (just a guess) it appears that you may be loading a foreign (foreign to the example) library for some reason. When you start the app, your output window (or debug window) should be displaying lots of information about what libraries are being loaded. Take a look through that info for dlls, etc., that don't come from Windows or the SDK directories. EDIT: don't worry about "Cannot find or open the PDB file" - that's just an indication that debug builds for those libraries aren't available.


Edited by Buckeye, 25 April 2014 - 09:02 AM.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.


#8 lomateron   Members   -  Reputation: 339

Like
0Likes
Like

Posted 25 April 2014 - 06:40 PM

I solved the problem
there is this folder named F:\Users\AppData\Local\Owfics which has two files, one is DestructionView.dll and the other is DestructionView.2
when I run a sample in debig mode the last loaded line loads that DestructionView.dll and from there the errors start
I tried deleting that folder but it said that it was being used by a program, then I made myself sure that there was no program running and then tried deleteng it and it said the same, so I rename the folder and the files then restarted my computer and the first message that appears in my screen is this error message
RegSvr32
The module F:\Users\AppData\Local\Owfics\DestructionView.dll failed to load
Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.
The specified module could not be found.
 
I pressed ok to the message
Then I opened a random sample to run it in debug mode and IT WORKED!!!
the last loaded lines no longer is a load to DestructionView.dll
 
but now every time I turn on my PC the RegSvr32 error message appears

Edited by lomateron, 25 April 2014 - 06:50 PM.


#9 Buckeye   Crossbones+   -  Reputation: 4584

Like
0Likes
Like

Posted 25 April 2014 - 09:14 PM

FYI - as mentioned, it appears that destructionview.dll is an NVIDIA Physx Lab file. You didn't mention whether you'd ever played around with Physx.

 

If you can verify for yourself that you don't need that dll running, you may want to take a look at some RegSrvr32 info. Just for fun, you may want to scan the files with your antivirus program - just in case.


Edited by Buckeye, 25 April 2014 - 09:17 PM.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS