Skip to content

[iOS] App crashes when navigating to a page containing a map more than once #29346

@claytonone

Description

@claytonone

Description

Navigating to a page that contains a map more than once and then panning the map causes the app to crash with a System.InvalidOperationException 'VirtualView cannot be null here'. This only seems to be an issue on iOS and used to work fine in .net 8 maui. Unfortunately this issue is preventing us upgrading to .net 9.

Screen.Recording.2025-05-05.at.14.04.23-1.mov

Steps to Reproduce

  1. Navigate to a page containing a map and pan the map
  2. Go back to the previous page
  3. Navigate back to the map and pan it again
  4. App crashes with System.InvalidOperationException 'VirtualView cannot be null here'

Link to public reproduction project repository

https://github.com/claytonone/MAUIMapsCrash

Version with bug

9.0.60 SR6

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.100 SR10

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

Exception has occurred: CLR/System.InvalidOperationException
* 
An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.iOS.dll: 'VirtualView cannot be null here'
   at UIKit.UIApplication.xamarin_UIApplicationMain(Int32 argc, IntPtr argv, IntPtr principalClassName, IntPtr delegateClassName, IntPtr* gchandle)
   at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName)
   at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
   at MapsTest.Program.Main(String[] args)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-mapMap / Mapsi/regressionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/iosregressed-in-9.0.0s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions