- This topic has 30 replies, 5 voices, and was last updated 1 year, 8 months ago by Support.
-
AuthorPosts
-
September 7, 2022 at 6:18 pm #70999LasseParticipant
Delphi 11.2 64-bit is crashing into “Stream read error” in System.Classes when skin manager tries to load skin from file. This has been working always. 32-bit build works fine… I’m not surprised at all.
December 30, 2022 at 10:47 pm #71069Lar'cParticipantI am on the same boat (64-bit AVs). I had to make a few changes to AlphaSkins but I am still wondering why this happens now. Is it Delphi 11.1 causing issues?
My changes for AlphaSkins are:
acgpUtils.pas:
748:gpaPColor := Pointer(PAnsiChar{Integer}(bmData.Scan0) + Y * bmData.Stride);
acShellCtrls.pas:
4344: // InitSystemImageList;
sGraphUtils.pas:
7506: with PRGBQuad(PAnsiChar{Integer}(srcLine) + Pixel)^ do begin
But after that I have issues with other 3rd party components and it is a huge swamp… I think I will install Delphi 11 and test if 11.1 update is causing these issues.
Go to project options, then delphi compiler->Linking, turn off support high-enropy 64bit and you won’t get this error.
December 31, 2022 at 8:07 am #71070LasseParticipantWow, thanks! This solved all issues with 64-bit build with Delphi 11.2. I read about this feature but never thought it would totally mess up everything.
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Support_high-entropy_64-bit_ASLR
Sure, there still is the ZLib issue but it can be fixed.
December 31, 2022 at 9:19 am #71071Lar'cParticipantYes, thank you, I will use your zlib solution.
December 31, 2022 at 12:48 pm #71072LasseParticipantI am currently using old version of ZLib but I tested that fix for current version of ZLib, suggested by wesson, and it did work too.
“It can be solved in System.Zlib with the following (line 2752)”
`if (zresult = Z_STREAM_END) and (FZStream.avail_in > 0) then
begin
Dec(FStreamPos, FZStream.avail_in);
Fstream.Position := FStreamPos;FZStream.avail_in := 0;
end;`December 31, 2022 at 1:00 pm #71073Lar'cParticipantI prefer the solution of putting the new ZLibEx.pas in the alphaskins source directory, and declaring it in the modules sSkinManager.pas, acAlphaHints.pas, acPNG.pas, instead of acZLibEx
January 2, 2023 at 8:30 am #71074LasseParticipantThat is a Windows feature… So, there must be some 64-bit math issues in AlphaSkins code which are causing it to fail.
January 2, 2023 at 8:40 am #71075LasseParticipantI see there are a lot of Integer casts. All pointer or object references should be casted to NativeInt.
January 6, 2023 at 1:27 pm #71085chris2023ParticipantHi my System.zLib (Delphi 11 Update 2) looks so
//function TZDecompressionStream.Read(var buffer; count: LongInt): LongInt; var zresult: Integer; begin FZStream.next_out := @buffer; FZStream.avail_out := count; zresult := Z_OK; while (FZStream.avail_out > 0) and (zresult <> Z_STREAM_END) and (zresult <> Z_BUF_ERROR) do begin if FZStream.avail_in = 0 then begin if FStream.Position <> FStreamPos then FStream.Position := FStreamPos; FZStream.avail_in := FStream.Read(FBuffer, length(FBuffer)); Inc(FStreamPos, FZStream.avail_in); FZStream.next_in := @FBuffer[0]; DoProgress; end; zresult := ZDecompressCheckWithoutBufferError(inflate(FZStream, Z_NO_FLUSH)); end; Result := NativeUInt(count) - FZStream.avail_out; end;
where must there place the line
if (zresult = Z_STREAM_END) and (FZStream.avail_in > 0) then begin Dec(FStreamPos, FZStream.avail_in); Fstream.Position := FStreamPos; FZStream.avail_in := 0; end;
? by me its not line line 2752
January 6, 2023 at 7:53 pm #71086LasseParticipantEmbarcadero\Studio\22.0\source\rtl\common\System.ZLib.pas, Line 2850.
You need your own fork for it.
Attachments:
You must be logged in to view attached files.March 12, 2023 at 6:50 pm #71144SupportKeymasterHello!
The AlphaControls package v17 has been released today, the issue has been solved there. -
AuthorPosts
- You must be logged in to reply to this topic.