Forum Replies Created
-
AuthorPosts
-
December 31, 2022 at 12:48 pm in reply to: Sudden exception in acShellCtrls crashing program? #71072
I 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;`Wow, 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.
I think I had the same issue. I have done it this way:
TMainForm = class(... ApplicationEvents: TApplicationEvents; TrayIcon: TTrayIcon; procedure ApplicationEventsMinimize(Sender: TObject); procedure TrayIconClick(Sender: TObject); procedure WMWindowStateNormal(var AMessage: TMessage); message WM_WINDOW_STATE_NORMAL; ... private procedure MinimizeToSystemTray; end; procedure TMainForm.ApplicationEventsMinimize(Sender: TObject); begin MinimizeToSystemTray; end; procedure TMainForm.MinimizeToSystemTray; begin if OptionsContainer.MinimizeToSystemTray then begin Hide; WindowState := wsMinimized; TrayIcon.Visible := True; TrayIcon.Animate := True; end; end; procedure TMainForm.TrayIconClick(Sender: TObject); begin TrayIcon.Visible := False; Show; WindowState := wsNormal; Application.BringToFront; end; procedure TMainForm.WMWindowStateNormal(var AMessage: TMessage); begin TrayIconClick(Self); end;Have you tried sInputQuery from sDialogs.pas?
Well, that didn’t work like it should. I changed it to…
function TacDialogWnd.FixedFrame: integer; begin if Screen.PixelsPerInch <> 96 then Result := ac_GetSysMetrics(SM_CXPADDEDBORDER, GetWndPPI(CtrlHandle)) else Result := ac_GetSysMetrics(SM_CXFIXEDFRAME, GetWndPPI(CtrlHandle)); end;I think it is a flaw in skin package. Unfortunately there isn’t a source for Skin editor.
I had to revert back to Delphi 11.1 (without patch 1). That is still the latest Delphi version fully working with AC.
I noticed that scaling is not working with imagelists in 64-bit…
Attachments:
You must be logged in to view attached files.I haven’t noticed any errors so far.
I use now ZLib version 1.2.8 from https://www.base2ti.com/
I know it’s not the latest ZLib version but it works. It would be also possible to rip ZLib from previous Delphi version. Maybe do some comparing to the 11.2 version, find the actual “bug” from it, and report it.
Btw. there is also two other units using ZLib in AlphaSkins. I changed those too like:
acAlphaHints:
//{$IFNDEF WIN64} acZLibEx, {$ELSE} ZLib, {$ENDIF} ZLibEx,acPNG.pas:
//{$IFNDEF WIN64}acZLibEx, {$ELSE}ZLib, {$ENDIF} ZLibEx, ZLibExApi,You should add a new variable for imagelist handle and let the i variable be Integer. HIMAGELIST is the type that is used elsewhere.
You can’t do anything without a source code. I am sure this will be fixed as soon as possible. The situation in Ukraine looks promising.
Well, variable i is also used for loop. So, better to add other variable for imagelist handle…
As a workaround before fix you can use for example https://github.com/fundamentalslib/fundamentals5/tree/master/Source/ZLib
It works on both 32-bit and 64-bit.
Just comment out current use of ZLib in sSkinManager.pas:
//{$IFNDEF WIN64} // acZLibEx, //{$ELSE} // ZLib, //{$ENDIF} ZLibEx,This seems to be ZLib issue. AlphaSkins is using acZLibEx for 32-bit and it is working. If current ZLib is used 32-bit will break as well.
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.
We will see this week what happens with version 11.2.
Yes, I noticed that but it is not the reason.
Like I wrote before the following fixes get your AlphaSkins issues sorted out… but it is not just AC that is failing with Patch 1.
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 beginAnd it wasn’t only AC that is broken after that. I saw random issues with other 3rd party libraries as well in 64-bit build.
Fix of these might be the reason… or not.
RSP-37760 Using ImageList causes IDE to crash
RSP-35040 64bit packets in C++ containing Delphi code do not runHere all fixed issues in Patch 1:
RSP-37880 Can’t debug iOS
RSP-37760 Using ImageList causes IDE to crash
RSP-37733 IDE Access Violation when Inheriting from a Form with a TListView in DynamicAppearance.
RSP-37690 GridPanelLayout on form memory leaks on end app — same if not used at all
RSP-37667 Cannot fit requested classes in a single DEX file (# methods: 71471 > 65536)
RSP-37665 Code Insight broken for classic compiler
RSP-37662 Segmentation Fault(11) in SysUtils.Pop on Android64
RSP-37609 PAServer ships with Python 2.7 dependencies – which are no longer available in macOS 12.3
RSP-37408 Delayed flag break Exe’s ASLR function
RSP-37378 Memory leak
RSP-35040 64bit packets in C++ containing Delphi code do not run-
This reply was modified 3 years, 6 months ago by
Lasse.
Delphi 11.2 is coming soon but I don’t assume it will fix this.
-
This reply was modified 3 years, 6 months ago by
-
AuthorPosts