Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

#Actuallride

Posted 22 November 2012 - 11:34 PM

I have this piece of code. This is called once every frame
[source lang="cpp"] //While there is a message to deliverwhile(messageQueue.top().dispatchTime<=currentTime && !messageQueue.empty()) { //deliver the message messageQueue.top().receiver->handleMessage(messageQueue.top()); //delete the message messageQueue.pop(); }[/source]

This works fine in release, but when I run in debug mode, I soon get an assertion failure: "Debug Assertion Failed! vector iterator not dereferencable"

#1lride

Posted 22 November 2012 - 11:32 PM

I have this piece of code. This is called once every frame
[source lang="cpp"] while(messageQueue.top().dispatchTime<=currentTime && !messageQueue.empty()) { messageQueue.top().receiver->handleMessage(messageQueue.top()); messageQueue.pop(); }[/source]

This works fine in release, but when I run in debug mode, I soon get an assertion failure: "Debug Assertion Failed! vector iterator not dereferencable"

PARTNERS