Hi, i'm developing an application on embedded Visual C++ 4 sp4 under windows CE.NET, and everithing works fine, but after a while the program crashes in the next line
dataBloqueptr->data = new unsigned __int8 [total];
telling me that an 0xC0000005 Access Violation has happenned, the strange thing is that by the time the program crashes the line and the function that contains it have been executed a lot of times without problem.
So please, can you tell me how to debug this problem, and what does it means the error, i think there's a problem with memory allocation, but i have checked over and over and i'm pretty sure that i'm not using null pointers.
I also have noticed that when i debug my program step by step the error never appear, does this mean something
Thanks in Advance.

0xC0000005 Access Violation
D.A.C.
SWB108
Bendoke
Acces to uneven memory adresses is not allowed within some ARM CPU.
If you use pointers to memory blocks which acces unaligned meory define the as UNALIGNED.
char * UNALIGNED tszMemoryCharBUF
I had some problems with this and this is how I solved it.
I also changed the default struct member alignment to 1 Byte in the project options.
The UNALIGNED keyword will cause the compiler to optimize the memory acces.
On normal deskstop CPU you dont have this problem as the processor fixes this.
The uneven mermoy acces can give you problems anywhere in youre code!
Hope this can Help
MattClayF
Olafje,
That's a good point. I've seen this. The errors that I saw with this problem were called "Unaligned memory" exceptions in eVC.
Jason Prell
i have a similiar problem..
when i switch from debug to release mode..
then it give me this crash..
the cause is because of PostMessage i used...
but i dun know why PostMessage could cause this crash..
issit because of the windows handler that i pass into the PostMessage is invalid
alll
Eric Jarvi
I have lost my toolbar and all my desktop icons. I can only access the Task Manager by pressing Ctrl, Alt and Del. But how do I 'hit the task' until my desktop icons reappear Any help would be appreciated.
Thanks
Tom Kelley
Arun79
i am having the same problem, code that works fine, stops working saying this access violation, it makes no sense, definitely its some memory problem, but what and how to solve, if you have found a solution, could you please tell me 2.
Thanks
Abhi