1
General / Re: Access Violation at Runtime when creating Texture object in Resource Manager
« on: June 19, 2012, 04:20:12 am »
Well this is interesting, thank you for your feedback. I have only heard of the term "singleton" in passing before, but never investigated what it is. I'll have to spend some time figuring this one out, it looks like.
But in the meantime, I moved the content of my ResourceManager constructor into a separate init() function, which I call from main() after creating my RenderWindow, and now it loads just fine! Except, now I find that closing the window is causing an access violation, which may be a completely separate issue. I don't suppose you'd know what would be behind that?
It's giving the error message:
But in the meantime, I moved the content of my ResourceManager constructor into a separate init() function, which I call from main() after creating my RenderWindow, and now it loads just fine! Except, now I find that closing the window is causing an access violation, which may be a completely separate issue. I don't suppose you'd know what would be behind that?
It's giving the error message:
Unhandled exception at 0x774e1c1d in FindingTheProblem.exe: 0xC0000005: Access violation reading location 0xfeeefef6.
and the program flow stops in xmemory at the end of this function: // TEMPLATE FUNCTION _Destroy
template<class _Ty> inline
void _Destroy(_Ty _FARQ *_Ptr)
{ // destroy object at _Ptr
_Ptr->~_Ty();
}
template<class _Ty> inline
void _Destroy(_Ty _FARQ *_Ptr)
{ // destroy object at _Ptr
_Ptr->~_Ty();
}