locked
System.Runtime.InteropServices.COMException at random times RRS feed

  • Question

  • I have a Windows Phone 8.1 App which gives the System.Runtime.InteropServices.COMException at times I cannot seem to narrow down. When the error does happen, it is always when I click a specific button (but not every time I click it, only at seemingly random times). The following is the error I receive when debugging:

    System.Runtime.InteropServices.COMException was unhandled by user code
      ErrorCode=-2147467259
      HResult=-2147467259
      Message=Error HRESULT E_FAIL has been returned from a call to a COM component.
      Source=mscorlib
      StackTrace:
           at System.Runtime.InteropServices.WindowsRuntime.IMap`2.Lookup(K key)
           at System.Runtime.InteropServices.WindowsRuntime.MapToDictionaryAdapter.Lookup[K,V](IMap`2 _this, K key)
           at System.Runtime.InteropServices.WindowsRuntime.MapToDictionaryAdapter.Indexer_Get[K,V](K key)
           at SetHelper81Test_Phone.MainPage.UpdateIsSet()
           at SetHelper81Test_Phone.MainPage.btnReplaceSelected_Click(Object sender, RoutedEventArgs e)
      InnerException:

    I have tested this app in three places:

    1. Lumia 920 - Windows Phone 8.1 from service provider (AT&T)

    2. Lumia Icon - Windows Phone 8.1 Developer Preview

    3. Windows Phone Emulator in Visual Studio 2013

    Both the Lumia 920 and Lumia Icon (for both of which the app was installed from the Windows Phone App Store) simply close the app when the exception occurs (they do not show an error, the app just closes). When I debug the app using the Emulator, I get the previously mentioned error and am pointed to the following code:

    Me.imgIsSet.Source = CType(Me.Resources("FrownSource"), ImageSource)
    I am not sure why this happens so unexpectedly (or at all), and am not sure what other information I can give. Is there any way I can get more detail about the exception? Is there anything I can do to stop it? Any help would be appreciated. Thanks.


    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Monday, November 10, 2014 6:34 PM

Answers

  • Hi Nathan,

    Can you post more information for me to reproduce your problem? I’d like see what happened in your code.

    >> Me.imgIsSet.Source = CType(Me.Resources("FrownSource"), ImageSource)

    You mentioned that this error message pointed you to the above code snippet. Have you tried to comment the code and to see if the problem is persists? You can also comment all suspicious code, un-comment the code one by one to test it. By using this approach, we can narrow down the issue and find something more.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Tuesday, November 18, 2014 9:15 AM
    Moderator

All replies

  • Hi Nathan,

    You need to post more information about this issue. I would recommend you upload your app to windows phone store beta. http://msdn.microsoft.com/en-us/library/windows/apps/jj215598(v=vs.105).aspx. If you get more details about this issue, post them here.

    If you still have questions, please feel free to let me know.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Tuesday, November 11, 2014 1:55 PM
    Moderator
  • Where can I get "more information about this issue"? I don't think the beta testing would be of any help, since no errors are given and beta testers don't see the code (do they? do beta versions & testers see anything different from the regular ones?). I really don't know what to do next.

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Tuesday, November 11, 2014 6:07 PM
  • Hi Nathan,

    Can you post more information for me to reproduce your problem? I’d like see what happened in your code.

    >> Me.imgIsSet.Source = CType(Me.Resources("FrownSource"), ImageSource)

    You mentioned that this error message pointed you to the above code snippet. Have you tried to comment the code and to see if the problem is persists? You can also comment all suspicious code, un-comment the code one by one to test it. By using this approach, we can narrow down the issue and find something more.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Tuesday, November 18, 2014 9:15 AM
    Moderator