debug and segmentation fault

when I start my project in natural way, it gives me error:

Process finished with exit code -1073741819 (0xC0000005)

but if I start it in debug, it's all ok and process finishes with 0 code

It's strange, isn't it?
It's strange, isn't it?

Nope.
Last edited on
why?
I'm asking about error of my project since 15 days ago..
It's strange, isn't it?
No, there are differences between release and debug. Otherwise they wouldn't exists.

One difference might be, that variables are initialized by default in the debug version while in the release they are not.

0xC0000005 means 'access violation'. Maybe there is an [uninitialzed] index out of bounds.
> I'm asking about error of my project since 15 days ago..
you really need to learn how to ask
¿what project? ¿what input causes the error? ¿where's the source code?
debug often also adds a buffer in memory around all variables, empty padded space or it may have a bit pattern or something, and it uses that to catch your out of bounds goofs somewhat.
so if you had an int array of 1,2,3 it may put like 0xC0C0C0C0 or something after the 3 in an extra hidden location and if that value changes, you messed up and it tells you so. In release, you would just have the 3 locations and the 4th could be out of bounds, or another variable, or whatever else, and tampering with it gets you a crash. Or worse, it may not crash and 'work' with some subtle bug.
you really need to learn how to ask


What do you mean?

I was answering to Ganado that said
Possible duplicate of http://www.cplusplus.com/forum/general/267437/

I was telling that's not a duplicate
Yeah I wasn't being very serious; I was just suggesting it might be the same issue based on your vague description.
I guess it's not. More likely it's what coder777 said.
Last edited on
Topic archived. No new replies allowed.