WinCE crash after using FPC 2.4 new resource forms
Original Reporter info from Mantis: zaher
-
Reporter name: Zaher Dirkey
Original Reporter info from Mantis: zaher
- Reporter name: Zaher Dirkey
Description:
Wince application can not run on Wince tested on (WM5 WM6) with hidden bug at line in application.inc around
Res := FindResource(HInstance, PChar('MAINICON'), RT_GROUP_ICON);
the bug started with rev#23290
On wince RT_GROUP_ICON and other resource const is typecasting of integer value to pass as PChar parameters FindResource, but string manager try to convert it to ansistring (from PWideChar to PChar) fpc_pwidechar_to_ansistr becuase RT_GROUP_ICON on WinCE made as PWideChar.
aslo related to
http://bugs.freepascal.org/view.php?id=8375
Additional information:
-----------------------------------------------------
child process -13636 In: SYSTEM_INDEXWORDformal
LONGIN* Line: ?? PC: 0x12b78
30c2000:ossvcs.dll
3106000:oleaut32.dll
2f8a000:ws2.dll
7ffe1000:coredll.dll.0409.mui
3135000:ole32.dll
3f4d000:coredll.dll
267b000:packageinfoapi.dll
Program received signal SIGSEGV, Segmentation fault.
0x00012b78 in SYSTEM_INDEXWORD$formal$LONGINT$WORD$$LONGINT ()
(gdb) bt
#0 0x00012b78 in SYSTEM_INDEXWORD$formal$LONGINT$WORD$$LONGINT ()
#1 0x0001abb4 in fpc_pwidechar_to_ansistr ()
#2 0x0004267c in TAPPLICATION__INITIALIZE (this=0x1b215b0)
at ./include/application.inc:386
#3 0x00012128 in RUN () at source/Inventory.lpr:36
#4 0x000122a4 in main () at source/Inventory.lpr:50
(gdb)
-----------------------------------------------------
Mantis conversion info:
- Mantis ID: 15665
- Version: 0.9.28.3 (SVN)
- Monitored by: » zaher (Zaher Dirkey)