Hello,
Has anyone been experiencing this one?
AnsiCompareText is crashing everywhere for me:
procedure TOPSkins.FillChairInfo(ASkinName: string; AChairIndex,
AChairCount: Integer;
var ASeat: TSeatModel);
begin
..
// First fill size and button position
// From Skins/Chairs/
if AnsiCompareText(ASkinName, 'Chair01') = 0 thenWith:
Breakpoint 1, 0x000210ff in fpc_raiseexception ()
(gdb) bt
#0 0x000210ff in fpc_raiseexception ()
#1 0x000bd434 in SYSUTILS_RUNERRORTOEXCEPT$LONGINT$POINTER$POINTER () #2 0x000250d8 in SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER () #3 0x00031cd7 in CTHREADS_CENTERCRITICALSECTION$formal () #4 0x00027a66 in SYSTEM_ENTERCRITICALSECTION$TRTLCRITICALSECTION () #5 0x000ed282 in CWSTRING_ANSICOMPARETEXT$ANSISTRING$ANSISTRING$$LONGINT () #6 0x00060f1c in TOPSKINS__FILLCHAIRINFO (ASKINNAME=0x397eb4, ACHAIRINDEX=0, ACHAIRCOUNT=8, ASEAT={CHAIRCENTERPOS = {X = 0, Y = 0}, CHAIRPOS = {X = 0, Y = 0}, CHAIRSIZE = {CX = 0, CY = 0}, CHAIRBUTTONPOS = {X = 0, Y = 0}, CHIPSPOS = {X = 0, Y = 0}, CHAIRMIRROREDX = false, CHAIRMIRROREDY = false, SEATHINT = 0x0, POTPOS = {X = 0, Y = 0}, CARDPLACE = {X = 0, Y = 0}, SEATSTATUS = SSVACANT, AVATAR = {NICKNAME = 0x0, INPLAYAMOUNT = 0x0, LOCATION = 0x0, STATUS = 0x0}, HAND = 0x0, BET = {VALUE = 0x0, PILES = {0x0, 0x0, 0x0, 0x0}}}, this=0x27ed2c0) at opcskins.pas:1628
The object is valid, and the same code works perfectly in Windows. I don't remember any crashes like that with fpc 2.4.1 previously, but unfortunately I threw away my fpc 2.4.1 installer. FPC 2.4.0 can't be used with this project because jpeg crashes.
I tryed to remove the use of AnsiCompareText from my code, but then it just crashes inside the LCL in places where AnsiCompareText is used =(
Even in trivial code such as creating a component:
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000094 0x000268c5 in SYSTEM_WAITFREE_FIXED$PMEMCHUNK_FIXED$POSCHUNK () (gdb) bt
#0 0x000268c5 in SYSTEM_WAITFREE_FIXED$PMEMCHUNK_FIXED$POSCHUNK () #1 0x00026989 in
SYSTEM_SYSFREEMEM_FIXED$PFREELISTS$PMEMCHUNK_FIXED$$LONGWORD () #2 0x000ebc2d in CWSTRING_ANSICOMPARETEXT$ANSISTRING$ANSISTRING$$LONGINT () #3 0x000adefb in
CLASSES_TSTRINGLIST_$__DOCOMPARETEXT$ANSISTRING$ANSISTRING$$LONGINT () #4 0x001815b0 in TLCLCOMPONENT__NEWINSTANCE (pvmt=0x4a32f0 <VMT_CUSTOMDRAWNEXTRAS_TBITMAPPEDBUTTON>) at lclclasses.pp:118 #5 0x00294208 in TCUSTOMBITMAPPEDBUTTON__CREATE (AOWNER=0x0, vmt=0x4a32f0, this=0x0) at customdrawnextras.pas:313
I also tryed to remove the use of cwstrings from the LCL via define, but it still crashes with the same stack. Is the unit mandatory in Mac?
bye,
