ok I expanded it and same thing happens, it crashes on Release(), but when I remove the line afterwards that sets it to 0/NULL the other error appears.There's
at the top of the call stack, so I guess there's something wrong in the COM?I don't think I initialized it wrong tho, just used EnumOutputs, I check the HRESULT and it's ok
edit: I tried to use IDXGIOutput1 too instead of IDXGIOutput, but I EnumOutputs() doesn't take IDXGIOutput1 as an argument, it wants an IDXGIOutput, or is IDXGIOutput1 a special case and used in a different way?
I check breakpoint by breakpoint the pointer addresses, all of the IDXGI objects seem to be getting created with valid addresses(they're not 0x00000000 or anything similar)
Ok I fixed it, DXGIOutput outputInterface = DXGIOutput(output); should have been DXGIOutput* outputInterface = new DXGIOutput(output); otherwise it gets destroyed in the end of the frame and then I do adapterOutputs.Add(&outputInterface); I was adding a pointer to an already destroyed object (facepalm).