Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Unable to activate instance of type Naxam.Controls.Mapbox.Platform.Droid.MapViewRenderer from native handle #97

Open
DynamicDave opened this issue Aug 28, 2020 · 2 comments

Comments

@DynamicDave
Copy link

DynamicDave commented Aug 28, 2020

Dear Vũ Đức Tuyến,

I have a weird bug in my application. I'm using a Xamarin.Forms Shell app and whenever I repeatedly switch (click really fast) between Tabbar buttons to a page with a map, the application crashes with the error message "System.NotSupportedException: 'Unable to activate instance of type Naxam.Controls.Mapbox.Platform.Droid.MapViewRenderer from native handle 0xffd5887c (key_handle 0x2bc6e79).'".

The way to replicate this, is by taking your own Demo app and change the following:

App.xaml.cs:
MainPage = new AppShell();

AppShell.xaml:
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="MapBoxQs.AppShell"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:MapBoxQs.Views">
<TabBar>
<Tab Title="HomePage1">
<ShellContent ContentTemplate="{DataTemplate views:HomePage}" />
</Tab>
<Tab Title="Get Started">
<ShellContent ContentTemplate="{DataTemplate views:GetStartedPage}" />
</Tab>
</TabBar>
</Shell>

Start the app and click really fast between the two buttons. This happens in debug and release mode on emulator and real devices.

Do you have an idea how to fix this?

Kind regards,
Dave Jonker

@DynamicDave
Copy link
Author

Nobody? :-(

@lubiepomaranczki
Copy link

Hey, coming late to the party buy did you manage to fix this or get around this? I am facing similar issue... 🙈

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

No branches or pull requests

2 participants