Hi!
I have a problem in my game. I have array:
Code:
Button answerButton[2];
I'm creating all 3 buttons, but when i'm creating last i got error:
Code:
Unhandled exception at 0x006363e5 in cRPG.exe: 0xC0000005: Access violation reading location 0x00000000.
and green arrow shows me this line:
Code:
Button& create(Rect &rect,Str text=CNULL){create(text).setRect(rect); return T;} // create and set rectangle
in
Button.h.
But, when i have an array with 4 members:
Code:
Button answerButton[3];
and I'm creating only 3 everything works OK.
One more:
When i"m exiting my game i got this error:
Code:
Unhandled exception at 0x005d2b4d in cRPG.exe: 0xC0000005: Access violation writing location 0x0000000b.
And it can show code because this code in unavailable.
When I'm choose to show disassembly i got this:
Code:
EE::Str16::clear:
005D2B40 mov eax,ecx
005D2B42 mov ecx,dword ptr [eax]
005D2B44 xor edx,edx
005D2B46 cmp ecx,edx
005D2B48 je EE::Str16::clear+11h (5D2B51h)
005D2B4A push esi
005D2B4B xor esi,esi
005D2B4D mov word ptr [ecx],si <----- ARROW HERE
005D2B50 pop esi
005D2B51 mov dword ptr [eax+4],edx
005D2B54 ret
005D2B55 int 3
005D2B56 int 3
005D2B57 int 3
005D2B58 int 3
005D2B59 int 3
005D2B5A int 3
005D2B5B int 3
005D2B5C int 3
005D2B5D int 3
005D2B5E int 3
005D2B5F int 3