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

Dashboard gauge sample crashes (Q3

1 Answer 86 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
N Mackay
Top achievements
Rank 1
N Mackay asked on 22 Dec 2010, 03:06 PM
Hi,

I'm currently evaluating Tererik WPF RAD controls for use on a future large scale project. Those most samples work as expected but the gauge dashboard sample always crashes regardless.

I'm using build RadControls_for_WPF40_2010_3_1110_Trial

My design environment is VS2010 using .NET4 framework on XP Pro SP3. The graphics is standard onboard intel chipset and has the latest drivers and all patches applied including silverlight patches.

The following exception occurs when running the supplied compiled sample app:

System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Gauge
  StackTrace:
       at Telerik.Windows.Examples.Gauge.Gallery.CarDashboard.Example.Provider_RoutingCompleted(Object sender, RoutingCompletedEventArgs e) in c:\Dev3\branches\2010.Q3.Release\Output\Trial\Demos\Examples\Gauge\Gallery\CarDashboard\Example.xaml.cs:line 146
       at Telerik.Windows.Controls.Map.RouteProviderBase.OnRoutingCompleted(ResponseBase response) in c:\Dev3\branches\2010.Q3.Release\Controls\DataVisualization\Map\Providers\Route\RouteProviderBase.cs:line 63
       at Telerik.Windows.Controls.Map.BingRouteProvider.RouteServiceCloseCompleted(Object sender, AsyncCompletedEventArgs e) in c:\Dev3\branches\2010.Q3.Release\Controls\DataVisualization\Map\Providers\Route\BingRouteProvider.cs:line 428
       at Telerik.Windows.Controls.Map.BingRouteProvider.RouteServiceCalculateRouteCompleted(Object sender, CalculateRouteCompletedEventArgs e) in c:\Dev3\branches\2010.Q3.Release\Controls\DataVisualization\Map\Providers\Route\BingRouteProvider.cs:line 422
       at Telerik.Windows.Controls.Map.WPFBingRouteService.RouteServiceClient.OnCalculateRouteCompleted(Object state) in c:\Dev3\branches\2010.Q3.Release\Controls\DataVisualization\Service References\WPFBingRouteService\Reference.cs:line 2379
       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.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       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.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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at Telerik.Windows.Examples.App.Main() in c:\Dev3\branches\2010.Q3.Release\Output\Trial\Demos\Examples.WPF\obj\x86\Release\App.g.cs:line 0
  InnerException:

While debugging in VS2010 the exception seems to be here:

****

Private Sub Provider_RoutingCompleted(sender As Object, e As RoutingCompletedEventArgs)

    dim routeResponse As RouteResponse = TryCast(e.Response, RouteResponse)

    If routeResponse IsNot Nothing Then 

       If routeResponse.Result.RoutePath IsNot Nothing Then

****

routeResponse.Result is set to nothing !


I am evaluating WPF controls but I'm unable to recommend them if the provided samples don't run, apart from that the controls look really good.

Any feedback would be appreciated,

Norman.

1 Answer, 1 is accepted

Sort by
0
N Mackay
Top achievements
Rank 1
answered on 22 Dec 2010, 03:42 PM
I figured it out, our proxy was blocking the sample which forever reason was trying to access the outside world. It might be worth updating the samples to allow for a proxy blocking them.

Changing the code to the following allows the dashboard sample to run fine for me:

Private Sub Provider_RoutingCompleted(sender As Object, e As RoutingCompletedEventArgs)
 Dim routeResponse As RouteResponse = TryCast(e.Response, RouteResponse)
            If routeResponse IsNot Nothing Then
                If routeResponse.Result IsNot Nothing Then '// ** added
                    If routeResponse.Result.RoutePath IsNot Nothing Then
                        routeLine.Points = routeResponse.Result.RoutePath.Points
                        routeLine.Stroke = New SolidColorBrush(Color.FromArgb(255, 53, 191, 74))
                        routeLine.StrokeThickness = 2

                        Me.informationLayer.Items.Add(routeLine)
                    Else
                        Me.ErrorSummary.Visibility = Visibility.Visible
                    End If
                End If
            End If
End Sub

Tags
Gauges
Asked by
N Mackay
Top achievements
Rank 1
Answers by
N Mackay
Top achievements
Rank 1
Share this question
or