locked
Error with windows store Hub control: The parameter is incorrect

    Question

  • Everything was working fine but since I changed some data in the DB that feed my WCF I always get the same error no mather what I try

    When scrolling from right to left in the hub control I always (at 50% scroll) get an error that say: the parameter is incorrect with no stack trace at all, I added Try/Catch block to ALL functions, properties in the code and still got the error...

    I found this exception right before the error happens, even setting debug exception to catch all thrown error doesn't catch the error. And when the error is thrown, VS always open the App.g.i.vb file... I really don't know what part of my code does the error.

    Exception:Caught: "The type 'Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior, Microsoft.VisualStudio.Diagnostics.ServiceModelSink, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' registered for extension 'Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior' could not be loaded." (System.Configuration.ConfigurationErrorsException)
    A System.Configuration.ConfigurationErrorsException was caught: "The type 'Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior, Microsoft.VisualStudio.Diagnostics.ServiceModelSink, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' registered for extension 'Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior' could not be loaded."
    Time: 2014-10-09 6:09:45 AM
    Thread:<No Name>[14272]

    Thursday, October 09, 2014 10:20 AM

Answers

  • Found the problem, it was a memory leak, I reloaded items every time the Loaded event was triggered, to reproduce the problem create a hub a load it from code-behind using a GridView and don't use the Unloaded event, I didn't wanted my items to unload so I used the code on the loaded event:

    if not GridView.items.count > 0 then

    **** LOAD ITEMS ****

    end if

    Friday, October 10, 2014 12:22 AM

All replies

  • Please post a reproduction app to OneDrive and share a link to it here.  I'll check it out.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, October 09, 2014 12:23 PM
    Moderator
  • Found the problem, it was a memory leak, I reloaded items every time the Loaded event was triggered, to reproduce the problem create a hub a load it from code-behind using a GridView and don't use the Unloaded event, I didn't wanted my items to unload so I used the code on the loaded event:

    if not GridView.items.count > 0 then

    **** LOAD ITEMS ****

    end if

    Friday, October 10, 2014 12:22 AM