### Bookstore

 Computer Math and Games in Pascal (preview) Lazarus Handbook

### Author Topic: We are planning the next release: Lazarus 2.0.2  (Read 20187 times)

#### bylaardt

• Sr. Member
• Posts: 308
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #15 on: April 05, 2019, 05:01:40 am »
it is very common for me to generate .ps files with TPostScriptCanvas greater than 2gB (accounting reports), but TStringList does not save files of this size, see:

From rtl/objclass/classes/stringl.inc[/color]:
Code: Pascal  [Select][+][-]
1. Function TStrings.GetTextStr: string;
2.
3. Var P : Pchar;
4.     I,L,,NLS: Longint;
5.     S,NL : String;
6.
7. begin
8.   CheckSpecialChars;
9.   // Determine needed place
10.   if FLineBreak<>sLineBreak then
11.     NL:=FLineBreak
12.   else
13.     Case FLBS of
14.       tlbsLF   : NL:=#10;
15.       tlbsCRLF : NL:=#13#10;
16.       tlbsCR   : NL:=#13;
17.     end;
18.   L:=0;
19.   NLS:=Length(NL);
20.   For I:=0 to count-1 do
21.     L:=L+Length(Strings[I])+NLS;
22.   if SkipLastLineBreak then
23.     Dec(L,NLS);
24.   Setlength(Result,L);
25.   P:=Pointer(Result);
26.   For i:=0 To count-1 do
27.     begin
28.     S:=Strings[I];
29.     L:=Length(S);
30.     if L<>0 then
31.       System.Move(Pointer(S)^,P^,L);
32.     P:=P+L;
33.     if (I<Count-1) or Not SkipLastLineBreak then
34.       For L:=1 to NLS do
35.         begin
36.         P^:=NL[L];
37.         inc(P);
38.         end;
39.     end;
40. end;
41.

L is delimited by 2gb because it is longint.

My workarround in ever release is change the from lazarus/lcl/postscriptcanvas.pas: to:
Code: Pascal  [Select][+][-]
1. procedure TPostScriptPrinterCanvas.SaveToFile(aFileName : string);
2. Var
3.   f:TextFile;
4.   i:LongInt;
5. begin
6.   assignfile(f,ExpandFileNameUTF8(aFileName));
7.   rewrite(f);
8.   for i:= 0 to fHeader.count-1 do
10.   for i:= 0 to fDocument.count-1 do
11.     writeln(f,fDocument[i]);
12.   closefile(f);
13. end;

@martin_fr: Is this a rtl/FPC or a lcl/Lazarus issue to fix?

#### Cyrax

• Hero Member
• Posts: 837
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #16 on: April 05, 2019, 05:49:41 am »
TPostScriptCanvas should change type of property PostScript to TMemoryStream or other TStream subclass. String type have memory limitation (its internal length variable is 4 bytes wide)  even on 64-bit systems.

#### engkin

• Hero Member
• Posts: 2513
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #17 on: April 05, 2019, 06:34:37 am »
String type have memory limitation (its internal length variable is 4 bytes wide)  even on 64-bit systems.
Code: Pascal  [Select][+][-]
1.   TAnsiRec = Record
2.     CodePage    : TSystemCodePage;
3.     ElementSize : Word;
4. {\$ifdef CPU64}
5.     { align fields  }
6.         Dummy       : DWord;
7. {\$endif CPU64}
8.     Ref         : SizeInt;
9.     Len         : SizeInt;
10.   end;
11.

Code: Pascal  [Select][+][-]
1. {\$ifdef CPU64}
2.   SizeInt = Int64;
3. ...
4. {\$ifdef CPU32}
5.   SizeInt = Longint;

#### PeterX

• Sr. Member
• Posts: 330
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #18 on: April 05, 2019, 09:40:06 am »
I would like to see this HighDPI scaling bug of the Lazarus IDE fixed ..

0035231: High DPI - value "DesignTimePPI" is different between *.lfm file and Object Inspector
related with

For my current project I found out that it's enough
to just move the MainForm to update the PPI in my project
after I opened my project on a PC with different Windows Scaling Settings.

But also the MainForm looses it's position when moving the project beween
Windows PCs with different PPI settings. So also the project's MainForm's
TOP and RIGHT position are not HighDPI scaled .. sucks ..
usually using latest Lazarus release version with Windows 10

#### JuhaManninen

• Global Moderator
• Hero Member
• Posts: 3867
• I like bugs.
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #19 on: April 05, 2019, 11:18:55 am »
I would like to see this HighDPI scaling bug of the Lazarus IDE fixed ..

0035231: High DPI - value "DesignTimePPI" is different between *.lfm file and Object Inspector
related with
This is not related to Lazarus 2.0.2 release but I answer here anyway ...
Did you test the patch uploaded by Ondrej? Does it help? If it does, can you improve it so a project would not get saved always?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

#### VTwin

• Hero Member
• Posts: 936
• Former Turbo Pascal 3 user
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #20 on: April 05, 2019, 03:37:40 pm »
Great news! I'm glad there is such active progress.

I made 7 bug reports regarding the Cocoa IDE in December. Some were major usability issues, like contextual menus not working, the inability to delete a control once placed on a form, etc. Six are still listed as "new". I'm hoping these can be addressed before the release.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.0
macOS 10.13.6: Lazarus 2.0.10 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.10 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.10 (64 bit on VBox)

#### Cyrax

• Hero Member
• Posts: 837
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #21 on: April 05, 2019, 03:57:51 pm »
String type have memory limitation (its internal length variable is 4 bytes wide)  even on 64-bit systems.
Code: Pascal  [Select][+][-]
1.   TAnsiRec = Record
2.     CodePage    : TSystemCodePage;
3.     ElementSize : Word;
4. {\$ifdef CPU64}
5.     { align fields  }
6.         Dummy       : DWord;
7. {\$endif CPU64}
8.     Ref         : SizeInt;
9.     Len         : SizeInt;
10.   end;
11.

Code: Pascal  [Select][+][-]
1. {\$ifdef CPU64}
2.   SizeInt = Int64;
3. ...
4. {\$ifdef CPU32}
5.   SizeInt = Longint;

Oh, I see.

#### PeterX

• Sr. Member
• Posts: 330
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #22 on: April 05, 2019, 04:23:39 pm »
This is not related to Lazarus 2.0.2 release but I answer here anyway ...
Did you test the patch uploaded by Ondrej? Does it help? If it does, can you improve it so a project would not get saved always?
I will test this tonight. And then report.
usually using latest Lazarus release version with Windows 10

#### JuhaManninen

• Global Moderator
• Hero Member
• Posts: 3867
• I like bugs.
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #23 on: April 05, 2019, 05:26:28 pm »
I made 7 bug reports regarding the Cocoa IDE in December. Some were major usability issues, like contextual menus not working, the inability to delete a control once placed on a form, etc. Six are still listed as "new". I'm hoping these can be addressed before the release.
If you provide patches now, it may be possible to merge them.
But hurry up, changes should also be tested before they go into a release.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

#### VTwin

• Hero Member
• Posts: 936
• Former Turbo Pascal 3 user
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #24 on: April 05, 2019, 05:47:28 pm »
If you provide patches now, it may be possible to merge them.
But hurry up, changes should also be tested before they go into a release.

Thanks. I'd need to dive into the Cocoa widgets and IDE internals, before I could hope to provide a patch. Not something I could do fast. I provided test applications to illustrate the bugs, if anyone else has the skills.

https://bugs.freepascal.org/view.php?id=34663
https://bugs.freepascal.org/view.php?id=34717
https://bugs.freepascal.org/view.php?id=34716
https://bugs.freepascal.org/view.php?id=34718
https://bugs.freepascal.org/view.php?id=34630
https://bugs.freepascal.org/view.php?id=34629

“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.0
macOS 10.13.6: Lazarus 2.0.10 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.10 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.10 (64 bit on VBox)

#### Martin_fr

• Hero Member
• Posts: 6676
• Debugger - SynEdit - and more
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #25 on: April 05, 2019, 05:57:36 pm »
Quick reminder:

1) If you have an issue at any time (independent of this announcement, or when the next release may be), you should make sure it is in the bug-tracker.

2) If you believe a bug report in the tracker may have been overlooked, you can always mention this. The best place for that is on the mail list. Issues of this kind on the forum may not get the full attention, as some team members are only/mainly on the mail list.

However this does not mean that everyone should constantly push there issues. The way a bug report and fix works is:
- a team member (who maintains the related code or is familiar with it) will volunteer to take the issue (assign it to him).
- that team member then decides where the issue ends up in his personal priority (compared to other issues).
And when that team member has spare free time (between his job and personal live) he/she will work on it.

If no one assigned the issue to themself, then it may have been overlooked, in that case it makes sense to ask on the mail list (new issues should be given 2 or 3 weeks to be seen, even though often it goes faster)
It is possible that even then (after asking on the mail list) you do not get a response. The person may be away for some weeks, or busy otherwise.

-----------------------
This announcement/thread is not going to change this dynamics.

If an issue had been overlooked, then yes you should mention it, but it may well be that if it get picked up now, it will not have a fix in time and them may be pushed to 2.0.4.
Of course if the issue is easy enough to fix, then it may still get done in time.

However in the past we also had cases in which issues were fixed. But it had been forgotten to put them on the merge list.
Or available patches had not been reviewed.
In this cases it has happened that an available fix missed the release for no good reason. We are trying to minimize this. (Of course any other improvement that can reasonably be made for the release would be welcome too)

#### VTwin

• Hero Member
• Posts: 936
• Former Turbo Pascal 3 user
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #26 on: April 05, 2019, 06:57:34 pm »
Quick reminder:
...
And when that team member has spare free time (between his job and personal live) he/she will work on it.
...
The person may be away for some weeks, or busy otherwise.
...
This announcement/thread is not going to change this dynamics.
...

Thanks, I totally get it. I just figured I'd mention it here as feedback was requested.

For the record, the Cocoa IDE is in extremely good shape. I use it almost every day, and very much appreciate the rapid improvements that have been made. I rarely use the Carbon IDE anymore.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.0
macOS 10.13.6: Lazarus 2.0.10 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.10 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.10 (64 bit on VBox)

#### PeterX

• Sr. Member
• Posts: 330
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #27 on: April 05, 2019, 09:00:55 pm »
This is not related to Lazarus 2.0.2 release but I answer here anyway ...
Did you test the patch uploaded by Ondrej? Does it help?
I will test this tonight. And then report.

Recompiled IDE .. and yes, it helps.
I can confirm that - with these changes in sourcefilemanager.pas - the MainForm and its component sizes appear correcty.
And not scaled to  (in my case ..) 125%    (but DesignTime MainForm is still at wrong position on screen, also 125% larger values  .TOP and .LEFT)

If it does, can you improve it so a project would not get saved always?

This is more difficult. I can try next week.
But  sourcefilemanager.pas and related units are a lot of code to read and understand ..
« Last Edit: April 05, 2019, 09:03:41 pm by PeterX »
usually using latest Lazarus release version with Windows 10

#### Pascal

• Hero Member
• Posts: 914
##### Re: We are planning the next release: Lazarus 2.0.2
« Reply #28 on: April 06, 2019, 10:24:31 am »