Re: [fpc-pascal] CMem issue?

2016-03-08 Thread dinmil
I use CodeTyphon for programming. New version have similar error. CodeTyphon-570 use FreePascal 3.1.1 Source 02-03-2016 SVN Rev 33143 with some modification by CT people. For CT-570 I use solution like this. Basically remove cmem when in debug mode. For production (without debug) use cmem. progra

Re: [fpc-pascal] TStringHelper.Split() issue?

2016-03-08 Thread Rik van Kekem
Michael Van Canneyt wrote: On FPC, it returns 1, on Delphi, it returns 2. And debuging the "splited" variable, on FPC I get only and "x" value, Delphi "x" and "y". Is this a bug? Yes. Quite strange, because I have testcases for this ? And content: string = 'x:yb'; does work correctly. The

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread Bart
On 3/8/16, silvioprog wrote: > Can you test this attached program? Builds and runs fine, both 64 and 32 bit, inside and outside the debugger. Tested on Win7-64. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.o

Re: [fpc-pascal] AnsiCompareStr question (again...)

2016-03-08 Thread Jonas Maebe
MARCOU Gilles wrote on Tue, 08 Mar 2016: Sorry for my last post, I missed some reply. I think that I understood now the problem. Using TStringList.Sort, it uses AnsiCompareStr which needs a specific widestring manager to be defined. This is done adding the unit cwstring in the program unit

Re: [fpc-pascal] AnsiCompareStr question (again...)

2016-03-08 Thread MARCOU Gilles
Sorry for my last post, I missed some reply. I think that I understood now the problem. Using TStringList.Sort, it uses AnsiCompareStr which needs a specific widestring manager to be defined. This is done adding the unit cwstring in the program unit (the .lpr using Lazarus). A better option, if

Re: [fpc-pascal] TStringHelper.Split() issue?

2016-03-08 Thread silvioprog
On Tue, Mar 8, 2016 at 12:09 PM, Michael Van Canneyt wrote: [...] > Please report a bug ! Done as #29798 . -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, silvioprog wrote: On Tue, Mar 8, 2016 at 9:29 AM, Bart wrote: On 3/8/16, silvioprog wrote: (my environment: Lazarus 1.7 rUnknown FPC 3.1.1 i386-win32-win32/win64) I can run simple Lazarus GUI program that uses CMem. Lazarus 1.7 r51837 FPC 3.0.0 i386-win32-win32/win6

Re: [fpc-pascal] TStringHelper.Split() issue?

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, silvioprog wrote: On Tue, Mar 8, 2016 at 12:03 PM, Michael Van Canneyt wrote: [...] Yes. Quite strange, because I have testcases for this ? It happens only when the second part of string has only one character, two or more (eg "content: string = 'x:yy'") it works.

Re: [fpc-pascal] TStringHelper.Split() issue?

2016-03-08 Thread silvioprog
On Tue, Mar 8, 2016 at 12:03 PM, Michael Van Canneyt wrote: [...] > > Yes. Quite strange, because I have testcases for this ? It happens only when the second part of string has only one character, two or more (eg "content: string = 'x:yy'") it works. -- Silvio Clécio __

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread silvioprog
On Tue, Mar 8, 2016 at 9:48 AM, Michael Van Canneyt wrote: [...] > Linux, 64 bit. I'll check it on my Xubuntu ... -- Silvio Clécio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-p

Re: [fpc-pascal] TStringHelper.Split() issue?

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, silvioprog wrote: Hello, Just test this code below: === code === program Project1; {$mode delphi} uses SysUtils; var content: string = 'x:y'; splited: TArray; begin splited := content.Split([':']); WriteLn(Length(splited)); ReadLn; end. === /code === On FPC, i

[fpc-pascal] TStringHelper.Split() issue?

2016-03-08 Thread silvioprog
Hello, Just test this code below: === code === program Project1; {$mode delphi} uses SysUtils; var content: string = 'x:y'; splited: TArray; begin splited := content.Split([':']); WriteLn(Length(splited)); ReadLn; end. === /code === On FPC, it returns 1, on Delphi, it returns 2.

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, silvioprog wrote: On Tue, Mar 8, 2016 at 8:42 AM, Michael Van Canneyt wrote: [...] I tried that and the code runs fine on my system. Linux? (my environment: Lazarus 1.7 rUnknown FPC 3.1.1 i386-win32-win32/win64) Linux, 64 bit. Michael.

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread Bart
On 3/8/16, silvioprog wrote: > (my environment: Lazarus 1.7 rUnknown FPC 3.1.1 i386-win32-win32/win64) I can run simple Lazarus GUI program that uses CMem. Lazarus 1.7 r51837 FPC 3.0.0 i386-win32-win32/win64. (32-bit) Bart ___ fpc-pascal maillist -

Re: [fpc-pascal] How do I test the testfppdf on Windows?

2016-03-08 Thread silvioprog
On Sun, Mar 6, 2016 at 6:30 AM, Luca Olivetti wrote: > El 06/03/16 a les 10:15, Michael Van Canneyt ha escrit: > >> Strange, because if I recall correctly it was tested with Cyrillic, and >> that worked ? >> >> Later I will try with other readers. >>> >> >> Please do, I'd welcome any hints as to

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread silvioprog
On Tue, Mar 8, 2016 at 8:42 AM, Michael Van Canneyt wrote: [...] > I tried that and the code runs fine on my system. Linux? (my environment: Lazarus 1.7 rUnknown FPC 3.1.1 i386-win32-win32/win64) -- Silvio Clécio ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, silvioprog wrote: On Tue, Mar 8, 2016 at 4:02 AM, Sven Barth wrote: [...] *Always* put an alternate memory manager as the first unit. I think that requirement is even documented somewhere... Thanks for share this information. Also don't use -gh with alternate memory

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread silvioprog
On Tue, Mar 8, 2016 at 5:54 AM, Michael Van Canneyt wrote: [...] > First paragraph. > > http://freepascal.org/docs-html/current/rtl/cmem/index.html This Sven explanation below should be added there too: 'Also don't use -gh with alternate memory managers. They are *both* memory managers and thu

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread silvioprog
On Tue, Mar 8, 2016 at 4:02 AM, Sven Barth wrote: [...] > *Always* put an alternate memory manager as the first unit. I think that > requirement is even documented somewhere... > Thanks for share this information. > Also don't use -gh with alternate memory managers. They are *both* memory > mana

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread silvioprog
On Mon, Mar 7, 2016 at 10:09 PM, Bart wrote: > On 3/8/16, silvioprog wrote: > > I got an AV in the CMem unit. To reproduce the problem just compile and > run > > this code below: > > > > === code === > > > > program project1; > > > > {$mode delphi} > > > > uses > > Classes, SysUtils, cmem; > >

Re: [fpc-pascal] CMem issue?

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, Sven Barth wrote: Am 08.03.2016 01:51 schrieb "silvioprog" : Hello, I got an AV in the CMem unit. To reproduce the problem just compile and run this code below: === code === program project1; {$mode delphi} uses Classes, SysUtils, cmem; [Snip] === /code ===