zengqh / slimdx

Automatically exported from code.google.com/p/slimdx
0 stars 0 forks source link

E_FAIL: An undetermined error occurred (-2147467259) #370

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

just wanted to letting you guys know. I have an 
"E_FAIL: An undetermined error occurred (-2147467259)" on D3D10 when i try
to run your samples in Debug. Seems it's somehow releated to the DEBUG
version of the DirectX runtime, because both MiniTri and SimpleTriangle
Samples work just fine when run in Release mode (well, for MiniTri, i had
to change the initialization code parameter in
D3D10.Device.CreateWithSwapChain from D3D10.DeviceCreationFlags.Debug to
D3D10.DeviceCreationFlags.None; SimpleTriangle has more sophisticated code
and only throws a first-chance exception that can be seen solely in the
Output Window). Any thoughts?

Another thing i noticed was the weird behaviour when wanting to go
fullscreen with ALT-RETURN. Both samples go fullscreen for a moment (while
the device re-inits?) then immediately switch back to window-mode.
SimpleTriangle stays fullscreen (as expected) when pressin F1.

I'm using the Nov SDK 2008.

Original issue reported on code.google.com by 2453...@googlemail.com on 17 Nov 2008 at 11:24

GoogleCodeExporter commented 9 years ago
All you Josh.

Original comment by promit....@gmail.com on 20 Nov 2008 at 9:49

GoogleCodeExporter commented 9 years ago
In the failure cases that involve Debug being set, do you have unmanaged 
debugging
enabled and are you getting any reasonable output from the output window (via 
the
debug runtimes?)

What's the message associated with the exception that appears in the output 
window
(you may need to break-on-throw to see it?)

Original comment by josh.petrie on 1 Dec 2008 at 9:49

GoogleCodeExporter commented 9 years ago
Hi again, 

unmanaged debugging was checked, here's the "full" output:

First-chance exception at 0x779642eb in MiniTri.exe: Microsoft C++ exception:
_com_error at memory location 0x0015e914..
A first chance exception of type 'SlimDX.Direct3D10.Direct3D10Exception' 
occurred in
SlimDX.dll
An unhandled exception of type 'SlimDX.Direct3D10.Direct3D10Exception' occurred 
in
SlimDX.dll

Additional information: E_FAIL: An undetermined error occurred (-2147467259)

Pretty useless, at least for me...Here's the stacktrace:

   bei SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
   bei SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object
dataValue)
   bei SlimDX.Direct3D10.Device.CreateWithSwapChain(Adapter adapter, DriverType
driverType, DeviceCreationFlags flags, SwapChainDescription 
swapChainDescription,
Device& device, SwapChain& swapChain)
   bei MiniTri.Program.Main() in C:\Program Files\SlimDX SDK (November
2008)\Samples\Direct3D10\MiniTri\Program.cs:Zeile 85.
   bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
   bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state)
   bei System.Threading.ThreadHelper.ThreadStart()

Original comment by 2453...@googlemail.com on 8 Dec 2008 at 3:44

GoogleCodeExporter commented 9 years ago
I have been unable to reproduce this. If you don't mind, could you run dxdiag, 
click 
the 'save all information' button, and email the resulting text file to me at 
jpetrie at digipen dot edu (or attach it here if you're okay with that 
information 
being public)?

Original comment by josh.petrie on 8 Jan 2009 at 1:40

GoogleCodeExporter commented 9 years ago
I got the same/similar error. I added file MiniTri.fx to Mike.Popoloski's 
tutorial
but it failed because the file was saved as unicode.

http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=458883&reply_
id=3356346

Original comment by grusi...@gmail.com on 19 Jan 2009 at 1:11

GoogleCodeExporter commented 9 years ago
My previous post was little too hasty but I can produce the exact error.
Changing: D3D10.DeviceCreationFlags.Debug to D3D10.DeviceCreationFlags.None 
removes
the exception and MiniTri works fine. Should I install DirectX SDK?

Original comment by grusi...@gmail.com on 19 Jan 2009 at 5:43

GoogleCodeExporter commented 9 years ago
I don't think Debug works without the SDK installed.

Original comment by promit....@gmail.com on 20 Jan 2009 at 10:20

GoogleCodeExporter commented 9 years ago
Unicode FX files are known to cause the effect compiler to produce strange 
output. If
that's the case here, I'd say it's a known issue.

Original comment by Mike.Popoloski on 20 Jan 2009 at 11:32

GoogleCodeExporter commented 9 years ago
Promit's analysis seems to be correct.

Original comment by josh.petrie on 24 Jan 2009 at 4:12

GoogleCodeExporter commented 9 years ago
Sorry for the long time to answer. After RE-installing the SDK (that's right, i 
had
the SDK installed already), the error is gone. So whenever someone stumbles 
across
this, it might be a good idea to re-install the SDK first before trying anything
else...case closed for me. 

However, just to be on the safe side, could you please upload a Pony sample for 
me to
check out? X-D (Sorry, couldn't resist)

Original comment by 2453...@googlemail.com on 11 Feb 2009 at 1:45

GoogleCodeExporter commented 9 years ago
Hello,

I encountered this problem too, under the following situation:

I'm using DX11, and the examples, and I combined tutorial #2 and #3 into the 
same program.  I then had main call one or the other.

Now the weird thing is it would run #2 just fine, but not #3.  Failing on:
Device.CreateWithSwapChain(...)

But the only difference between the 2 cases was a different buffer count.  I 
set #2 to match #3's buffer count.

And yet #2 would run, but not #3, even though both were doing the exact same 
thing now.  Weird.

I then decided to pull the Device initialization out into its own function, and 
have both #2 and #3 call it.

And guess what?  Both #2 and #3 now work.

No idea what this means, but thought it might be of some use to someone out 
there.

Original comment by email.er...@gmail.com on 11 Aug 2011 at 2:29

GoogleCodeExporter commented 9 years ago
Same problem as 11, problem was on CreateWithSwapChain(), changing the 
parameter from DeviceCreationFlags.Debug to DeviceCreationFlags.None let it 
work.

I'm assuming this is because we don't have something installed correctly.

Original comment by jonathan...@gmail.com on 29 Jan 2012 at 2:22

GoogleCodeExporter commented 9 years ago
You need the DirectX SDK installed in order to use the debugging components. 
Perhaps we should change the samples to not use a debug device to avoid 
confusion for people who just download the samples.

Original comment by Mike.Popoloski on 29 Jan 2012 at 3:50