edgar-mtz-e / slimdx

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

Sample Framework crashes when window is moved #440

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I just got the latest version of the SlimDX repository and noticed that if
I run the DirectX 10 Simple Triangle demo, the application crashes if I
move the window.

The crash happens in ComObj.cpp Line 71:

    IUnknown* ComObject::UnknownPointer::get()
    {
        return m_Unknown;
    }

Hope this helps
Marcel

Original issue reported on code.google.com by good...@goodfun.org on 22 Feb 2009 at 8:49

GoogleCodeExporter commented 9 years ago
We know what the problem is. It's just a matter of fixing it now.

Original comment by Mike.Popoloski on 26 Feb 2009 at 4:09

GoogleCodeExporter commented 9 years ago
Holy ancillary object screwup, Batman!

(Probably need to add a forced release of device-related ancillaries during 
reset path)

Original comment by josh.petrie on 26 Feb 2009 at 5:15

GoogleCodeExporter commented 9 years ago
(also apparently picks up the wrong ctor via reflection)

Original comment by josh.petrie on 26 Feb 2009 at 5:32

GoogleCodeExporter commented 9 years ago
Mike, I need to talk to you about this, I don't believe you analysis is 
completely correct.

Original comment by josh.petrie on 1 Mar 2009 at 5:21

GoogleCodeExporter commented 9 years ago
Here's what happened: the reflection *was* selecting the wrong overload 
(conceptually). However, there was currently no harm in selecting that overload 
as 
the differences in FromPointer overloads didn't matter for this scenario.

However, it is no longer an error to immediately Release() the IUnknown within 
GetBuffer<T>(), since we aren't doing an AddRef() (which is why the comments 
claim 
the Release() was there).

This should be fixed now.

Original comment by josh.petrie on 9 Mar 2009 at 4:15

GoogleCodeExporter commented 9 years ago
Confirmed fixed, at least in my case I don't get an error anymore when moving 
the window.

Thanks
Marcel

Original comment by good...@goodfun.org on 10 Mar 2009 at 12:03