-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pure virtual function call on resources #23
Comments
I've had quite a number of crash reports on this, mostly all from what looks like the same game/engine so there must be some unique use-path that triggers this (albeit not regularly I don't think). Something is causing the resources passed to IsBoundForWrite or ValidOutputMerger to cause pure virtual function calls when GetResource or GetDesc is called. |
I haven't seen crash reports on this for several months now. Given that I can't do any more without more information than those minidumps, I'm going to close this now and see if it resurfaces with v0.21. |
* Two potential crashes here - one from the previous fix to #503, we would double-release a refcount on an object that was set for write. First we'd decrement the refcount when it was 'unbound', then again trying to unbind it for write because the slot wasn't NULL'd. This was just plain broken. * The second more obscure one was when binding for read. If the external object had no other refcount than the one in the binding slot, then changing its binding would implicitly destroy it. However if the code was setting the same object back again (ie. with the pointer they had not reference to) then the refcount would drop to 0 then should be incremented again to 1 when it's re-bound. However because the count bounces off 0, the object is destroyed between being unbound and re-bound causing pure virtual calls and other crashes when we try to access it. * The fix is first to check if we're binding something to its own slot and skip it. Second we need to keep the new objects ref'd at all times during the binding (in case we are e.g. performing an array bind which moves the 1-refcount object from slot 2 to slot 3. It would be unbound when processing slot 2, hit refcount 0, and then be added again when processing slot 3).
I don't have much information about this, it came in as a crash report so I don't have a fix yet.
It seems like possibly a bound render target is being released somehow while a pointer remains to it, so when unsetting it from the pipeline in the OMSetRenderTargets call a pure virtual function call is made.
If you see this bug please get in touch :).
The text was updated successfully, but these errors were encountered: