Monday, March 26, 2012

Most annoying error ever. (Visual Studio Watch Window)

Hi folks.

I just "fixed" the most annoying and strangest error I've faced so far.

I wanted to watch a GameObject object in Visual Studios Watch Window, to see if some attributes were set properly. The strange thing was, that the Watch window constantly showed me very strange result.

I had a function that was like that:

 //...Code  
 gameObject->setSize(32,32);  
 //..Code  
 GameObject::setSize(int w,int h){  
      this->size = Size(w,h);  
 }  

After the above function the watcher would show me something like
gameObject->size        Size -> w: 10000434     h: 10283848 (obviously totally wrong results)

It took me like 3 hours and a good bunch of nerves 'til I figured out that the header files of my engine were outdated in the project folder. I'm not sure how that exactly led to the above error but after I updated the engine header files in the project folder everything went properly again.


SO IF YOU'RE FACING STRANGE RESULTS IN THE WATCH WINDOW OF VISUAL STUDIO, MAKE SURE YOU UPDATE YOUR HEADER FILES OF 3RD PARTY LIBRARIES / FRAMEWORKS BEFORE YOU START WASTING 3 HOURS OF YOUR PRECIOUS LIFE!


Sincerely, the most annoyed person in the world.

5 comments:

  1. Normally I use Pre-Build Events to automaticly update necessary library and header files...Forget it once and suffer 3 hours of insanity -.-

    ReplyDelete
  2. "Haha" he says...I wanna see how you behave watching a line that clearly says x = 20 but then the next line x magically becomes 201203829. Drives you crazy,man!

    ReplyDelete
  3. Good to know! Thanks for sharing! ;) Anika

    ReplyDelete