Sudden exception in acShellCtrls crashing program?

Viewing 20 posts - 1 through 20 (of 31 total)
  • Author
    Posts
  • #70874
    NormAtHome
    Participant

    I’ve been using Alpha Controls for a couple years now, very successfully and mainly for a tablet touch specific program to enlarge text of popup menus and making other controls larger. I’m currently using Delphi 11.1 and Alpha Controls v16.23. Now whether wisely or not I decided to try changing the style through the IDE (Project / Options / Application / Appearance) to a more contrast conductive one and the application crashed without even opening so I tried to just go back to the default Windows style and the same thing happened.

    When I try and debug to see where the problem is happening, it’s seems to be happening is acShellCtrls in the InitSystemImageList procedure and the error is First chance exception at $00007FFCB03EFAB7. Exception class $C0000005 with message ‘c0000005 ACCESS_VIOLATION’. Process {Program Name}.exe (20624):

    procedure InitSystemImageList;
    var
      FileInfo: TSHFileInfo;
    begin
      FillChar(FileInfo, SizeOf(FileInfo), 0);
      if Assigned(acSHGetFileInfo) then begin
        SysSmallImages := acSHGetFileInfo('C:\', 0, FileInfo, SizeOf(FileInfo), SHGFI_SYSICONINDEX or SHGFI_SMALLICON);
        if (SysSmallImages <> 0) and (SysSmallImageList = nil) then begin
          SysSmallImageList := TsAlphaImageList.Create(nil);
          SysSmallImageList.Handle := SysSmallImages;
          SysSmallImageList.AllowScale := False; { This is the line causing the error }
          SysSmallImageList.ShareImages := True;
          SysSmallImageList.AcEndUpdate(False);
          ImageList_SetBkColor(SysSmallImageList.Handle, CLR_NONE);
        end;
      end;
    end;

    I’m really at a loss to understand what I did that is suddenly causing this problem, any idea’s?

    #70875
    Lasse
    Participant

    I 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.

    #70876
    NormAtHome
    Participant

    I’m really in the dark and it just seems really strange, after 11.1 came out and I was testing various project to make sure there was no problem and the project in question worked fine as recently as two days ago because I’d made some minor changes. Now when I mean minor just like adding a MessageDlg to the exitclick event to ask “Are you sure you want to exit?” because I’d been having a problem accidentally pressing the Exit button while handing the tablet. So nothing major, I wanted to try a more dark theme like Charcoal Dark Slate and all I did was switch from the default Windows style to that and then when it crashed while initializing so I switched it back and it still crashed which is really perplexing. I tried deleting the project file and creating a new one, adding all the forms and setting all the options and bam, same problem. I went back to Delphi 10.4.2 and Alpha Controls 16.14 and everything worked again so at least I was able to get a working .exe until this problem with 11.1 gets straightened out.

    #70877
    Lasse
    Participant

    I can confirm this is a Delphi 11.1 problem. I installed Delphi 11 and there are no problems.

    #70879
    NormAtHome
    Participant

    Just another thought which occurred to me, this problem didn’t happen with 11.1 until I applied the 1st patch so it seems to me it may a problem with patch 1.

    #70880
    Lasse
    Participant

    Yes, you are absolutely right. I installed 11.1 and everything still works. This is a patch 1 issue. I did try to uninstall the patch before but it didn’t help.

    #70883
    NormAtHome
    Participant

    Do the Alpha Controls people have an official position on this? Is this something they need to fix within AC or does Embarcadero have to issue a hot fix for this if it’s a 11.1 Patch 1 issue? I’m kind of at a standstill until this is resolved one way or another.

    #70884
    NormAtHome
    Participant

    You are correct that uninstalling Patch 1 doesn’t work, I didn’t want to because it’s a lot of work but I uninstalled Rad Studio 11.1 with Patch 1 and made sure to delete all the Studio 22.0 directories so there were no remnants and reinstalled and then reinstalled all components and Styles and without the Patch 1 it works without an Access Violation problem.

    #70885
    Lasse
    Participant

    Reinstalling Delphi 11.1 is fast and easy, if you answer the first question NO when it asks about cleaning registry. I did it on a work machine today and it takes just a few minutes.

    I assume we can wait for official answers until the war is over.

    #70887
    NormAtHome
    Participant

    It’s not just installing RAD Studio, that’s the easy part. It’s installing all the various components, just getting all the styles one at a time from GetIt is a real nuisance.

    #70940
    NormAtHome
    Participant

    Has anyone tested this on 11.1.5 to see if the problem that caused acShellCtrls to crash is fixed?

    #70972
    Support
    Keymaster

    Hello and sorry for a long time without answer.
    I’m not able to check this issue now, but I have an idea that such behaviour may be linked with changes in the manifest file. I hope it can help..

    #70975
    NormAtHome
    Participant

    This error happens on Delphi 11.1 with patch 1 and Delphi 11.1.5 so right now I can’t upgrade to any version newer than 11.1, when you say “may be linked to changes in the manifest file” is that my applications manifest file, the Alpha Skins manifest file and what do I need to change because that’s not a lot to go on?

    #70981
    Lasse
    Participant

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

    #70982
    NormAtHome
    Participant

    Honestly I don’t understand this problem, 11.1 is fine no problem but add the patch 1 and AC is then broken likewise with 11.1.1 and I don’t expect 11.2 to fix this but none of these updates are supposed to be “breaking” releases. AC Support mentioned that they think is a problem in “changes in the manifest file” but didn’t elaborate and I’m stuck; I can’t update to any newer version until this is fixed because I have several project that depend on it.

    #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 2 years, 2 months ago by Lasse.
    #70989
    NormAtHome
    Participant

    Lassie:

    AC Support did reply but only said “Hello and sorry for a long time without answer.
    I’m not able to check this issue now, but I have an idea that such behaviour may be linked with changes in the manifest file. I hope it can help” does that make any sense to you?

    #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

    #70994
    Support
    Keymaster

    Sorry for a delay
    I meant, that maybe manifest file was created (or changed), which uses another API version or has some other potential problems. But, if same issue exists in other projects or if you don’t see any manifest files there, then I was wrong seems. Unfortunately, I had only this idea.

    #70998
    Lasse
    Participant

    We will see this week what happens with version 11.2.

    RAD Studio New Release: What’s Coming in 11.2

Viewing 20 posts - 1 through 20 (of 31 total)
  • You must be logged in to reply to this topic.