NullReferenceException in VS2012 design view when RadTimeSpanPicker control selected

16 posts, 0 answers
  1. Dan
    Dan avatar
    1 posts
    Member since:
    Nov 2012

    Posted 20 Jan 2013 Link to this post

    This problem happens within the VS2012 UI with the sample project whenever I try to edit the RadTimeSpanPicker in design view.  The project runs fine in the emulator.  Also, I don't see the problem if I use Expression Blend to edit.  I see similar problems (with different errors) in design view if I create my own project, although it does compile and run in the emulator.

    I'm not sure if this is my environment, but I tried uninstalling and reinstalling RadControls and the WP7 and WP8 SDKs, with same result.  If this is a known issue, any suggestions would be appreciated.  Thanks ahead of time. 

    Here are the particulars...

    Dev environment:  RadControls for Windows Phone 7 Q3 2012.  VS2012 Ultimate, update 1. Win8/x64 Pro.

    Here is how I repro the problem:

    1. Open the sample solution, ExamplesCS_WP.sln for WP7, in VS2012.
    2. In Examples_WP project, under the TimeSpanPicker, open FirstLook.xaml in design view by double-clicking in solution explorer.
    3. Wait for XAML to render in design view window, notice that everything looks OK, including TimeSpanPicker control.
    4. Click on TimeSpanPicker control in design view

    Result: Design disappears from view window and is replaced with an exception message.  Solution is not buildable until design view is closed, apparently because of locked files.  Here is the exception message...

    An Exception was thrown.

    NullReferenceException: Object reference not set to an instance of an object.

    Stack Trace:

    at Microsoft.Expression.HostUtility.UriResolver.ComponentUriResolver.Parse(Uri uri, Uri baseUri, String assemblyName, IHostProject project)

    at Microsoft.Expression.HostUtility.UriResolver.ComponentUriResolver.TryResolve(Uri uri, String rootPath, String documentPath, String assemblyName, HostDesignTimeUriInfo& uriResolutionInfo)

    at Microsoft.Expression.HostUtility.UriResolver.UriResolverFactory.TryResolve(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName, HostDesignTimeUriInfo& uriResolutionInfo)

    at Microsoft.Expression.HostUtility.UriResolver.UriResolver.TryResolve(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName)

    at Microsoft.VisualStudio.ExpressionHost.HostServices.HostProjectService.Microsoft.Expression.DesignHost.IHostProjectService.MakeThemeResourceDesignTimeUri(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName)

    at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostProjectService.<>c__DisplayClass32.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteHostProjectService.MakeThemeResourceDesignTimeUri>b__31()

    at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()

    at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    InnerException: None



     

  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 21 Jan 2013 Link to this post

    Hello Dan,

    Thanks for writing and for reporting this issue.

    I would like to inform you that we are aware of it and have issued a fix for it with Q2 2012 SP2. The reasons for this issue are unknown for us. We think that with VS 2012 and the changes Microsoft introduced some changes in the designer which may be causing these issues.

    Please, download and install Q2 2012 SP2 and let us know if the issue is gone.

    Greetings,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. José
    José avatar
    8 posts
    Member since:
    May 2012

    Posted 07 Feb 2013 Link to this post

    Hi Deyan

    In My case I have this problem with the Q2 2012 version, I just uninstall and reinstall but still not resolve the problem.

    So I decide to  install que q3 2012 today and the problem still exists.

    Well , I will use Blend for now until you guys can solve the problem


    Regards

    José
  5. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 12 Feb 2013 Link to this post

    Hello Jose,

    There will be an update for Visual Studio soon which will address this problem as it is not coming from our codebase.

    You should not experience any more issues after updating Visual Studio 2012.

    I hope this helps.

    Kind regards,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  6. Add-in Express
    Add-in Express avatar
    15 posts
    Member since:
    Jan 2013

    Posted 13 Feb 2013 Link to this post

    Hello Deyan,

    Unfortunately I faced with the same issue: get a similar stack trace when I add some Telerik controls to the Visual Studio 2012 designer surface and then try to select them for configuring properties. In my case the RadCalendar control is not working properly in Visual Studio 2012 (on Windows 8 x64). Moreover, I tried to add another controls to a test WP7 project in Visual Studio 2012 and reproduced the issue without any specific steps. So, the general question is: Why do the standard controls work in Visual Studio 2012  properly and Telerik RadControls for WP7 doesn't???

    Anyway, thank you for the great controls! :-)

    Regards from Belarus,
    Eugene Astafiev
  7. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 13 Feb 2013 Link to this post

    Hello Irina,

    Thanks for writing.

    Please refer to the previous posts on this thread for information about when this issue will be addressed.

    The standard controls are integrated in Visual Studio in a different way, i.e. they are not third-party controls.

    There is an issue in Visual Studio which causes this behavior and it will soon be addressed. Can you please install this update for Visual Studio 2012 and let us know if the issue persists?:

    http://www.microsoft.com/en-us/download/details.aspx?id=36539

    Thanks for your time.

    Regards,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  8. Add-in Express
    Add-in Express avatar
    15 posts
    Member since:
    Jan 2013

    Posted 13 Feb 2013 Link to this post

    Hi Deyan,

    Thank you for the link. I installed the Update 2 CTP on my PC with Windows 8 x64 and Visual Studio 2012. But it doesn't help.

    I have re-read the forum thread from the beginning and can't find the exact cause of the issue (detailed description). So, why did you decide that the issue belongs to Visual Studio 2012? Could you please provide me with a link to the ticket on the Connect web site? Is there any?

    Regards from Belarus,
    Eugene Astafiev

  9. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 14 Feb 2013 Link to this post

    Hi Eugene,

    Thanks for writing back.

    The issue on Microsoft Connect is private and cannot be seen by third parties.

    I am not sure whether the Update should address it as it is a CTP and might not contain all fixes planned for the official release. Can you please copy-paste me here the Stack Trace that you are getting in the Visual Studio's designer?

    Thanks for your time.

    All the best,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  10. Add-in Express
    Add-in Express avatar
    15 posts
    Member since:
    Jan 2013

    Posted 14 Feb 2013 Link to this post

    Hi Deyan,

    Here it is:
    at Microsoft.Expression.HostUtility.UriResolver.ComponentUriResolver.Parse(Uri uri, Uri baseUri, String assemblyName, IHostProject project)
       at Microsoft.Expression.HostUtility.UriResolver.ComponentUriResolver.TryResolve(Uri uri, String rootPath, String documentPath, String assemblyName, HostDesignTimeUriInfo& uriResolutionInfo)
       at Microsoft.Expression.HostUtility.UriResolver.UriResolverFactory.TryResolve(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName, HostDesignTimeUriInfo& uriResolutionInfo)
       at Microsoft.Expression.HostUtility.UriResolver.UriResolver.TryResolve(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName)
       at Microsoft.VisualStudio.ExpressionHost.HostServices.HostProjectService.Microsoft.Expression.DesignHost.IHostProjectService.MakeThemeResourceDesignTimeUri(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostProjectService.<>c__DisplayClass32.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteHostProjectService.MakeThemeResourceDesignTimeUri>b__31()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
  11. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 19 Feb 2013 Link to this post

    Hi Eugene,

    Thanks for writing back.

    Yes, that's the issue we're expecting Microsoft to address. We have been in contact with them and they have identified the glitch which causes it.

    Interestingly though, we have experienced this issue only in Windows Phone 8 projects, we cannot reproduce it with Windows Phone 7 projects.

    The issue is related to third-party controls integration with Visual Studio. In our suite we have the styles for our controls in separate files which are then merged into the themes\generic.xaml file via MergedDictionaries. Because of an issue in the Visual Studio designer, these merged dictionaries cannot be resolved correctly and thus an exception is thrown, although the mechanism works in runtime.

    We will dive further into the case and will let you know if there's something on our side we can improve.

    Greetings,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  12. Add-in Express
    Add-in Express avatar
    15 posts
    Member since:
    Jan 2013

    Posted 19 Feb 2013 Link to this post

    Hi Deyan,

    Thank you for the detailed description. Note, the issue is reproducible with Windows Phone 7.1 projects (not Windows Phone 8).

    Please let me know if you get any news from Microsoft.

    Regards from Belarus,
    Eugene Astafiev
  13. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 22 Feb 2013 Link to this post

    Hello Eugene,

    We will consider this thread closed now.

    Feel free to get back to us when the Update 2 is officially released and it does not solve the exception mentioned here.

    Greetings,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  14. Christophe
    Christophe avatar
    10 posts
    Member since:
    Feb 2011

    Posted 28 Apr 2013 Link to this post

    Hi,

    My Visual Studio 2012 just to update with update 2.
    Before this update I had no problem.
    Now I have the same issue as mentioned above (only when a telerik control is in my xaml):

     

    NullReferenceException : La référence d'objet n'est pas définie à une instance d'un objet.

    à Microsoft.VisualStudio.ExpressionHost.Platform.DTEReferenceResolver.GetReferences(IHostProject project, Object& connectionPointSource)
      à Microsoft.VisualStudio.ExpressionHost.Platform.PlatformUtilities.GetReferenceResolver(IServiceProvider services, HostProject project)
      à Microsoft.VisualStudio.ExpressionHost.HostServices.HostProject.Microsoft.Expression.DesignHost.IHostProject.get_References()
      à Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostProject.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteHostProject.get_References>b__6b()
      à Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
      à Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    WPF APP, .Net Framework 4.5, Telerik 2013.1.403.45 (Dev)

    My XAML (error on UserControl)
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 mc:Ignorable="d" 
                 x:Class="M7.Controls.ListePeriodeReferenceConvention"
                 >
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="80"/>
                <RowDefinition Height="17*"/>
                <RowDefinition Height="90"/>
            </Grid.RowDefinitions>
      
      
      
            <TextBlock Margin="20"  Text="Liste des périodes de facturation" FontSize="20" HorizontalAlignment="Center"/>
      
            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition Width="200*"/>
                </Grid.ColumnDefinitions>
      
                <telerik:RadGridView Margin="10" AutoGenerateColumns="False" ItemsSource="{Binding SelectedConventionPeriode.PeriodeReferences, Mode=TwoWay}" SelectedItem="{Binding SelectedPeriodeReference, Mode=TwoWay}" ShowGroupPanel="False" SelectionMode="Single" Opacity="90"/>
                  
                <telerik:RadTimeline Grid.Column="1" Margin="10">
                    
                    <telerik:RadTimeline.Intervals>
                        <telerik:YearInterval />
                        <telerik:MonthInterval />
                        <telerik:WeekInterval />
                        <telerik:DayInterval />
                    </telerik:RadTimeline.Intervals>
                </telerik:RadTimeline>
                  
            </Grid>
        </Grid>
    </UserControl>

    BR,
    Christophe
  15. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 29 Apr 2013 Link to this post

    Hello Christophe,

    Thanks for writing and for repoting this.

    This seems to be somehow related to Visual Studio 2012 Update 2. I cannot see any Telerik calls in the Stack Trace you're pasting and I am not quite sure this is because of our controls.

    What I can suggest is restarting Visual Studio and also making sure that all referenced Telerik assemblies are with the same version.

    I hope this helps.

    Regards,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  16. Stephan
    Stephan avatar
    29 posts
    Member since:
    May 2013

    Posted 04 Jul 2013 Link to this post

    Just want to add here that this issue still exists with Visual Studio 2012 Update 3 which came in recently.

    Did someone test this with Visual Studio 2013 beta?
    at Microsoft.Expression.HostUtility.UriResolver.ComponentUriResolver.Parse(Uri uri, Uri baseUri, String assemblyName, IHostProject project)
    at Microsoft.Expression.HostUtility.UriResolver.ComponentUriResolver.TryResolve(Uri uri, String rootPath, String documentPath, String assemblyName, HostDesignTimeUriInfo& uriResolutionInfo)
    at Microsoft.Expression.HostUtility.UriResolver.UriResolverFactory.TryResolve(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName, HostDesignTimeUriInfo& uriResolutionInfo)
    at Microsoft.Expression.HostUtility.UriResolver.UriResolver.TryResolve(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName)
    at Microsoft.VisualStudio.ExpressionHost.HostServices.HostProjectService.Microsoft.Expression.DesignHost.IHostProjectService.MakeThemeResourceDesignTimeUri(Uri uri, String rootPath, String referencingDocumentPath, String assemblyName)
    at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostProjectService.<>c__DisplayClass32.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteHostProjectService.MakeThemeResourceDesignTimeUri>b__31()
    at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
    at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
  17. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 09 Jul 2013 Link to this post

    Hello Stephan,

    This issue is caused by the Visual Studio Designer. There is a workaround possible which is done by putting all controls' styles into the generic.xaml file for each assembly instead of creating separate files and using MergedDictionary for each file.

    Although we do not approve this approach since it makes supporting the styles more complicated, it seems we will have to do it to avoid these exceptions.

    Regards,
    Deyan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
DevCraft banner