Problem with SHP file

2 posts, 0 answers
  1. Sasa Grebenar
    Sasa Grebenar avatar
    8 posts
    Member since:
    Sep 2012

    Posted 07 Feb 2011 Link to this post


    I get the next error when I show esri shp files..
    Can you help me..

    Best regards


    Webpage error details 
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; AskTB5.6) 
    Timestamp: Fri, 4 Feb 2011 15:39:58 UTC 
    Message: Unhandled Error in Silverlight Application Object reference not set to an instance of an object.   at eGroblje.MainPage.MapShapeReader_PreviewReadCompleted(Object sender, PreviewReadShapesCompletedEventArgs eventArgs) 
       at Telerik.Windows.Controls.Map.PreviewReadShapesCompletedEventHandler.Invoke(Object sender, PreviewReadShapesCompletedEventArgs eventArgs) 
       at Telerik.Windows.Controls.Map.MapShapeReader.OnPreviewReadCompleted(PreviewReadShapesCompletedEventArgs previewReadCompletedArgs) 
       at Telerik.Windows.Controls.Map.MapShapeReader.CompleteReading(ShapeReaderStatus status, Exception error) 
       at Telerik.Windows.Controls.Map.MapShapeReader.CheckComplete(Exception serviceError, Object userState, Stream stream, Boolean data) 
       at Telerik.Windows.Controls.Map.MapShapeReader.ReadShapesCompleted(Object sender, OpenReadCompletedEventArgs e) 
       at System.Net.WebClient.OnOpenReadCompleted(OpenReadCompletedEventArgs e) 
       at System.Net.WebClient.OpenReadOperationCompleted(Object arg) 
    Line: 1 
    Char: 1 
    Code: 0 
    URI: http://***
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 09 Feb 2011 Link to this post

    Hi Sasa Grebenar,

    According to the exception call stack the problem occurs in your application at eGroblje.MainPage.MapShapeReader_PreviewReadCompleted(Object sender, PreviewReadShapesCompletedEventArgs eventArgs) method. I can't say for sure what is wrong without your code, but it looks like you use in your code some property of the eventArgs which is not set during shape file reading. For example, in case of the error (when MapShapeReader can't read shape file for some reasons) the eventArgs.Error property will contain information about the exception, and eventArgs.Items will be null. So if you don't test the result of shape file reading for errors in your code and simple use eventArgs.Items property then you will get NullReferenceException exception.

    Best wishes,
    Andrey Murzov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top