maui icon indicating copy to clipboard operation
maui copied to clipboard

[Windows] Faced no installed components were detected exception

Open ashok-kuvaraja opened this issue 3 years ago • 6 comments

Description

Hi Team,

We have created the custom control by using the Layout class. There are two classes (parent and child) derived from the Layout class in our custom control. In that control, we initialize all the properties in the child class' measure method itself instead of the parent class. So, After initializing the properties, we need to add a child to the parent class for a purpose. In this case, we are facing the no installed components were detected exception. We prepared a simple sample to reproduce the issue. Please check and update us or provide us a proper way to add a child to parent from its child at runtime (workaround) if we are wrong.

Steps to Reproduce

  1. Run the below sample. CustomControlSample.zip
  2. Click the click me button.
  3. Exception will be thrown from the child adding place.

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

windows10.0.19041.0

Did you find any workaround?

No response

Relevant log output

Exception thrown: 'System.Runtime.InteropServices.COMException' in WinRT.Runtime.dll
An exception of type 'System.Runtime.InteropServices.COMException' occurred in WinRT.Runtime.dll but was not handled in user code
No installed components were detected.

The program '[12208] SfViewSimpleSample.exe' has exited with code 4294967295 (0xffffffff).

ashok-kuvaraja avatar Jul 26 '22 04:07 ashok-kuvaraja

I get the same issue when using the DataGrid from syncfusion to display data. SfViewSimpleSample shows me that you also use their controls. So bug in their lib?

MagicAndre1981 avatar Jul 27 '22 21:07 MagicAndre1981

Hey there, thanks for the report! Two things:

  1. Could you please provide the repro through a GitHub repo
  2. Can you also reproduce this without the Syncfusion controls, to rule out that this is something that is happening there.

Thanks!

jfversluis avatar Jul 28 '22 18:07 jfversluis

Hi @ashok-kuvaraja. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Jul 28 '22 18:07 ghost

Hi @jfversluis,

Thanks for the update.

In that simple sample, I reproduced the issue without using the Syncfusion controls. You can reproduce the issue by following the steps to reproduce procedure. Please check that sample and let me know your feedback,

Regards, Ashok

ashok-kuvaraja avatar Jul 29 '22 11:07 ashok-kuvaraja

syncfusion support said they fix my DataGrid with this weeks updates , but I run into a new COMException:

Exception thrown: 'System.Runtime.InteropServices.COMException' in WinRT.Runtime.dll
Error HRESULT E_FAIL has been returned from a call to a COM component.

so I can't say if their update fixed my issue or not 🤷‍♂️

MagicAndre1981 avatar Aug 08 '22 19:08 MagicAndre1981

ok, the error HRESULT E_FAIL has been returned from a call to a COM component. was caused by syncfusions SfBusyIndicator, now app starts and shows data in the grid and the original error No installed components were detected. is gone.

MagicAndre1981 avatar Aug 10 '22 05:08 MagicAndre1981

Is this still an issue? I can't tell :)

mattleibow avatar Mar 07 '23 23:03 mattleibow

Hi @ashok-kuvaraja. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Mar 07 '23 23:03 ghost

Hi @mattleibow,

Still I could face this issue in the lastest version too. Can you please check? 😬

image

ashok-kuvaraja avatar Mar 08 '23 06:03 ashok-kuvaraja

I think it may be because you are adding a child during a layout cycle? Maybe you can avoid this by adding via a dispatch. This should cause the child to be added after the layout is complete:

this.Owner.Dispatcher.Dispatch(() => this.Owner.Children.Add(myLabel));

mattleibow avatar Apr 03 '23 22:04 mattleibow

Hi @ashok-kuvaraja. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Apr 03 '23 22:04 ghost

And the exception is just because when you do something WinUI does not like, it just dies. The Windows team is working on getting better exceptions so in recent WindowsAppSDK updates you may get better messages.

mattleibow avatar Apr 03 '23 22:04 mattleibow

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

ghost avatar Apr 07 '23 23:04 ghost