its kind of funny situation, my code works, paritaly at least, it runs multiple times, but after a specific number of running times, give or take 1, it collapses with that exit code. so its weird, its not a refrence problem obviously cause then it wouldn't work from the begin with. i tried google the problem but all i got is codes that won't work to begin with. and tried their solutions anyway without any luck. anyone have any idea why after a specific number of times that code would pop?? thanks for the help and part my english if its not understandable. oh yeah, its a c++ project.