NO

Author Topic: Access Violation with double  (Read 5803 times)

alextus

  • Guest
Access Violation with double
« on: March 08, 2010, 08:24:37 PM »
Hi,

Pelles IDE: Version 6.00.4
RSRC0009.DLL: Version 6.00.0
SUPPORT.DLL: Version 6.00.0
CFORMAT.DLL: Version 6.00.1
PORC.DLL: Version 6.00.0
POBR.DLL: Version 6.00.1
SQLITE3.DLL: Version 3.6.12
POCC.EXE: Version 6.00.6
POASM.EXE: Version 6.00.4
POLINK.EXE: Version 6.00.1
IDESPAWN.EXE: Version 6.00.0

I get this exception:
ODS: Data Abort: Thread=96a8aacc Proc=80097210 'delme.exe'
ODS: AKY=00020001 PC=000110e4(delme.exe+0x000010e4) RA=000110d0(delme.exe+0x000010d0) BVA=24000004 FSR=00000407
Exception: Access Violation

when executing next code. It only happens when the project type is PocketPC Exe, but when the type is Win32 Exe the is no error.

Code: [Select]
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR pCmdLine, int nShowCmd)
{
WCHAR buf[30];
double a, b, c, bc;

a = wcstod(L"3", 0);
b = wcstod(L"4", 0);
c = wcstod(L"5", 0);

bc = b * b + c * c - a * a;
bc = bc / (2 * b * c);

swprintf(buf, L"bc=%f", bc);
MessageBox(0, buf, 0, 0);

return 0;
}

Can anyone tell me what is wrong? Is it the code itself or the compiler?

Kaljj

  • Guest
Re: Access Violation with double
« Reply #1 on: March 10, 2010, 08:04:20 PM »
Hello Alextus,

i don't know it is right for you.

But I have a Problem with the double and the ARM-processor.
Follow this Link http://forum.pellesc.de/index.php?topic=3000.msg11407#msg11407
If this the same Error use the Version 5.

good luck
Kaljj

alextus

  • Guest
Re: Access Violation with double
« Reply #2 on: March 11, 2010, 09:51:08 AM »
If this the same Error use the Version 5.

Hi,
I tested the code with Version 5 IDE. It worked well. So that probably was not the code fault.
Thanks for your suggestion.