OLE error in TAdvExplorerTreeview 1.5.1.1

Dear Support Team,

After updating Delphi (from 11 to 11.1) and TMS VCL UI (from 10.6.4.0 to 10.7.70), we now have Ole errors raised when creating a form including a TAdvExplorerTreeview.
The error does not always happen but very often.
The error happens when line 5834 from AdvExplorerTreeview.pas is executed ( in LoadDirectoryStructure).

{$IFDEF DELPHI_UNICODE}
OleCheck(SHGetFileInfo(LPWSTR(Pidl), 0,FileInfo, SizeOf(FileInfo),SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_ICON or
         SHGFI_SMALLICON or SHGFI_TYPENAME or SHGFI_DISPLAYNAME or SHGFI_EXETYPE));
{$ENDIF}

I attach a sample application.
Steps to reproduce:

  • Build and run sample
  • Quickly click on the unique button. -> Error occurs.

If error does not occur, close application and restart. It can need several attempts.
I get it more often when executing release exe from explorer. But it also happen in debug in the debugger.

Best regards,

Nicolas DAVID
AdvExplorerTreeviewSample.zip (102.4 KB)

In the attached sample, the form containing the TAdvExplorerTreeview is created when clicking on the button. However I also reproduced the error having the form auto-creating during application initialization.

I tested on 3 DEV PCs (win10) and also with a Test PC (win11 without dev environnement). I reproduced on each of them.

What is
"Quickly click on the unique button"
What do you refer to with "unique button"?
I click to open the form and click the OK button, but I cannot see a problem here.

I mean it is when clicking on the first button that create and open the form.
It is during the form creation that the error happens.
As I said it may need several attempts to have it:

  • start test application \ click on button immediatly after opening \ close application
  • start test application \ click on button immediatly after opening \ close application
  • start test application \ click on button immediatly after opening \ close application
  • start test application \ click on button immediatly after opening \ close application
  • ...

Yesterday, I reproduced after 6 attempts on a new test PC.

I have the feeling that It occurs more frequently if we click on button right after opening. But I am not sure of this.

I attach an error message.

Capture

Hi Support Team,

Did you finally manage to reproduce the error?

Best regards,

I was unable to reproduce this here so far.
Do you experience this issue with TMS VCL UI Pack 10.6.4.0?

No, with 10.7.7.0 And Delphi 11.1

I have retested this here like over 30 times but at no point, I could see an error.

We have tested on a virtual machine (win10) without antivirus, to eliminate an issue that could be due to our antivirus. Issue has been reproduced.

To sum up:

  • We have the issue after updating Delphi from 11 to 11.1, TMS VCL UI from 10.6.4 to 10.7.7
  • We have tested and reproduced with our DEV PCs (at least 3, all with Win10 21H2), with a TEST PC (Win11) and a Virtual machine (Win10 1903, without antivirus)

Is there anything else I can do to help you to diagnose?

1/ Did you also test in release and debug out from debugger ? Didn't you edit the Mode? OleError happens only if aeSystem mode is used.

2/ We just detect another issue that can also be reproduced with the attached sample project ... when the OleError does not occur. It is an access violation that occurs when using the "chevron" button. See attached capture. Do you want me to create a new topic for this ?

  1. Tested both in release & debug mode
  2. Tested this behavior with dropdown

but, I can't reproduce this.
I uploaded our release & debug Win64 EXE at:
http://www.tmssoftware.net/public/AdvExplorerTreeviewSampleCompiled.zip
so you can compare.

Indeed, I cannot reproduce the issue with your Exe. Did you compile with Delphi 11.1 and VCL UI 10.7.7 ?

We test with latest release v10.7.8.0

Good morning,

I still have both issues after updating to 10.7.8.0. But it appears logic as there is not any change in the component.

What's your Delphi version ?

Here we all compile with Delphi 11.1 patch 1 and everybody have the error and the access violation.
As I cannot reproduce with your Exe, it shoud not be dure to a runtime context. So probably something different when compiling.

Capture2
Capture3

We had a PC with Delphi 11.1 without Patch 1. When we compiled with it, we did not reproduce both issues.
Then we install patch 1 and re-compile. Now we reproduce both issues.

It seems there is an issue with the component and Patch 1; or only patch 1???

Can you confirm you tested without patch 1 ?

We have not installed patch 1 yet.

And do you plan to install it ? At least to reproduce the issues?

On the todolist

Good Morning,

Is there any update on this ?
Is there anything plan or an existing workaround ?

Best regards,

Nicolas