Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access a disposed object #779

Open
1 task done
AhmedAdelGadElkareeem opened this issue Oct 22, 2021 · 2 comments
Open
1 task done

Cannot access a disposed object #779

AhmedAdelGadElkareeem opened this issue Oct 22, 2021 · 2 comments

Comments

@AhmedAdelGadElkareeem
Copy link

VERSIONS

  • Xamarin.Forms.GoogleMaps - 4.0.0-BETA1
  • Xamarin.Forms - 5.0.0.2012

PLATFORMS

  • iOS

ACTUAL BEHAVIOR

System.ObjectDisposedException:** 'Cannot access a disposed object.
Object name: 'Google.Maps.MapView'.'
The app has been terminated

EXPECTED BEHAVIOR

map open in debug mode on real device

HOW TO REPRODUCE

try to open map with user current location in debug mode in ios project using real device (iPhone)

@SeriousGeorge
Copy link

Any news on this?

Having exactly the same issue... wether VisualStudio 2021 or 2022 preview, dosent matter.
Also tested installing Xamarin.Forms.GoogleMaps 3.3.0 or 4.0.0-Beta1, no difference.

Also solutions for referring bugs and problems from here do not provide a working solution:
#666 (comment)

Additionally should be said whats leading to the disposed object message.
For me it originated from another problem... "An error occurred: 'Could not create an native instance of the type 'Google.Maps.MapView': the native class hasn't been loaded." (https://community.esri.com/t5/arcgis-runtime-sdk-for-net-questions/mapview-objectdisposedexception-ios/m-p/668849#M8426)
The solutions for this was to set ObjCRuntime.Class.ThrowOnInitFailure = false;

If I then try to set ObjCRuntime.Class.ThrowOnInitFailure to false I'll get the disposed exception.
Also tried custom renderer for ios... no difference.

@PontusHolmberg
Copy link

Any updates on this. Still having this issue.
Worked before, then I put down the project for a year and when I came back to it I get this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants