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

AccessViolationException on RadMap

11 Answers 140 Views
Map
This is a migrated thread and some comments may be shown as answers.
simone massaro
Top achievements
Rank 1
simone massaro asked on 03 Jul 2014, 09:44 AM
Hello,

I have a problem with the RadMap component which leads the silverlight plugin to a crash.
Basically i'm changing periodically the center of the map using the "ZoomLevel" and the "Center" properties of the map and after a casual number of times the silverlight plugin crashes with an  "AccessViolationException"

In order to reproduce the issue is sufficient to create a project with a simple user control with the following XAML:

<UserControl x:Class="RadMapTest.Map"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
     
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadMap x:Name="MapControl" >
            <telerik:RadMap.Provider>
                <telerik:ArcGisMapProvider Mode="Aerial"  />
            </telerik:RadMap.Provider>
        </telerik:RadMap>
    </Grid>
</UserControl>


And the following code behind:

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
 
namespace RadMapTest
{
    public partial class Map : UserControl
    {
        private bool zoomOut;
        private DispatcherTimer timer;
        private Random random;
 
        public Map()
        {
            this.zoomOut = true;
            this.timer = new DispatcherTimer();
            this.random = new Random(DateTime.Now.Second);
            InitializeComponent();
 
            this.Loaded += OnLoaded;
        }
 
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            this.timer.Interval = TimeSpan.FromMilliseconds(1000);
            this.timer.Tick += this.OnTick;
            this.timer.Start();
        }
 
        private void OnTick(object sender, EventArgs e)
        {
            this.MapControl.Center = new Telerik.Windows.Controls.Map.Location((random.NextDouble() * 180) - 90, (random.NextDouble() * 360) - 180);
            this.MapControl.ZoomLevel = zoomOut ? this.MapControl.MinZoomLevel : random.Next(this.MapControl.MinZoomLevel, this.MapControl.MaxZoomLevel);
 
            zoomOut = !zoomOut;
        }
    }
}

I was able to reproduce this issue with the Silverlight Q1 2014 and Silverlight Q2 2014.
Also I have tried both Bing and ArcGIS providers.

In the test i'm using a very short animation time (1 sec), but the problems persists also with longer timings (e.g. 45 sec).

Can you provide some help on this?

11 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 03 Jul 2014, 01:05 PM
Hello Simone,

We tested your code on our side and it seems that the code works as expected. Could you please take a look at the attached project and let us know if you can reproduce the issue in it? It will be great if you can modify the project so that the issue is reproducible and send it over. This will help us to further investigate the reasons behind.

Thank you for your kind cooperation.

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
simone massaro
Top achievements
Rank 1
answered on 03 Jul 2014, 02:22 PM
Dear Andrey,

I have tried your project and of course it has the same issue.
Take a look to the attached image.

Thank you.
0
simone massaro
Top achievements
Rank 1
answered on 03 Jul 2014, 02:24 PM
Sorry i forgot the image...
0
Andrey
Telerik team
answered on 04 Jul 2014, 08:32 AM
Hello Simone,

I understand and clearly see that you have issue with the Silverlight plugin. However, as we are not able to reproduce it on our side we are not able to further investigate the reasons behind. The project that I sent you with my previous reply does not crash on our side. We tested it on several of our PCs and tablets.

Please keep in mind that there is a possibility that some other third party software may cause the issue. Could you please confirm that all dev tools and inspectors are disabled when this error occurs? Also, is it possible to test the same project on other PCs on your side. Some local setting of your PC may cause such behavior.

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
simone massaro
Top achievements
Rank 1
answered on 04 Jul 2014, 08:48 AM
Hello Andrey,

We have tested it in various environment (windows 7 and 8, also on windows server machines), with multiple browsers and with code build both in Debug and Release mode and the issue is always present. Keep in mind that the crash always happens, but not after the same amount of time. Sometimes it requires hours some times minutes.

Which version of your libraries have you used for reproduce the bug?

Best regards
Simone Massaro
0
Andrey
Telerik team
answered on 04 Jul 2014, 01:51 PM
Hi Simone,

We have used Q2 2014.
After a lot of test on different devices with different timeouts we've got an exception but of different type: OutOfMemory exception. Actually the Access Violation exception usually happens when the computer overloads with too much data. So this is the same type of problem in your case. We use standard Silverlight MultiscaleImage control to show map tiles. When you run the RadMap this way you don't give this control a chance to load tiles in proper manner. So the number of tiles which should be loaded by this control is continuously increased.

Unfortunately, this behaviour is out of our control and there is nothing that we can change in our code to prevent this error. We recommend you to avoid those scenarios in your applications.

You can try to disable the animation of the map. This can be done using the RadMap.UseSpringAnimations property. Please give it a try and let us know if the issue still exists.

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
simone massaro
Top achievements
Rank 1
answered on 07 Jul 2014, 07:40 AM
Dear Andrey,

We have tested the map control using RadMap.UseSpringAnimations = false, it took a long time but the application crashed also with this settings.
Currently I've no solutions and also no workarounds.

Best regards
Simone Massaro
0
Andrey
Telerik team
answered on 08 Jul 2014, 06:02 AM
Hello Simone,

As I wrote in my previous post we use standard Silverlight MultiscaleImage control to show map tiles. The problem occurs inside the standard MultiScaleImage & MultiScaleTileSource controls. Unfortunately we can't control them anyway.
I have attached a sample solution which uses these standard Silverlight controls for showing a map. And this solution has the same problem as the RadMap.

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Pavel R. Pavlov
Telerik team
answered on 10 Jul 2014, 09:52 AM
Hello Simone,

As I wrote in my previous post we use standard Silverlight MultiscaleImage control to show map tiles. The problem occurs inside the standard MultiScaleImage & MultiScaleTileSource controls. Unfortunately we can't control them anyway.
I have attached a sample solution which uses these standard Silverlight controls for showing a map. And this solution has the same problem as the RadMap.

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
 
0
simone massaro
Top achievements
Rank 1
answered on 11 Jul 2014, 07:29 AM
Hello Pavel,

Is there an existing ticket to Microsoft about this?
If not, are you going to create one? 
Eventually I'm very interested in following it.

Best regards
Simone Massaro
0
Pavel R. Pavlov
Telerik team
answered on 15 Jul 2014, 06:37 AM
Hello Simone,

We are not aware of the existence of such ticket. Moreover, we did not report it to Microsoft and we do not plan to do so.

However, you as a user are allowed to contact them and ask them about their statement for this behavior. Also, you can start a ticket and report them the issue you encountered.

Regards,
Pavel R. Pavlov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Map
Asked by
simone massaro
Top achievements
Rank 1
Answers by
Andrey
Telerik team
simone massaro
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or