This is a migrated thread and some comments may be shown as answers.

NullReferenceException after switch to version 5.3.12.119

16 Answers 257 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ClausDC
Top achievements
Rank 1
Iron
ClausDC asked on 23 Jan 2012, 11:19 AM
I have the wpf report viewer in a user control which is on a tab (Telerik RadTabControl). When I close the tab I get
the following exception:


System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Telerik.ReportViewer.Wpf
  StackTrace:
       at Telerik.ReportViewer.Wpf.ReportViewer.ReportViewerUnloaded(Object sender, RoutedEventArgs e)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at MS.Internal.FrameworkObject.OnUnloaded(RoutedEventArgs args)
       at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
       at System.Windows.BroadcastEventHelper.BroadcastUnloadedEvent(Object root)
       at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at ...Controller.Main(String[] args) in ...\Controller.cs:line 537
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:


This exception did not occur in Reporting version 5.3.11.1116

16 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 23 Jan 2012, 12:46 PM
Hello Claus,

In v. 5.3.12.119 we have not built against the latest WPF controls version, so if you have referenced RadControls for WPF Q3 SP1, you should add binding redirects in order for the viewer to function correctly. For more information refer to How to: Add report viewer to a WPF application Binding Redirects section. If the problem persists, please open a support ticket and attach a sample project that exhibits the problem so we can look into it locally.

All the best,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Ristogod
Top achievements
Rank 2
answered on 25 Jan 2012, 05:42 PM
I recently tried this by adding these lines into my config file and it does not fix the issue. The issue still remains.

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Windows.Controls" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
      <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2011.3.1220.40"/>
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Windows.Controls.Input" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
      <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2011.3.1220.40"/>
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Windows.Controls.Navigation" culture="neutral" publicKeyToken="5803cfa389c90ce7"/>
      <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2011.3.1220.40"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>

This is the exception I am getting.

<Message>Object reference not set to an instance of an object.</Message>
 <Time>9:23 AM</Time>
 <Source>Telerik.ReportViewer.Wpf</Source>
 <StackTrace>   at Telerik.ReportViewer.Wpf.ReportViewer.ReportViewerUnloaded(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastUnloadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)</StackTrace>
0
Bernard
Top achievements
Rank 1
answered on 26 Jan 2012, 02:28 PM
I've excalty the same issue .... 

Is there a solution ?
0
Vicente
Top achievements
Rank 1
answered on 26 Jan 2012, 04:01 PM
Hello, I am having exactly the same issue. The report is within a RadTabItem. To give you more clues this happens after I create a second TabItem. When opening and closing only the report, the exception doesn't raise.
Please someone can help us? This is a really annoying issue for my client.
Thanks.
0
Steve
Telerik team
answered on 26 Jan 2012, 04:15 PM
Hi guys,

We verified the problem and it would be addressed in a subsequent release, be it internal build or official release. Unfortunately there is no workaround that we can offer for the time being for which we apologize.

Kind regards,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Ristogod
Top achievements
Rank 2
answered on 27 Jan 2012, 03:32 PM
I'm going to have to request an internal build if possible. We are between a rock and a hard place on this issue.

The previous version has multiple issues with it (page numbering problems, missing tool tips on buttons, inability to change document rendering message). So it is inadequate for us. We only continued to use it because we were promised fixes for our issues in the next version.

When we updated to the next version, we didn't notice right away that Telerik had introduced a fatal exception. So development on reports continued on the 5.3.12.119 version.

We've since rolled back our Telerik Reporting assemblies (dlls) and have uninstalled the 5.3.12.119 version from our machines and reinstalled the 5.3.11.1116 version. However, none of our reports can be loaded in the designer now. Every one of them throws an exception (despite us manually changing the version stored in each report back). Therefore we cannnot continue work on our reports. We could try rolling back our reports to an earlier time, but then we will lose a couple of months of work. We have about 1 month before our application is scheduled to be released to the public and don't have the time or resources to redo the work or remake the reports.

We need some immediate solution to resolve this issue!

Edit: I fixed my mistyping of the previous version.
0
Chris Gillies
Top achievements
Rank 1
answered on 27 Jan 2012, 03:46 PM
I do not see a 5.3.11.1119 version, you probably talk about the Q3 (5.3.11.1116). Problems with the designer not opening after changing versions is usually caused by improper upgrade or so I've noticed from experience. Go into your solution and delete manually reporting dlls, then re-add the references to the desired version. The Upgrade Wizard (http://www.telerik.com/help/reporting/ui-upgrade-wizard.html) does update the references, but any manually copied dlls would have to be deleted. Ah, and don't forget to rebuild!

While the bug in the current version is bad, I do not think starting a flame and complaining about everything including not being able to revert to previous version you had working is in your favor. After all it used to work for you, right?, readding references and rebuilding your project would have probably been faster than posting a reply.

Good luck!
0
Ristogod
Top achievements
Rank 2
answered on 27 Jan 2012, 04:01 PM
Yes, I mistyped. I meant to type 5.3.11.1116 for the previous version.

I have replaced all the manually referenced dlls. We have rebuilt the project. The reports still throw exceptions when trying to load then in the designer.

I wasn't starting a flame. I'm not sure why you'd accuse me of that as if that was my intention. I was explaining a real world situation that we have unexpectedly run into and trying to convey my level of concern. I was seeking help.

I don't understand why you made the comment that posting was a waste of my time, that it would have been better spent re-adding references and rebuilding. That is something we already attempted and it did not work. Your assumption that it has to work is some what presumptuous, right? After all, the previous post about Binding redirects did not resolve any one else's issue either.

As far as it "used to work for us", it did. But on versions of the reports that are much older. If I return to those working versions, I am going lose a lot of valuable work. I'm on a tight deadline with limited resources and I'd much rather have a solution that doesn't involve me recreating a month's worth of report changes. And it's not as if I'm still not attempting to isolate the issue to prevent losing the work. But you can understand why I might appreciate a solution from Telerik as opposed to me spending my time when I could be working on some  other outstanding issue in our application can't you? Especially when you consider that your customer's didn't create the bug in the viewer, Telerik did.
0
Ristogod
Top achievements
Rank 2
answered on 27 Jan 2012, 04:25 PM
I've gone back and re-read my earlier post many times now and I'm still at a loss as to why you would accuse me of trying to start a flame. I tried to see exactly what it was I was complaining about, as you put it, but I only see myself as explaining the situation I was in. My hope was if anyone else here on the thread had run into similar issues, that they could share how they resolved them (isn't that the point of a forum?). And if they weren't able to resolve them, possibly garner support by allowing others to express their concerns as to why they would prefer a more immediate resolution as opposed to waiting 2-3 more weeks. I fail to see why I was deserving of the accusatory remarks against my intentions.
0
Steve
Telerik team
answered on 27 Jan 2012, 05:55 PM
Hi guys,

We would do our best to release an internal build with a fix for this problem early next week.

Thank you for the patience.

All the best,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Steve
Telerik team
answered on 31 Jan 2012, 05:52 PM
Hi guys,

As promised an internal build that addresses the problem is already live on our server.

Greetings,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Ristogod
Top achievements
Rank 2
answered on 31 Jan 2012, 05:59 PM
Thank you so very much. I greatly appreciate the effort.
0
Ristogod
Top achievements
Rank 2
answered on 03 Feb 2012, 11:20 PM
I have tried the internal build and it does fix most of our problems. But like so often, it also introduces a new problem.

We are using a custom theme for the Wpf ReportViewer. It references a class called ZoomConverter. It throws an error trying to instantiate ZoomConverter. This is the error:

<Message>'No matching constructor found on type 'Telerik.ReportViewer.Wpf.ZoomConverter'. You can use the Arguments or FactoryMethod directives to construct this type.' Line number '11' and line position '6'.</Message>
    <Time>3:46 PM</Time>
    <InnerExceptionLogEntry>
      <Message>No default constructor found for type 'Telerik.ReportViewer.Wpf.ZoomConverter'. You can use the Arguments or FactoryMethod directives to construct this type.</Message>
      <Time>3:46 PM</Time>
      <Source>System.Xaml</Source>
      <StackTrace>   at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.EnsureConstructorDelegate(XamlTypeInvoker type)
   at System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CreateInstance(XamlTypeInvoker type)
   at System.Xaml.Schema.XamlTypeInvoker.CreateInstance(Object[] arguments)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstanceWithCtor(XamlType xamlType, Object[] args)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args)</StackTrace>
    </InnerExceptionLogEntry>
    <Source>PresentationFramework</Source>
    <StackTrace>   at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.RadDockPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at Telerik.Windows.Controls.TabControl.RadTabControlBase.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.RadDockPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.RadDockPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)</StackTrace>

Why does ZoomConverter no longer instantiate? Is a parameter-less constructor missing?
0
Steve
Telerik team
answered on 09 Feb 2012, 09:40 AM
Hi,

Yes we have introduced a change to the ZoomConverter due to its localization and your old template would no longer be valid. You would need to extract the new template from the internal build and apply your theme customizations.

Greetings,
Steve
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
stefano
Top achievements
Rank 1
answered on 29 Feb 2012, 04:38 PM
Hello 
I have installed the latest builds of RadControls for WPF (2012.1.215.40) and Reporting (6.0.12.215) and now I have the same problem (I get the null object exception in the ReportViewerUnloaded  method)

Could you please advice?

Best regards
Stefano
0
Steve
Telerik team
answered on 01 Mar 2012, 10:31 AM
Hello Stefano,

We're sorry to hear this problem still surfaces with the latest version. We would appreciate if you open a support ticket and attach a sample runnable project that exhibits the problem. We would review it and be able to advise you how to proceed or provide a fix if necessary.

Greetings,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
ClausDC
Top achievements
Rank 1
Iron
Answers by
Steve
Telerik team
Ristogod
Top achievements
Rank 2
Bernard
Top achievements
Rank 1
Vicente
Top achievements
Rank 1
Chris Gillies
Top achievements
Rank 1
stefano
Top achievements
Rank 1
Share this question
or