Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualcdoty

Posted 21 June 2013 - 06:31 PM

Something might be corrupting the stack pointer. If the stack pointer is pointing at a bad location, the operating system might throw an exception error and neither value could be determined.

 

Using the stack frame, the compiler would know to look at the next sack position for height, so that doesn't make sense. I can't remember what order the parameters are pushed but you would end up with something like this on the stack:

sp-12: height

sp-8: width

sp-4: saved PC

 

If it was just referring to the same value, it should show 1920 for both.

 

Another idea, if you're compiling in release mode, you can't trust what the compiler is showing you. Optimization can make it hard for the debugger to determine where things are pointing.


#1cdoty

Posted 21 June 2013 - 06:30 PM

Something might be corrupting the stack pointer. It the stack pointer is pointing at a bad location, windows might through and exception error and neither value could be determined.

 

Using the stack frame, the compiler would know to look at the next sack position for height, so that doesn't make sense. I can't remember what order the parameters are pushed but you would end up with something like this on the stack:

sp-12: height

sp-8: width

sp-4: saved PC

 

If it was just referring to the same value, it should show 1920 for both.

 

Another idea, if you're compiling in release mode, you can't trust what the compiler is showing you. Optimization can make it hard for the debugger to determine where things are pointing.


PARTNERS