App crashes randomly with (0xc0000005) 'Access violation'

6934
9
06-08-2017 12:55 AM
KarinGisperg1
New Contributor

Hello,

We are developing an app with ArcGIS Runtime .NET 100.0.0, that offers interaction with offline maps.

In general we are using the MVVM Model. The MapView.Map binds to a ViewModel.class Map Property CurrentMap.  This class also contains a  Map Property OfflineMap, which holds reference to a corresponding Map with offline-content .

During initial loading (with some async stuff in previous steps), the (offline) Layers are attached to  the OfflineMap Map and after awaiting OfflineMap.LoadAsync(); the Property CurrentMap is assigned to OfflineMap.

Our problem is that the app crashes randomly at the line

this.ProjectManagerViewModelInstance.CurrentMap = this.ProjectManagerViewModelInstance.OfflineMap;

with an exception we cannot handle.The output window shows:

[…MyApp...]WPF.vshost.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

 

public async Task LoadProjectWithTaskSampleAsync(

            object param)

        {

            try

            {

                #region checkProject

                // our "progressbar"

                this.ToogleReporter("CheckProject",true);

               //read project information from parameter

                var pi = await this.ProjectManagerViewModelInstance.InitConnectionInformationAsync(param);

                if (pi == null)

                {

                    Log.Warn(" ... ");

                    this.ToogleReporter("CheckProject",false);

                    return;

                }

                 this.ToogleReporter("CheckProject",false);

                 #endregion checkProject

 

                this.ToogleReporter("LoadProject", true);

                 //MAP CREATION AND ASSIGN TO OFFLINE MAP PROPERTY (and other stuff like processing  layer infos ...)

                await this.ProjectManagerViewModelInstance.LoadProjectAsync(pi);

               

                // check if all information could be loaded properly

                if (await this.TryToOpenProjectAsync(pi))

                {

                    this.ToogleReporter("LoadProject", false);

                    Log.Error("...");

                    return;

                }

                // Check if offline map has layers

                var offlineMapAllLayers = this.ProjectManagerViewModelInstance?.OfflineMap?.AllLayers;

                if (offlineMapAllLayers != null && offlineMapAllLayers.Any())

                {

                    Log.Debug("Await call OfflineMap.LoadAsync()");

                    await this.ProjectManagerViewModelInstance.OfflineMap.LoadAsync();

                    this.ProjectManagerViewModelInstance.CurrentMap = this.ProjectManagerViewModelInstance.OfflineMap;

                }

                IsLoadingProject = false;

            }

            catch (Exception e)

            {

                Log.Error("Loading Project Failed. Abort! ",e);

            }

            finally

            {

                this.ToogleReporter("LoadProject", false);

                this.EndOfLoadingProject();

            }

        }

The offline map contains 1 vtpk (52 MB), 1 tpk (15 GB) and 2 mmpks(85 MB and 3 MB). The problem seems to occur only on offline maps with *.mmpks (but still randomly).

 

Can you help us? I attach the memory dumps, maybe it helps.

Thank you

We are using:

 

Microsoft Visual Studio Professional 2015

Version 14.0.25421.03 Update 3

Microsoft .NET Framework

Version 4.6.01586

 

Installed Version: Professional

 

Visual C# 2015   00322-40000-00000-AA460

Microsoft Visual C# 2015

 

ArcGIS Runtime SDK for .NET   100.0.0

 

Microsoft Windows 10 Enterprise

 

0 Kudos
9 Replies
PhilScovis
New Contributor III

We are getting this issue too, in a UWP environment.  It also happens intermittently, although we have a path that will reproduce it fairly regularly.

Exception thrown at 0x00007FFEC68549B7 (RuntimeCoreNet.dll) in xxxxxxxxxxx.exe: 0xC0000005: Access violation reading location 0x000002263BBBF61C.

FWIW, the disassembly:

00007FFEC685498F mov rsi,rcx
00007FFEC6854992 mov qword ptr [rsp+50h],r8
00007FFEC6854997 mov r12d,r13d
00007FFEC685499A mov qword ptr [rsp+58h],rcx
00007FFEC685499F mov qword ptr [rsp+60h],rax
00007FFEC68549A4 mov qword ptr [rsp+70h],r13
00007FFEC68549A9 test rcx,rcx
00007FFEC68549AC jne 00007FFEC68549B7
00007FFEC68549AE lea r8,[7FFEC7A6A99Ch]
00007FFEC68549B5 jmp 00007FFEC68549DD
00007FFEC68549B7 mov eax,dword ptr [rcx+5Ch]
00007FFEC68549BA cmp eax,0A029A697h

0 Kudos
dotMorten_esri
Esri Notable Contributor

"Access Violation" is the equivalent of a Null Reference Exception, so there's no guarantee these at the same bugs.

Thank you for the dump file, but this appears to be a mini-dump which doesn't have all the information necessary to debug it in our end. Can you either provide a full dump (they are usually up towards 1gb in size), or a stand-alone sample that reproduces the problem?

0 Kudos
PhilScovis
New Contributor III

Whom can I send an application dump to?  I don't want to post it here.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Thanks Paul. I got the dump, and the crash is definitely unrelated to the crash in this post.

0 Kudos
PhilScovis
New Contributor III

Thanks for looking at it.

0 Kudos
dotMorten_esri
Esri Notable Contributor

@Karin After some more research it looks like there's a threading issue happening in the vector tile layer. We've made significant changes in this specific area since v100.0. We are weeks away from releasing v100.1, so could you retry with that version? Our best guess (without an in-house reproducer) is that this issue has been addressed already.

0 Kudos
Stefan_Jung
Esri Contributor

There is still a problem using vector tile packages with ArcGIS Runtime v100.1 on Windows Mobile 10.

I've created a default ArcGIS Runtime App (Univeral Windows) project and initialized the Map with a local vtpk.

This works fine on the "Mobile Emulator for Windows" but the app crashes on a real device.

The vtpk is visible on start but when zooming-in the app crashes with following:

The program '[3952] UWPSample.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Which mobile device are you using?

0 Kudos
Stefan_Jung
Esri Contributor

This is my (old) Test Device:

Lumia 550

Version 1703

OS-Build 10.0.15063.483

0 Kudos