Bug 31007 - When UIViewControllers are instantiated by a storyboard the native instance is never dealloc'd
Summary: When UIViewControllers are instantiated by a storyboard the native instance i...
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 8.10
Hardware: Macintosh Mac OS
: --- major
Target Milestone: 8.10.4 (C5SR3)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-06-10 20:20 UTC by Alex Blount
Modified: 2015-08-12 17:05 UTC (History)
5 users (show)

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


Attachments
Xam.iOS Storyboard project (9.60 KB, application/zip)
2015-06-10 20:20 UTC, Alex Blount
Details
Swift Project (58.85 KB, application/zip)
2015-06-10 20:21 UTC, Alex Blount
Details
Xam.iOS instruments Screenshot (277.04 KB, image/png)
2015-06-10 20:21 UTC, Alex Blount
Details
Swift Instruments - Persistent (270.60 KB, image/png)
2015-06-10 20:23 UTC, Alex Blount
Details
Swift Instruments - Destroyed (308.53 KB, image/png)
2015-06-10 20:24 UTC, Alex Blount
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:
VERIFIED FIXED

Description Alex Blount 2015-06-10 20:20:09 UTC
Created attachment 11557 [details]
Xam.iOS Storyboard project

**************************************************************************************************************
Xamarin Studio
Version 5.9.3 (build 1)
Installation UUID: 0a507e03-edf9-4c18-aa43-678d57ed4f07
Runtime:
	Mono 4.0.1 ((detached/ed1d3ec)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010044

Apple Developer Tools
Xcode 6.3.2 (7718)
Build 6D2105

Xamarin.Android
Version: 5.1.3.1 (Business Edition)
Android SDK: /Users/alexb/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Xamarin Android Player
Version: Unknown version
Location: /Applications/Xamarin Android Player.app

Xamarin.Mac
Version: 2.0.1.64 (Business Edition)

Xamarin.iOS
Version: 8.10.1.64 (Business Edition)
Hash: e6ebd18
Branch: master
Build date: 2015-05-21 21:55:09-0400

Build Information
Release ID: 509030001
Git revision: 5a524e1726ed103fdd4fe37e0356f2b35466ce9d
Build date: 2015-06-02 16:35:08-04
Xamarin addins: 51957cfbd06be911b212671ad05c2c6221ac90f9

Operating System
Mac OS X 10.10.3
Darwin alexs-macbook.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
**************************************************************************************************************

I have attached 2 projects both with the same functionality. 2 ViewControllers inside a NavigationController. All navigation is handled by the Storyboard.

The Xamarin.iOS projects ViewControllers native objects are never destroyed while the swift's versions are.

I have attached Instruments screenshots to illustrate this also.
Comment 1 Alex Blount 2015-06-10 20:21:07 UTC
Created attachment 11558 [details]
Swift Project
Comment 2 Alex Blount 2015-06-10 20:21:52 UTC
Created attachment 11559 [details]
Xam.iOS instruments Screenshot
Comment 3 Alex Blount 2015-06-10 20:23:18 UTC
Created attachment 11560 [details]
Swift Instruments - Persistent
Comment 4 Alex Blount 2015-06-10 20:24:09 UTC
Created attachment 11561 [details]
Swift Instruments - Destroyed
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-06-17 03:08:46 UTC
This is probably fixed by 8d3cb336 (see bug #30420).
Comment 6 Alex Blount 2015-06-18 06:02:17 UTC
I have also noticed that we are getting the same outcome when Cells are created from nibs. Would you expect the fix to solve this issue also?
Comment 7 Rolf Bjarne Kvinge [MSFT] 2015-06-18 06:15:06 UTC
Yes, that would be my guess as well.
Comment 8 Adrian Murphy 2015-06-19 11:13:53 UTC
Hey Gouri - Spoke with Rolf about this issue, and per his commit reference in comment 5, he said the best course of action is probably to have QA verify. I've updated the status to resolved and sent it over to you. Please feel free to re-assign to someone else for verification if this is not the right workflow.
Comment 9 Aaron Sky 2015-06-19 13:30:33 UTC
I was able to reproduce this in both XI 8.10.1.64 and 8.10.1.74.
Comment 10 Aaron Sky 2015-06-19 14:09:37 UTC
After further investigation I was also able to reproduce this bug in XI 8.11.0.1115 from macios-mac-master lane.
Comment 11 Adrian Murphy 2015-06-25 18:23:14 UTC
Aaron - Can we send this back to Rolf if it's still open in all these versions, or is there more testing to complete first? Seems like it's definitely in need of some patches for SR3.
Comment 12 Sebastien Pouliot 2015-06-30 12:43:36 UTC
update: SR3 -> 8.10.4
Comment 13 Aaron Sky 2015-07-13 13:06:28 UTC
I have been able to verify the fix in XI 8.10.4.10