Bug 38968 - 'jobject' must not be IntPtr.Zero with two Tabbed Pages and Map
Summary: 'jobject' must not be IntPtr.Zero with two Tabbed Pages and Map
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.0.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-02-20 17:19 UTC by michprev
Modified: 2017-03-27 23:36 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample app (46.13 KB, application/x-zip-compressed)
2016-02-20 17:19 UTC, michprev
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description michprev 2016-02-20 17:19:44 UTC
Created attachment 15113 [details]
Sample app

Sample also available at https://github.com/michprev/TabbedNavigationProblem.

After start the app loads the first Tabbed page (TabbedOne) with the Map control and then the second Tabbed page (TabbedTwo). Contents of the second Tabbed page aren't loaded and swiping between individual pages does not work.

After pushing the back button the app crashes with "System.ArgumentException: 'jobject' must not be IntPtr.Zero" exception. This does not occur in the sample app, it is fixed by setting the content = null on OnDisAppearing() and InitializeComponents() on OnAppearing() (found at https://bugzilla.xamarin.com/show_bug.cgi?id=34272).

Steps to reproduce:
1. Start the app
2. No content is loaded, swiping is not working

Expected behavior:
Content of the second tabbed page is normally loaded, swiping works.

Does not occur when using directly a page with map instead of a Tabbed page with map.
Occurs only when using AppCompat.

Tested on Android 5.1.
Comment 1 Jimmy [MSFT] 2017-03-27 23:36:11 UTC
I was able to reproduce this issue with the attached sample app and Forms 2.1.0-pre4. Pressing the back arrow would crash the app.

However after updating the Forms and Forms.Maps packages to the latest stable version, 2.3.3.193, the crash appears to be resolved and I can navigate back to the TabbedPage with a map.

If you are still experiencing this issue with Forms 2.3.3.193 or later, please re-open this report and attach an updated repro project. Thanks!

### Version tests
2.3.3.193   GOOD
2.1.0-pre4  BAD