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

UIKit.UIGestureRecognizer.Dispose crash after loading a map page for the second time #5899

Open
pamela032709 opened this Issue Apr 15, 2019 · 5 comments

Comments

Projects
None yet
4 participants
@pamela032709
Copy link

pamela032709 commented Apr 15, 2019

Steps to Reproduce

  1. click on a tkcustommaps page from TK.CustomMaps
  2. navigate away from the page and come back to it will crash
  3. use a master-detail page click on the menu

Expected Behavior

no crash

Actual Behavior

crashes the second time it load the page with the map

Environment

visual studio 2019
mac OS -mojave
XCODE-10.2
Iphone 12.2

Visual Studio: Help > About Microsoft Visual Studio > Copy Info [button]
Visual Studio for Mac: Visual Studio > About Visual Studio > Show Details > Copy Information [button]
2. Paste into the code block below (between ```)
-->

=== Visual Studio Enterprise 2019 for Mac ===

Version 8.0.2 (build 23)
Installation UUID: 7692fd6e-5645-498f-b996-0c7a5632bf5c
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 5.6.0.2 (d16-0 / 040682909)

	Package version: 518010003

=== Mono Framework MDK ===

Runtime:
	Mono 5.18.1.3 (2018-08/fdb26b0a445) (64-bit)
	Package version: 518010003

=== NuGet ===

Version: 4.8.2.5835

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	2.1.9
	2.1.8
	2.1.2
	2.0.5
	2.0.0
SDK: /usr/local/share/dotnet/sdk/2.1.505/Sdks
SDK Versions:
	2.1.505
	2.1.504
	2.1.302
	2.1.4
	2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.9
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 10.2 (14490.120)
Build 10E125

=== Xamarin.Mac ===

Version: 5.8.0.0 (Visual Studio Enterprise)
Hash: 0aa84521
Branch: d16-0
Build date: 2019-04-02 16:01:19-0400

=== Xamarin.iOS ===

Version: 12.8.0.0 (Visual Studio Enterprise)
Hash: 0aa84521
Branch: d16-0
Build date: 2019-04-02 16:01:19-0400

=== Xamarin Designer ===

Version: 4.17.4.418
Hash: 3d086e814
Branch: remotes/origin/d16-0
Build date: 2019-04-01 09:20:10 UTC

=== Xamarin.Android ===

Version: 9.2.0.5 (Visual Studio Enterprise)
Android SDK: /Users/compriop/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		5.0 (API level 21)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)
		8.0 (API level 26)
		8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.0
SDK Build Tools Version: 27.0.3

Build Information: 
Mono: mono/mono/2018-08-rc@5ad371dab1b
Java.Interop: xamarin/java.interop/d16-0@c987483
LibZipSharp: grendello/LibZipSharp/master@44de300
LibZip: nih-at/libzip/rel-1-5-1@b95cf3f
MXE: xamarin/mxe/xamarin@b9cbb535
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.26.0@325e91a
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-0@0a7edd6

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/compriop/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android Device Manager ===

Version: 1.2.0.14
Hash: 86df26f
Branch: remotes/origin/d16-0
Build date: 2019-04-05 16:58:56 UTC

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 800020023
Git revision: c576bb008dfe54cdcf596237e09564ebd2da4343
Build date: 2019-04-06 10:06:46+00
Build branch: master
Xamarin extensions: 2c996830618e7cb8e8be97984d643eb86f122e8d

=== Operating System ===

Mac OS X 10.14.4
Darwin 18.5.0 Darwin Kernel Version 18.5.0
    Mon Mar 11 20:40:32 PDT 2019
    root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64


Build Logs

Example Project (If Possible)

@chamons

This comment has been minimized.

Copy link
Member

chamons commented Apr 15, 2019

Thanks for the report!

I believe this is a duplicate of #5388 though 12.8.0.0 should have the fix, as it is d16-0.

Can you please provide more information on tkcustommaps page from TK.CustomMaps. Is this from a Xamarin sample?

Could you provide a sample that shows the issue?

@chamons chamons added this to the Future milestone Apr 15, 2019

@busec0

This comment has been minimized.

Copy link

busec0 commented Apr 16, 2019

I'm encountering this issue as well with https://github.com/TorbenK/TK.CustomMap within the TKCustomMapRenderer https://github.com/TorbenK/TK.CustomMap/blob/Development/Source/TK.CustomMap.iOSUnified/TKCustomMapRenderer.cs.

In the overridden Dispose method, the call to base.Dispose() crashes the application.

You can download a sample app from here:

TKMaps_DisposeFailsSampleProject.zip

It opens two different pages:

  1. A Map Page using the default TKCustomMap implementation. Pushing and then popping the page will crash with NullReferenceException.
  2. Custom Maps Page. I've manually added the content from TKCustomMapRenderer in my iOS project (named it MapViewRenderer.cs) and commented out the call to base.Dispose() within the protected override void Dispose(bool disposing). App wont crash now.
@pamela032709

This comment has been minimized.

Copy link
Author

pamela032709 commented Apr 16, 2019

this are the settings when this use to work

=== Visual Studio Community 2017 for Mac ===

Version 7.6.11 (build 9)
Installation UUID: 54f5440e-7f67-45f3-aa9f-cab795782549
Runtime:
Mono 5.12.0.309 (2018-02/39d89a335c8) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e)

Package version: 512000309

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.2
2.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.302/Sdks
SDK Versions:
2.1.302
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.3
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 10.1 (14460.46)
Build 10B61

=== Xamarin.Mac ===

Version: 5.0.0.0 (Visual Studio Community)
Hash: b40230c
Branch:
Build date: 2018-09-27 11:41:37-0400

=== Xamarin.iOS ===

Version: 12.2.1.10 (Visual Studio Community)
Hash: f2a05ed
Branch: d15-9
Build date: 2018-10-31 18:55:57-0400

=== Xamarin.Android ===

Version: 9.0.0.20 (Visual Studio Community)
Android SDK: /Users/compsoml/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 26.0.2
SDK Build Tools Version: 26.0.3

Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 706110009
Git revision: d7cd66f5e3acd3d46ba0b94a0c935378f828bde0
Build date: 2018-10-31 17:17:12+00
Build branch: release-7.6
Xamarin extensions: bc9b985bfcb480b04a208a6d4045adc443a07857

=== Operating System ===

Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Thu Jun 21 22:53:14 PDT 2018
root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

to clone the sample go to
https://github.com/pamela032709/custommapscrash

@pamela032709

This comment has been minimized.

Copy link
Author

pamela032709 commented Apr 16, 2019

Please refer to my original post to the current settings in which this crash happen

@chamons

This comment has been minimized.

Copy link
Member

chamons commented Apr 16, 2019

I can now reproduce this:

Tested with 12.8.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.