locked
Arg_COMException in Silverlight

    Question

  • Hi,

    One of our client suddenly got Arg_COMException since from last Wednesday (30th Aug 2017). Here is the error message with the stack trace. Any help would be highly appreciated as this is a production issue.

    Thanks


    Gops


    Monday, September 4, 2017 2:31 PM

All replies

  • Hi Gops,

    Do you update anything on 30th Aug 2017? Please check from Control Panel -> Programs and Features -> View Installed Updates.

    According to the error message, this is a COM exception. Please check whether you use any COM components in your application and check whether the COM components update on 30th Aug 2017.

    If possible, please share some code snippet to help us reproduce this problem. And you also could try debug this problem in Visual Studio directly.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 5, 2017 7:23 AM
    Moderator
  • Hi Cai,

       This issue never happened in our development environment and QA environment, the same application is running since from long time in the client place but all of the sudden user got this error. 

        I do checked the updates in the client machine but there is no updates on the silverlight light and we dont use any COM components in our code. This issues is happening only with a specific form and a specifc tab. I comment out all the fields (in XAML) in the tab then the form started working. The bellow the XAML which is causing issue. if I commented out this line, then the form is loading....

                                                    <Grid x:Name="gdrCSAReference" Grid.Row="0" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblCSAReference" Grid.Row="0" Grid.Column="0" Text="CSA Reference" VerticalAlignment="Center"/>
                                                        <TextBox x:Name="txtCSAReference" Grid.Row="0" Grid.Column="1" Text="{Binding Path=CreditSupportAnnexName,Mode=TwoWay}" VerticalAlignment="Center" MaxLength="64"/>
                                                    </Grid>
                                                    <Grid x:Name="gdrDescription" Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" Margin="5,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition />
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblDescription" Grid.Row="0" Grid.Column="0" Text="Description" VerticalAlignment="Top"/>
                                                        <TextBox x:Name="txtDescription" Grid.Row="0" Grid.Column="1" Text="{Binding Path=Description,Mode=TwoWay}" VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" MaxLength="320"/>
                                                    </Grid>
    
                                                    <Grid x:Name="gdrNettingReference" Grid.Row="1" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblNettingReference" Grid.Row="0" Grid.Column="0" Text="Netting Reference" VerticalAlignment="Center"/>
                                                        <ToolKit:OnDemandAutoCompleteBox x:Name="acbNettingReference" Grid.Row="0" Grid.Column="1" ValueMemberPath="TradeNettingContractName" SelectedItem="{Binding Path=TradeNettingContract,Mode=TwoWay}" VerticalAlignment="Center">
                                                            <input:AutoCompleteBox.ItemTemplate>
                                                                <DataTemplate>
                                                                    <StackPanel>
                                                                        <TextBlock Text="{Binding Path=TradeNettingContractName}"  />
                                                                    </StackPanel>
                                                                </DataTemplate>
                                                            </input:AutoCompleteBox.ItemTemplate>
                                                        </ToolKit:OnDemandAutoCompleteBox>
                                                    </Grid>
                                                    
                                                    <Grid x:Name="gdrType" Grid.Row="2" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblType" Grid.Row="0" Grid.Column="0" Text="Type" VerticalAlignment="Center"/>
                                                        <TextBox x:Name="txtType" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" IsReadOnly="True"/>
                                                    </Grid>
    
                                                    <Grid x:Name="gdrOurEntity" Grid.Row="3" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblOurEntity" Grid.Row="0" Grid.Column="0" Text="Our Entity" VerticalAlignment="Center"/>
                                                        <TextBox x:Name="txtOurEntity" Grid.Row="0" Grid.Column="1"   IsReadOnly="True" />
                                                    </Grid>
                                                    <Grid x:Name="gdrOurCreditSupport" Grid.Row="3" Grid.Column="1" Margin="5,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblOurCreditSupport" Grid.Row="0" Grid.Column="0" Text="CSP – Our Entity" VerticalAlignment="Center" />
                                                        <ComboBox x:Name="cbOurCreditSupport" Grid.Row="0" Grid.Column="1" SelectedItem="{Binding Path=TradingEntityCSP,Mode=TwoWay}" >
                                                            <i:Interaction.Behaviors>
                                                                <Behaviors:SelectorRapidAccessKeyBehavior RapidAccessPropertyName="TradingEntityName" />
                                                            </i:Interaction.Behaviors>
                                                        </ComboBox>
                                                    </Grid>
    
    
                                                    <Grid x:Name="gdrCounterparty" Grid.Row="4" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblCounterparty" Grid.Row="0" Grid.Column="0" Text="Counterparty" VerticalAlignment="Center"/>
                                                        <TextBox x:Name="txtCounterparty" Grid.Row="0" Grid.Column="1"  VerticalAlignment="Center" IsReadOnly="True" />
                                                    </Grid>
                                                    <Grid x:Name="gdrCptyCreditSupport" Grid.Row="4" Grid.Column="1" Margin="5,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition />
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblCptyCreditSupport" Grid.Row="0" Grid.Column="0" Text="CSP – Counterparty" VerticalAlignment="Center"/>
                                                        <ToolKit:OnDemandAutoCompleteBox x:Name="acbCptyCreditSupport" Grid.Row="0" Grid.Column="1" ValueMemberPath="TradingCounterpartyName" SelectedItem="{Binding Path=TradingCounterpartyCSP,Mode=TwoWay}" VerticalAlignment="Center">
                                                            <input:AutoCompleteBox.ItemTemplate>
                                                                <DataTemplate>
                                                                    <StackPanel>
                                                                        <TextBlock Text="{Binding Path=TradingCounterpartyName}"  />
                                                                    </StackPanel>
                                                                </DataTemplate>
                                                            </input:AutoCompleteBox.ItemTemplate>
                                                        </ToolKit:OnDemandAutoCompleteBox>
                                                    </Grid>
    
                                                    <Grid x:Name="gdrEffectiveDate" Grid.Row="5" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblEffectiveDate" Grid.Row="0" Grid.Column="0" Text="Effective Date" VerticalAlignment="Center"/>
                                                        <controls:DatePicker x:Name="dpEffectiveDate" Grid.Row="0" Grid.Column="1" SelectedDate="{Binding Path=EffectiveDate,Mode=TwoWay}" VerticalAlignment="Center"/>
                                                    </Grid>
                                                    <Grid x:Name="gdrReviewDate" Grid.Row="5" Grid.Column="1" Margin="5, 5, 0, 5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblReviewDate" Grid.Row="0" Grid.Column="0" Text="Review Date" VerticalAlignment="Center"/>
                                                        <controls:DatePicker x:Name="dpReviewDate" Grid.Row="0" Grid.Column="1" SelectedDate="{Binding Path=ReviewDate,Mode=TwoWay}" VerticalAlignment="Center"/>
                                                    </Grid>
    
                                                    <Grid x:Name="gdrExpiryDate" Grid.Row="6" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblExpiryDate" Grid.Row="0" Grid.Column="0" Text="Expiry Date" VerticalAlignment="Center"/>
                                                        <controls:DatePicker x:Name="dpExpiryDate" Grid.Row="0" Grid.Column="1" SelectedDate="{Binding Path=ExpiryDate,Mode=TwoWay}" VerticalAlignment="Center"/>
                                                    </Grid>
                                                    <Grid x:Name="gdrGoverningLaw" Grid.Row="6" Grid.Column="1" Margin="5,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition />
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblGoverningLaw" Grid.Row="0" Grid.Column="0" Text="Governing Law" VerticalAlignment="Center"/>
                                                        <ComboBox x:Name="cbGoverningLaw" Grid.Row="0" Grid.Column="1" SelectedItem="{Binding Path=CountryStateItem,Mode=TwoWay}" IsEnabled="False" >
                                                            <i:Interaction.Behaviors>
                                                                <Behaviors:SelectorRapidAccessKeyBehavior RapidAccessPropertyName="CountryStateName" />
                                                            </i:Interaction.Behaviors>
                                                        </ComboBox>
                                                    </Grid>
    
                                                    <Grid x:Name="gdrBaseCurrency" Grid.Row="7" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblBaseCurrency" Grid.Row="0" Grid.Column="0" Text="Base Currency" VerticalAlignment="Center"/>
                                                        <ComboBox x:Name="cbBaseCurrency" Grid.Row="0" Grid.Column="1" SelectedItem="{Binding Path=BaseCurrency,Mode=TwoWay}" >
                                                            <i:Interaction.Behaviors>
                                                                <Behaviors:SelectorRapidAccessKeyBehavior RapidAccessPropertyName="CurrencyName" />
                                                            </i:Interaction.Behaviors>
                                                        </ComboBox>
                                                    </Grid>
                                                    <Grid x:Name="gdrEnabled" Grid.Row="7" Grid.Column="1" Margin="5, 5, 0, 5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblEnabled" Grid.Row="0" Grid.Column="0" Text="Enabled" VerticalAlignment="Center" />
                                                        <CheckBox x:Name="chbEnabled" Grid.Row="0" Grid.Column="1" IsChecked="{Binding Path=IsEnabled,Mode=TwoWay}" VerticalAlignment="Center" />
                                                    </Grid>
                                                 
    
                                                    <Grid x:Name="gdrBilateralRules" Grid.Row="8" Grid.Column="0" Margin="0,5,0,5" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblBilateralRules" Grid.Row="0" Grid.Column="0" Text="Bilateral Rules" VerticalAlignment="Center"/>
                                                        <ComboBox x:Name="cbBilateralRules" Grid.Row="0" Grid.Column="1" SelectedItem="{Binding Path=CreditSupportAnnexRule,Mode=TwoWay}" >
                                                            <i:Interaction.Behaviors>
                                                                <Behaviors:SelectorRapidAccessKeyBehavior RapidAccessPropertyName="CreditSupportAnnexRuleName" />
                                                            </i:Interaction.Behaviors>
                                                        </ComboBox>
                                                    </Grid>
                                                    <Grid x:Name="gdrAutoSettlement" Grid.Row="8" Grid.Column="1" Margin="5, 5, 0, 5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblAutoSettlement" Grid.Row="0" Grid.Column="0" Text="Auto Settlement" VerticalAlignment="Center" />
                                                        <CheckBox x:Name="chbAutoSettlement" Grid.Row="0" Grid.Column="1" IsChecked="{Binding Path=IsAutoSettlement,Mode=TwoWay}" VerticalAlignment="Center" />
                                                    </Grid>
                                                    
                                                    <!--<Grid x:Name="gdrTradeSpecific" Grid.Row="9" Grid.Column="1" Margin="5,5,0,5" Visibility="Collapsed" >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblTradeSpecific" Grid.Row="0" Grid.Column="0" Text="Trade Specific" VerticalAlignment="Center"/>
                                                        <CheckBox x:Name="chbTradeSpecific" Grid.Row="0" Grid.Column="1" IsChecked="{Binding Path=IsTradeSpecific,Mode=TwoWay,Converter={StaticResource IsCheckConverter}}" VerticalAlignment="Center"/>
                                                    </Grid>-->
                                                    <Grid x:Name="gdrIsSpilttingAgreemnt" Grid.Row="9" Grid.Column="0" Margin="0, 5, 0, 5">
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition />
                                                        </Grid.RowDefinitions>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150" />
                                                            <ColumnDefinition />
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblIsSplittingAgreement" Grid.Row="0" Grid.Column="0" Text="Splitting Agreement" VerticalAlignment="Center" />
                                                        <CheckBox x:Name="chkIsSplittingAgreement" Grid.Row="0" Grid.Column="1" IsChecked="{Binding IsSplittingAgreement, Mode=TwoWay,Converter={StaticResource IsCheckConverter}}" VerticalAlignment="Center" />
                                                    </Grid>
                                                    <!--<Grid x:Name="gdrTradeSpecificComments" Grid.Row="9" Grid.Column="1" Grid.RowSpan="2" Margin="5,5,0,5" Visibility="Collapsed"  >
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="145"/>
                                                            <ColumnDefinition />
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblTradeSpecificComments" Grid.Row="0" Grid.Column="0" Text="Trade Specific Comments" VerticalAlignment="Top"/>
                                                        <TextBox x:Name="txtTradeSpecificComments" Grid.Row="0" Grid.Column="1" Text="{Binding Path=TradeSpecificComments,Mode=TwoWay}" VerticalScrollBarVisibility="Visible" TextWrapping="Wrap"/>
                                                    </Grid>-->
    
                                                    <Grid x:Name="gdrSpilttingAgreemntValue" Grid.Row="10" Grid.Column="0" Margin="0, 5, 0, 5">
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition />
                                                        </Grid.RowDefinitions>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="150" />
                                                            <ColumnDefinition />
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblSpilttingAgreemntValue" Grid.Row="0" Grid.Column="0" Text="Spiltting Agreement Value" VerticalAlignment="Center" />
                                                        <ToolKit:NumericBox x:Name="nbSpilttingAgreemntValue" Grid.Row="0" Grid.Column="1" Value="{Binding SplittingAgreementValue  , Mode=TwoWay}" VerticalAlignment="Center" IsEnabled="False" />
                                                    </Grid>
                                                    
                                                    <Grid x:Name="gdrEverGreen" Grid.Row="11" Grid.Column="0" Margin="0, 5, 0, 5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition  Width="150"/>
                                                            <ColumnDefinition />
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="lblEvergreen" Grid.Row="0" Grid.Column="0" Text="Evergreen" VerticalAlignment="Center" />
                                                        <CheckBox x:Name="chbEvergreen" Grid.Row="0" Grid.Column="1" IsChecked="{Binding Path=EverGreen, Mode=TwoWay,Converter={StaticResource IsCheckConverter}}" VerticalAlignment="Center" />
                                                    </Grid>


    Gops

    Tuesday, September 5, 2017 9:33 AM
  • Hi Gops,

    There are two questions about your problem. Please help me reproduce your problem by asking these questions.

    1. What's ToolKit:OnDemandAutoCompleteBox in your application? Is it a third part control? Please share its assembly.
    2. What's the machine environment of the client machine? The used browsers and Windows version. I need to build a VM to simulate your environment.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 6, 2017 7:56 AM
    Moderator
  • Hi Weiwei,

    We identified, some of dropdowns and OnDemandAutoComplete is causing issue while loading. So we hide those controls and make it visible after a short delay one by one after loading. Now the form is functioning. This is a kind of workaround.

    Still no clue what is causing the issue  and what could be the correct fix.

    To answer your question,

    1. OnDemandAutoCompleteBox is our own control developed based on AutoCompleteBox control. This control will accept data service query in property and apply the filter in to data service query dynamically based on the predicate entered in the text box.

    2. Client is using IE 11 and in Windows 7 Box.


    Thanks


    Gops

    Wednesday, September 6, 2017 9:44 AM
  • Hi Gops,

    I'm glad that you have found a workaround for your problem and thanks for sharing your solution here.

    Please mark your workaround which is benefit to other communities who has the same problem.

    I don't find any issue in your sample XAML code. So I think the problem may be related to the control data source that bind on OnDemandAutoCompleteBox control. The data source is get from a data service, the control need to load after get all data from data service. If there has large data, it need to delay loading it.

    If any questions about Silverlight, please feel free to come back.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 7, 2017 1:17 AM
    Moderator