Lasse

Forum Replies Created

Viewing 20 posts - 61 through 80 (of 212 total)
  • Author
    Posts
  • in reply to: Sudden exception in acShellCtrls crashing program? #71072
    Lasse
    Participant

      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;`

      in reply to: Sudden exception in acShellCtrls crashing program? #71070
      Lasse
      Participant

        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.

        in reply to: Reay = problem? #71061
        Lasse
        Participant

          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;
          in reply to: ACCESS VIOLATION in Delphi 11.2 #71060
          Lasse
          Participant
            in reply to: Access Violation Delphi5 #71056
            Lasse
            Participant

              Have you tried sInputQuery from sDialogs.pas?

              in reply to: There is a problem with 200% zoom of 4K resolution #71052
              Lasse
              Participant

                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;
                in reply to: Delphi 11.2 64-bit Crashing #71035
                Lasse
                Participant

                  I think it is a flaw in skin package. Unfortunately there isn’t a source for Skin editor.

                  in reply to: Delphi 11.2 64-bit Crashing #71025
                  Lasse
                  Participant

                    I had to revert back to Delphi 11.1 (without patch 1). That is still the latest Delphi version fully working with AC.

                    in reply to: Delphi 11.2 64-bit Crashing #71023
                    Lasse
                    Participant

                      I noticed that scaling is not working with imagelists in 64-bit…

                      Attachments:
                      You must be logged in to view attached files.
                      in reply to: Delphi 11.2 64-bit Crashing #71016
                      Lasse
                      Participant

                        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, 
                        • This reply was modified 3 years, 5 months ago by Lasse.
                        • This reply was modified 3 years, 5 months ago by Lasse.
                        in reply to: Bug in TacToolBarWnd.DrawBtn #71012
                        Lasse
                        Participant

                          You should add a new variable for imagelist handle and let the i variable be Integer. HIMAGELIST is the type that is used elsewhere.

                          in reply to: Delphi 11.2 64-bit Crashing #71011
                          Lasse
                          Participant

                            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.

                            in reply to: Bug in TacToolBarWnd.DrawBtn #71004
                            Lasse
                            Participant

                              Well, variable i is also used for loop. So, better to add other variable for imagelist handle…

                              in reply to: Delphi 11.2 64-bit Crashing #71002
                              Lasse
                              Participant

                                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,
                                in reply to: Delphi 11.2 64-bit Crashing #71001
                                Lasse
                                Participant

                                  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.

                                  in reply to: Sudden exception in acShellCtrls crashing program? #70999
                                  Lasse
                                  Participant

                                    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.

                                    in reply to: Sudden exception in acShellCtrls crashing program? #70998
                                    Lasse
                                    Participant

                                      We will see this week what happens with version 11.2.

                                      RAD Studio New Release: What’s Coming in 11.2

                                      in reply to: Sudden exception in acShellCtrls crashing program? #70990
                                      Lasse
                                      Participant

                                        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 begin

                                        in reply to: Sudden exception in acShellCtrls crashing program? #70986
                                        Lasse
                                        Participant

                                          And 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 run

                                          Here 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.
                                          in reply to: Sudden exception in acShellCtrls crashing program? #70981
                                          Lasse
                                          Participant

                                            Delphi 11.2 is coming soon but I don’t assume it will fix this.

                                          Viewing 20 posts - 61 through 80 (of 212 total)