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

Some values for Query for the BingSearchProvider causes a crash

3 Answers 33 Views
Map
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 17 Nov 2010, 09:49 AM
Hi,

I am trying to do some Geocoding using the BingSearchProvider.  I have been adding british postcodes and there are some that it doesn't like, which causes a crash that I cannot handle

For example, try

B21 0AG

in your Search Demo

If I add 

B21 0AG, Birmingham

then we just get back a Geocoded location for Birmingham as a whole. It works with similar postcodes, for example

B64 6HN

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 19 Nov 2010, 05:11 PM
Hi Simon,

The problem in the search example is not  related to the map control search functionality.
The search result of the 'B21 0AG' address contains search region, but its GeocodeLocation property is null and it is required for setting map viewport to the best view. The example does not check it. So, it causes a crash. We will update it shortly.

Sincerely yours,
Andrey Murzov
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Simon
Top achievements
Rank 1
answered on 19 Nov 2010, 05:23 PM
Andrey,

The problem is I get the following exception

System.ArgumentException was unhandled
  Message='-350.274608774631' is not a valid value for property 'Width'.
  Source=WindowsBase
  StackTrace:
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.FrameworkElement.set_Width(Double value)
       at Telerik.Windows.Controls.Map.BingSearchProvider.ProcessShape(ShapeBase bingShape) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Providers\Search\BingSearchProvider.cs:line 282
       at Telerik.Windows.Controls.Map.BingSearchProvider.ProcessSearchRegion(SearchRegion bingSearchRegion) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Providers\Search\BingSearchProvider.cs:line 254
       at Telerik.Windows.Controls.Map.BingSearchProvider.SearchServiceSearchCompleted(Object sender, SearchCompletedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Providers\Search\BingSearchProvider.cs:line 419
       at Telerik.Windows.Controls.Map.WPFBingSearchService.SearchServiceClient.OnSearchCompleted(Object state) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Service References\WPFBingSearchService\Reference.cs:line 3375
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, 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)
       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, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       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 System.Windows.Application.Run()
       at RadMap.App.Main() in C:\Visual Studio Projects\Prototypes\WPF\Mapping\RadMap\RadMap\obj\x86\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

i.e. the exception has occurred before it gives the results to my handler

private

 

 

void Provider_SearchCompleted(object sender, SearchCompletedEventArgs args)

 

{
 ...
}

Regards
Simon
0
Accepted
Andrey
Telerik team
answered on 23 Nov 2010, 01:05 PM
Hello Simon,

Thank you for the information. We were able to reproduce the bug. It will be fixed in the nearest internal build. I have updated your Telerik points.

Greetings,
Andrey Murzov
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
Map
Asked by
Simon
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Simon
Top achievements
Rank 1
Share this question
or