View Issue Details

IDProjectCategoryView StatusLast Update
0037923LazarusIDEpublic2020-10-15 13:43
ReporterAlfred Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0037923: Lazbuild and Lazarus fixes error when using FPC fixes or newer.
DescriptionWhen using lazbuild to build lazarus fixes with FPC of version fixes or newer, the build-process crashes.
This is due to changes in FPC tprocess.
The included patch for UTF8process solves the problem.
TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Activities

Alfred

2020-10-14 11:01

reporter  

utf8process.patch (1,418 bytes)   
Index: components/lazutils/utf8process.pp
===================================================================
--- components/lazutils/utf8process.pp	(revision 64001)
+++ components/lazutils/utf8process.pp	(working copy)
@@ -560,8 +560,39 @@
 
 { TProcessUTF8 }
 
+{$if fpc_fullversion > 30200}
 procedure TProcessUTF8.SetProcessHandle(aProcessHandle: THandle);
 var
+  P: PHandle;
+begin
+  P := @Self.ProcessHandle;
+  P^ := aProcessHandle;
+  if aProcessHandle<>ProcessHandle then
+    raise Exception.Create('TProcessUTF8.SetProcessHandle failed');
+end;
+
+procedure TProcessUTF8.SetThreadHandle(aThreadHandle: THandle);
+var
+  P: PHandle;
+begin
+  P := @Self.ThreadHandle;
+  P^ := aThreadHandle;
+  if aThreadHandle<>ThreadHandle then
+    raise Exception.Create('TProcessUTF8.SetThreadHandle failed');
+end;
+
+procedure TProcessUTF8.SetProcessID(aProcessID: Integer);
+var
+  P: PInteger;
+begin
+  P := @Self.ProcessID;
+  P^ := aProcessID;
+  if aProcessID<>ProcessID then
+    raise Exception.Create('TProcessUTF8.SetProcessID failed');
+end;
+{$else}
+procedure TProcessUTF8.SetProcessHandle(aProcessHandle: THandle);
+var
   o: TProcessClassTemplate;
 begin
   o:=TProcessClassTemplate.Create(nil);
@@ -592,6 +623,7 @@
     raise Exception.Create('TProcessUTF8.SetProcessID failed');
   o.Free;
 end;
+{$endif}
 
 procedure TProcessUTF8.Execute;
 Var
utf8process.patch (1,418 bytes)   

Alfred

2020-10-14 11:02

reporter   ~0126291

This bug has also been reported on the forum.
FPC fixes + Lazarus fixes is a no-go.
The patch solves.

Juha Manninen

2020-10-14 20:29

developer   ~0126306

Last edited: 2020-10-14 20:32

View 2 revisions

The patch cannot be applied. I guess you didn't create it against Lazarus trunk.
Besides, trunk already has procedures SetThreadHandle and SetProcessID there. Did you test with Lazarus trunk?
See :

$ patch -p0 < ~/patch/utf8process.patch
 (Stripping trailing CRs from patch; use --binary to disable.)
 patching file components/lazutils/utf8process.pp
 Hunk 0000001 FAILED at 560.
 Hunk 0000002 succeeded at 523 with fuzz 2 (offset -69 lines).
 1 out of 2 hunks FAILED -- saving rejects to file components/lazutils/utf8process.pp.rej

Alfred

2020-10-14 20:48

reporter   ~0126307

I am sorry for the confusion, but this patch is meant to be used for Lazarus fixes !
Trunk is already 100% ok.
Its Lazarus fixes (2.0.11) that causes the problems.

Juha Manninen

2020-10-14 22:35

developer   ~0126315

Ok, yes.
We must find the revisions in Lazarus trunk that should be merged. They should be added to the fixes_2_0 wiki page. Somebody will merge them later.
Until then Lazarus trunk is recommended. It works pretty well actually.

Alfred

2020-10-15 07:50

reporter   ~0126320

I myself use Lazarus trunk with FPC stable: indeed a very good combo !!
But, at the moment, Lazarus fixes cannot be build anymore. The patch solves this.
I have seen that many fpcupdeluxe users use the combo FPC fixes with Lazarus fixes. And this combo will work again with this patch. So, please apply, even only for the time being.

Juha Manninen

2020-10-15 10:31

developer   ~0126322

I added 4 revisions for Utf8Process to be merged: r61736, r63563, r63584, r63708.
They are now here :
 https://wiki.freepascal.org/Lazarus_2.0_fixes_branch#Submitted_by_developer_.2F_committer.2C_tested.2C_waiting_to_be_merged
It should make Utf8Process identical with trunk versions.
I try to hurry the merging. If problems come up, your patch can be used as a backup plan.

Alfred

2020-10-15 13:12

reporter   ~0126326

After applying those 4 revisions for Utf8Process [ r61736, r63563, r63584, r63708 ] onto Lazarus fixes, all 100% ok. Lazarus builds fine with FPC fixes and newer.
So, please apply. Thanks for this.

Juha Manninen

2020-10-15 13:43

developer   ~0126327

Mattias merged them right away.
Should work now.

Issue History

Date Modified Username Field Change
2020-10-14 11:01 Alfred New Issue
2020-10-14 11:01 Alfred File Added: utf8process.patch
2020-10-14 11:02 Alfred Note Added: 0126291
2020-10-14 20:27 Juha Manninen Assigned To => Juha Manninen
2020-10-14 20:27 Juha Manninen Status new => assigned
2020-10-14 20:29 Juha Manninen Note Added: 0126306
2020-10-14 20:32 Juha Manninen Note Edited: 0126306 View Revisions
2020-10-14 20:48 Alfred Note Added: 0126307
2020-10-14 22:35 Juha Manninen Note Added: 0126315
2020-10-15 07:50 Alfred Note Added: 0126320
2020-10-15 10:31 Juha Manninen Note Added: 0126322
2020-10-15 13:12 Alfred Note Added: 0126326
2020-10-15 13:43 Juha Manninen Status assigned => resolved
2020-10-15 13:43 Juha Manninen Resolution open => fixed
2020-10-15 13:43 Juha Manninen LazTarget => -
2020-10-15 13:43 Juha Manninen Note Added: 0126327