[fpc-devel] fpc 2.4.2rc1 for Mac crashing in AnsiCompareText

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Nov 3 22:44:57 CET 2010

On 03 Nov 2010, at 22:25, Felipe Monteiro de Carvalho wrote:

> Has anyone been experiencing this one?
> AnsiCompareText is crashing everywhere for me:

I'm not aware of any problems with it. We have a test for it that works fine: http://svn.freepascal.org/svn/fpc/trunk/tests/test/units/sysutils/tastrcmp.pp

> 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.

Nothing has been changed to that code compared to FPC 2.4.0. You probably have a memory corruption issue in your program. The fact that it works fine on another platform does not mean that you do not have a bug in your code.

> 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?

The unit is not automatically included by the compiler or RTL in programs on Mac OS X, if that's what you mean. It probably appears in the uses clause of another unit that your are using (or in your main program).

It is however required on Mac OS X to be able to work with widestrings that contain anything else than plain ASCII.


More information about the fpc-devel mailing list