Bug in TacCustomShellListView

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #37607
    HeDiBo
    Participant

    I have a setup with on the left side a TsShellTreeView and on the other side a TsShellListView.

    When selecting directories on the left side, sometimes the TacCustomShellListView throws an exception. This is the stack trace:

    Code:
    System._IntfCopy(???,???)
    :0040e85e @IntfCopy + $6
    acShellCtrls.TacShellFolder.DisplayName(seShow)
    acShellCtrls.TacCustomShellListView.OwnerDataFetch($7E16BAF0,[])
    Vcl.ComCtrls.TCustomListView.GetItem((0, 8, 0, 0, 0, nil {#0}, 0, 0, 0, 0, 0, 0, nil, nil, 0))
    Vcl.ComCtrls.TListItems.GetItem(???)
    Vcl.ComCtrls.TCustomListView.CNNotify((48206, (), 133732, $19C1F4, $19C1F4, $19C1F4, $19C1F4, $19C1F4, $19C1F4, $19C1F4, $19C1F4, $19C1F4, 0))
    Vcl.Controls.TControl.WndProc((48206, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    Vcl.Controls.TWinControl.WndProc((48206, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    Vcl.ComCtrls.TCustomListView.WndProc((48206, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    sListView.TsCustomListView.WndProc((48206, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    acShellCtrls.TacCustomShellListView.WndProc((48206, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    acSBUtils.TacMainWnd.CallPrevWndProc(133732,48206,133732,1688052)
    acSBUtils.TacScrollWnd.acWndProc((48206, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    acSBUtils.TacBaseWnd.acWndProc((48206, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    acSBUtils.TacEditWnd.acWndProc((48206, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    Vcl.Controls.TControl.Perform(???,???,1688052)
    Vcl.Controls.DoControlMsg(???,(no value))
    Vcl.Controls.TWinControl.WMNotify((78, (), 133732, $19C1F4, 0))
    Vcl.Controls.TControl.WndProc((78, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    Vcl.Controls.TWinControl.WndProc((78, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    sPanel.TsPanel.WndProc((78, 133732, 1688052, 0, 2660, 2, (), 49652, 25, (), 0, 0, ()))
    Vcl.Controls.TWinControl.MainWndProc(???)
    System.Classes.StdWndProc(199370,78,133732,1688052)
    :74642f8b ; C:WINDOWSSysWOW64user32.dll
    :74635443 ; C:WINDOWSSysWOW64user32.dll
    :7463509a ; C:WINDOWSSysWOW64user32.dll
    :7463f039 ; C:WINDOWSSysWOW64user32.dll
    :77b8411d ntdll.KiUserCallbackDispatcher + 0x4d
    :7462090f ; C:WINDOWSSysWOW64user32.dll
    :7403cbac ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :74006372 ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :740076cd ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :740067c1 ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :740404ae ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :7403e243 ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :74642f8b ; C:WINDOWSSysWOW64user32.dll
    :74635443 ; C:WINDOWSSysWOW64user32.dll
    :7462aeb7 user32.CallWindowProcW + 0x97
    Vcl.Controls.TWinControl.DefaultHandler(???)
    :005581d3 TWinControl.DefaultHandler + $EB
    :005580c2 TWinControl.WndProc + $5CA
    :005b673c TCustomListView.WndProc + $A4
    :0089925b TacCustomShellListView.WndProc + $83
    :007eadb1 TacMainWnd.CallPrevWndProc + $41
    :007dde02 TacScrollWnd.acWndProc + $B86
    :007e782e TacBaseWnd.acWndProc + $14A
    :007dea54 TacEditWnd.acWndProc + $BA0
    :00557703 TWinControl.MainWndProc + $2F
    :004d676e StdWndProc + $16
    :74642f8b ; C:WINDOWSSysWOW64user32.dll
    :74635443 ; C:WINDOWSSysWOW64user32.dll
    :7462aeb7 user32.CallWindowProcW + 0x97
    :7402805f ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :74028133 ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :74027ee1 ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :74642f8b ; C:WINDOWSSysWOW64user32.dll
    :74635443 ; C:WINDOWSSysWOW64user32.dll
    :7463509a ; C:WINDOWSSysWOW64user32.dll
    :7463f039 ; C:WINDOWSSysWOW64user32.dll
    :77b8411d ntdll.KiUserCallbackDispatcher + 0x4d
    :7462090f ; C:WINDOWSSysWOW64user32.dll
    :005b2577 TListItems.Clear + $27
    :00897db3 TacCustomShellListView.Populate + $87
    :00897ce7 TacCustomShellListView.RootChanged + $63
    :008993dd TacCustomShellListView.SetPathFromID + $6D
    :008991d3 TacCustomShellListView.TreeUpdate + $47
    :008951c2 TacCustomShellTreeView.CanChange + $CE
    :005aad47 TCustomTreeView.CNNotify + $8F7
    :00553604 TControl.WndProc + $2C0
    :005580c2 TWinControl.WndProc + $5CA
    :005ab06b TCustomTreeView.WndProc + $87
    :008958e6 TacCustomShellTreeView.WndProc + $192
    :007eadb1 TacMainWnd.CallPrevWndProc + $41
    :007dde02 TacScrollWnd.acWndProc + $B86
    :007e782e TacBaseWnd.acWndProc + $14A
    :007dea54 TacEditWnd.acWndProc + $BA0
    :007e3636 TacTreeViewWnd.acWndProc + $27A
    :0055323f TControl.Perform + $27
    :00558228 DoControlMsg + $28
    :005580c2 TWinControl.WndProc + $5CA
    :0086d3a8 TsPanel.WndProc + $B1C
    :00557703 TWinControl.MainWndProc + $2F
    :004d676e StdWndProc + $16
    :74642f8b ; C:WINDOWSSysWOW64user32.dll
    :74635443 ; C:WINDOWSSysWOW64user32.dll
    :7463509a ; C:WINDOWSSysWOW64user32.dll
    :7463f039 ; C:WINDOWSSysWOW64user32.dll
    :77b8411d ntdll.KiUserCallbackDispatcher + 0x4d
    :7462090f ; C:WINDOWSSysWOW64user32.dll
    :7403cbac ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :73ffb0af ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :73ffaea4 ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :7401a612 ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :73ff716e ; C:WINDOWSWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_6dad63fefc436da8comctl32.dll
    :74642f8b ; C:WINDOWSSysWOW64user32.dll
    :74635443 ; C:WINDOWSSysWOW64user32.dll
    :7462aeb7 user32.CallWindowProcW + 0x97
    :005581d3 TWinControl.DefaultHandler + $EB
    :00553604 TControl.WndProc + $2C0
    :005580c2 TWinControl.WndProc + $5CA
    :005ab06b TCustomTreeView.WndProc + $87
    :008958e6 TacCustomShellTreeView.WndProc + $192
    :007eadb1 TacMainWnd.CallPrevWndProc + $41
    :007dde02 TacScrollWnd.acWndProc + $B86
    :007e782e TacBaseWnd.acWndProc + $14A
    :007dea54 TacEditWnd.acWndProc + $BA0
    :007e3636 TacTreeViewWnd.acWndProc + $27A
    :00557703 TWinControl.MainWndProc + $2F
    :004d676e StdWndProc + $16
    :74642f8b ; C:WINDOWSSysWOW64user32.dll
    :74635443 ; C:WINDOWSSysWOW64user32.dll
    :74634dd2 ; C:WINDOWSSysWOW64user32.dll
    :74634ba0 user32.DispatchMessageW + 0x10

    The error occurs in this code snippet of acShellCtrls starting at line 3612:

    Code:
    if Assigned(AFolder) then
    if IsValidIndex(Item.Index, FFolders.Count) then begin
    // if irText in Request then // Items may be empty if not commented
    Item.Caption := AFolder.DisplayName(FShowExtension); <<== DisplayName throws an exception
    // if irImage in Request then
    Item.ImageIndex := AFolder.ImageIndex(ViewStyle = vsIcon);

    if ViewStyle = vsReport then begin
    //PIDL := AFolder.FPIDL;
    AFolder.LoadColumnDetails(FRootFolder, Self.Handle, Columns.Count);
    for J := 1 to Columns.Count – 1 do
    Item.SubItems.Add(AFolder.Details[J]);
    end;
    end;

    This is the function in acShellCtrls where the Access Violation occurs:

    Code:
    function TacShellFolder.DisplayName(ShowExt: TacShowExtension): acString;
    var
    ParentFolder: IShellFolder;
    begin
    if Parent <> nil then <<== the exception is probably here
    ParentFolder := ParentacShellFolder <<-- or here
    else
    ParentFolder := DesktopShellFolder;

    if ParentFolder <> nil then
    Result := GetDisplayName(ParentFolder, FPIDL, SHGDN_INFOLDER, ShowExt)
    else
    Result := CharQuest;
    end;

    I tried to make a test project, but could not get it wrong. I include it anyway, maybe you can make it fail:

    [attachment=8468:acShellBug.zip]

    #57118
    Support
    Keymaster

    Hello and thank you for the detailed report with a demo.

    I will add some changes in the code in the nearest release and I hope it helps.

    #57137
    HeDiBo
    Participant
    'Support' wrote:

    Hello and thank you for the detailed report with a demo.

    I will add some changes in the code in the nearest release and I hope it helps.

    Problem still in 12.18

    #57158
    Support
    Keymaster

    Hello

    The problem is that I can't get it wrong too.

    Maybe you can give some more info:

    Maybe, this error occurs only in specified directories?

    #57167
    HeDiBo
    Participant
    'Support' wrote:

    Hello

    The problem is that I can't get it wrong too.

    Maybe you can give some more info:

    Maybe, this error occurs only in specified directories?

    I found that it only occurs if I run my project in the Delphi developer environment. When ran as stand-alone it does not occur.

    If it occurs it's when a sub directory is selected in the left pane.

    More than the detailed stack and the source locations where the bug occurs I cannot provide.

    #57183
    Support
    Keymaster

    Maybe, you can make a video where I can see it in real-time? I hope, I will see something useful.

    #57190
    HeDiBo
    Participant
    'Support' wrote:

    Maybe, you can make a video where I can see it in real-time? I hope, I will see something useful.

    This is it:

    [attachment=8494:ShellTree bug.rar]

    Please delete it from my account again. It's very big.

    I tried the same thing outside the IDE and got the same bug (that's some sort of relieve I think).

    It has to do with the sequence of folders selected.

    I also tried it with the test program I made. But using the same folder selections the problem does not occur a1.gif

    #57197
    Support
    Keymaster

    Thank you, I see it.

    What is content of this directory? Does exist some “strange” names there?

    'HeDiBo' wrote:
    I also tried it with the test program I made. But using the same folder selections the problem does not occur a1.gif

    Maybe, this behavior is depended from the project manifest?

    You can try to change the Application options there…

    #57201
    HeDiBo
    Participant

    I found out that the origin of the problem is a little bit earlier in the movie. I made a shortened version at exactly the point of error.

    [attachment=8499:AbortAnalyzed.rar]

    This is the moment just before the problem:

    [attachment=8500:ABort 1.jpg]

    The currently selected path is displayed at the bottom as C:Program Files(X86)WIP

    Then the path is changed:

    [attachment=8501:ABort 2.jpg]

    That changes the current path to another Volume entirely (T:DICKWIPDelphiInternationalDutch). If you look at the movie you can see some peculiar movement.

    Any directory selected after this will give the exception:

    [attachment=8502:ABort 3.jpg]

    The folder seems not chosen, but when the OK button is clicked, the program happily continues with the chosen folder, without further consequences.

    'Support' wrote:

    Thank you, I see it.

    What is content of this directory? Does exist some “strange” names there?

    Maybe, this behavior is depended from the project manifest?

    You can try to change the Application options there…

    As stated above, it doesn't matter which directory is chosen.

    I'm not sure what you mean with the project manifest.

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