strange behaviour at test code, memory access violation at address