maui
                                
                                 maui copied to clipboard
                                
                                    maui copied to clipboard
                            
                            
                            
                        [Windows] Faced no installed components were detected exception
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
- Run the below sample. CustomControlSample.zip
- Click the click me button.
- 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).
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?
Hey there, thanks for the report! Two things:
- Could you please provide the repro through a GitHub repo
- Can you also reproduce this without the Syncfusion controls, to rule out that this is something that is happening there.
Thanks!
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.
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
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 🤷♂️
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.
Is this still an issue? I can't tell :)
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.
Hi @mattleibow,
Still I could face this issue in the lastest version too. Can you please check? 😬
 
                                    
                                    
                                    
                                
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));
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.
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.
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.