I\'m having a memory related issue. Very strange behavior where initializing a for loop with stack variables is somehow changing values in heap memory. Never seen anything l