-
Notifications
You must be signed in to change notification settings - Fork 80
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
Read Access Violation in Window::RegisterCallbacks() #13
Comments
It looks like you've made some changes to the code. For example, Also, when using |
Sorry, I guess that was my mistake when trying to copy-paste the code and trying to get the code snippet to work. My code does have the template assigned. `void Window::RegisterCallbacks(std::shared_ptr<Game arg_pGame)
} Same goes for the class declarations as follows:
I tried changing the weak_ptr m_pGame to shared_ptr m_pGame, and commenting out the locks. but still, I get a similar error for Read Access violation. Some of the ComPtr Objects are uninitialized at this point. Is that to be expected or have I bungled the code? |
I believe I made a grave error in the code. Apparently, my window initialization was incorrect and I was using invalid handles to the Window to initialize the rest of the code. Thank you so much for bearing my ineptitude. And a million thanks for writing these tutorials! |
Hi,
I am getting a read access violation when I reach this line;
`void Window::RegisterCallbacks(std::shared_ptr arg_pGame)
{
m_pGame = arg_pGame; //Read Access violation here
}
`
I am new to this, but my hunch is that since we are passing it "shared_from_this", it may not be move assignable. I could be completely wrong too.
How would I fix it?
The text was updated successfully, but these errors were encountered: