RadMap crashes with DBF Viewer installed

2 posts, 0 answers
  1. Mikel
    Mikel avatar
    2 posts
    Member since:
    Mar 2011

    Posted 03 May 2011 Link to this post

    Hi!
    We're testing telerik maps trying to know if we can develop our requirements with them. We have found an error / incompatibility that we can not understand. We installed Dbf Viewer 2000 (trial) because we need to modify DBF files.
    Dbf Viewer 2000 creates an association to Dbf Files that causes telerik maps (the ones that use data source files) to crash. The exception is this:

    No se controló System.ArgumentException
      Message=Un símbolo (token) no es válido. Consulte RFC 2616 para corregir el tipo de gramática o contenido.
      Source=WindowsBase
      StackTrace:
    StackTrace:
           en MS.Internal.ContentType.ValidateToken(String token)
           en MS.Internal.ContentType.ParseTypeAndSubType(String typeAndSubType)
           en MS.Internal.ContentType..ctor(String contentType)
           en MS.Internal.MimeTypeMapper.GetMimeTypeFromUrlMon(Uri uriSource)
           en MS.Internal.MimeTypeMapper.GetMimeTypeFromUri(Uri uriSource)
           en MS.Internal.AppModel.ResourcePart.GetContentTypeCore()
           en System.IO.Packaging.PackagePart.get_ContentType()
           en MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
           en System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
           en System.IO.Packaging.PackagePart.GetStream()
           en System.Windows.Application.GetResourceStream(Uri uriResource)
           en Telerik.Windows.Controls.Map.MapShapeReader.ReadData(Uri dataUri, ShapeReaderStatus userState)
           en Telerik.Windows.Controls.Map.MapShapeReader.Read(Uri uri, Uri dataUri)
           en Telerik.Windows.Controls.Map.MapShapeReader.Read()
           en Telerik.Windows.Controls.Map.MapShapeReader.StartRead()
           en System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           en MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
           en System.Windows.Threading.DispatcherOperation.InvokeImpl()
           en System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
           en System.Threading.ExecutionContext.runTryCode(Object userData)
           en System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
           en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
           en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
           en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           en System.Windows.Threading.DispatcherOperation.Invoke()
           en System.Windows.Threading.Dispatcher.ProcessQueue()
           en System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           en MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           en MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
           en System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           en MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
           en System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
           en MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
           en MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
           en System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
           en System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
           en System.Windows.Threading.Dispatcher.Run()
           en System.Windows.Application.RunDispatcher(Object ignore)
           en System.Windows.Application.RunInternal(Window window)
           en System.Windows.Application.Run(Window window)
           en System.Windows.Application.Run()
           en XXXXXXXXXXXXXXXXXXXXXX.App.Main() en XXXXXXXXXXXXXXXXXXXXXX\obj\x86\Debug\App.g.cs:línea 0
           en System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
           en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
           en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           en System.Threading.ThreadHelper.ThreadStart()

    We have found that this is happening only when relative uri to resource is used. If we remove folder .dbf in HKEY_CLASSES_ROOT of registry maps don't crash.

    We can not use absolute paths and we can not control the software installed on client's computers so there is a risk that maps crashes with any software doing the same with data source files.

    You can try this with telerik demos.
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 05 May 2011 Link to this post

    Hello Mikel,

    The problem has not concerns to the RadMap control itself, but to the internal Microsoft classes and Dbf Viewer 2000 itself.
    The Dbf Viewer 2000 registers the Content Type of .dbf to application/DBF Viewer 2000. It prevents loading a dbf-file from resources of any .Net assembly without using the RadMap control.
    I have attached a sample solution which demonstrates it.
    Unfortunately it is outside of our control.

    Regards,
    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top