none
16299.19 setting map with MapStyle.Aerial3DWithRoads causes AV in MapControl::LineStyleRenderArgs::ensureTextureSizeUpdated(struct Math::SizeT<int> const &,class Engine::Renderer *) RRS feed

  • Question

  • Our box upgraded to 16299.19 couple days ago.

    While the UWP app is running, we can switch to MapStyle.Aerial3DWithRoads (from .Mercator & .Globe) and use it OK.

    But, noticing that when we start the app with MapStyle.Aerial3DWithRoads BingMaps.dll encounters and AV.

    MapControl::LineStyleRenderArgs::ensureTextureSizeUpdated(struct Math::SizeT<int> const &,class Engine::Renderer *)

    Exception thrown at 0x13AE2B91 (BingMaps.dll) in ourapp.exe: 0xC0000005: Access violation reading location 0x00000004.

    Is this a bug or do we need to initialize MapStyle differently now?

    We took our code out that did any icons or lines etc and the issue still repros.  Seems like a bug.

    Br, Karhu.


    Karhu Koti



    • Edited by karhukoti Tuesday, November 21, 2017 8:25 PM updated info
    Tuesday, November 21, 2017 7:55 PM

Answers

  • Where are you setting the map style? Initializing the style from XAML like this

      <Maps:MapControl x:Name="mainPageMapControl"
                             Margin="0"
                             Style="Aerial3DWithRoads" />

    Or from code behind in the constructor like this

      public MainPage()
            {
                this.InitializeComponent();
                mainPageMapControl.Style = MapStyle.Aerial3DWithRoads;
    Seems to work normally. We're not tracking any significant crashes with this exception.

    Wednesday, November 22, 2017 5:01 PM
    Moderator
  • OnNavigatedTo should be fine. You don't have to explicitly set Globe projection as the Aerial3D style already incorporates that.

    I'm also seeing no issue setting the map style in OnNavigatedTo (and omitting it from XAML). Not sure what might be different with your system, it could be timing or video driver related.


    Wednesday, November 22, 2017 10:28 PM
    Moderator

All replies

  • Where are you setting the map style? Initializing the style from XAML like this

      <Maps:MapControl x:Name="mainPageMapControl"
                             Margin="0"
                             Style="Aerial3DWithRoads" />

    Or from code behind in the constructor like this

      public MainPage()
            {
                this.InitializeComponent();
                mainPageMapControl.Style = MapStyle.Aerial3DWithRoads;
    Seems to work normally. We're not tracking any significant crashes with this exception.

    Wednesday, November 22, 2017 5:01 PM
    Moderator
  • We are setting it in OnNavigatedTo(), such as with:    

    mainPageMapControl.Style = MapStyle.Aerial3DWithRoads;

    mainPageMapControl.MapProject = MapProjection.Globe;

    Playing around with things, we got the issue to go away for the most part if we:

    - put the style and mapprojection into the XAML (.Road and .Globe)

    - plus, added a 2 second delay in our OnNavigatedTo()

    - then, change to .Aerial3DWithRoads and .Globe.

    Isn't it OK to put the code in OnNavigatedTo instead of the page constructor ?

    This hasn't caused issues until 16299.19 (.15 worked ok).

    (fyi, we save away the last used "look" of the map and on app restart set the map accordingly as user had it)

    Br, Karhu.


    Karhu Koti



    • Edited by karhukoti Wednesday, November 22, 2017 5:14 PM
    Wednesday, November 22, 2017 5:12 PM
  • OnNavigatedTo should be fine. You don't have to explicitly set Globe projection as the Aerial3D style already incorporates that.

    I'm also seeing no issue setting the map style in OnNavigatedTo (and omitting it from XAML). Not sure what might be different with your system, it could be timing or video driver related.


    Wednesday, November 22, 2017 10:28 PM
    Moderator