This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 36256 - Memory leak related to KDTree.FromData<int>(points, distance)
Summary: Memory leak related to KDTree.FromData<int>(points, distance)
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler (show other bugs)
Version: XI 9.2
Hardware: PC Mac OS
: --- normal
Target Milestone: C6SR1
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2015-11-25 13:56 UTC by Brendan Zagaeski
Modified: 2015-12-18 07:00 UTC (History)
4 users (show)

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


Attachments

Comment 1 Brendan Zagaeski 2015-11-25 14:00:29 UTC
For the private test case in comment 0:

> main in MemoryLeakTest has the test case


Additional description of the problem:

> Guys,
> 
> after updating to alpha channel, this issue seems to be solved. However, the
> next line of code, seems to be also leaking in pure managed world with AOT
> compiler. 
> 
> Class 
> Accord.MachineLearning.MeanShift
> 
> Method 
> public int[] Compute(double[][] points, double threshold, int maxIterations =
> 100)
> 
> Line 285 , tree = KDTree.FromData<int>(points, distance);
> 
> 
> Of corse this should be something inside KDTree.FromData
Comment 2 Zoltan Varga 2015-11-25 17:34:46 UTC
Should be fixed by mono master d4828b42f0f777049abdba402a7a591fd24bcdac, maccore master was bumped to it in 6feed2b86973514f69607c1cb13e181c82e81100.
Comment 3 Zoltan Varga 2015-11-25 22:07:50 UTC
Reopen as the fix had to be reverted.
Comment 4 Zoltan Varga 2015-12-01 21:32:24 UTC
Should be fixed by mono master 6c5326ab486740f64b3486248b61cb766d468630, maccore master was bumped to it in 7156e11c6db653aaee4d2d58ea1511cbece7c842.
Comment 5 manuel 2015-12-09 12:45:39 UTC
Hi guys, when do you expect to have the fix available? Just tried Xamarin.iOS 9.2.2.29 (current alpha) and it seems to be happening.
Comment 6 Saurabh 2015-12-14 11:01:02 UTC
I have tried to reproduce this Issue with XS 9.2.1.54 using attached project. But I am not seeing any leaking Issue neither in application output nor in build output.

Could you please provide me some steps where how can check this Issue so that I can verify this Issue?

I have used iOS device iPhone 6S (version 9.2)
Comment 7 Zoltan Varga 2015-12-14 19:16:02 UTC
The sample app has to be run for a few minutes, then it will crash due to running out of memory.
Comment 8 Saurabh 2015-12-15 09:03:46 UTC
I have checked this Issue with attached project in this bug. Using the project I am able to reproduce this Issue on XI 9.2.1.54. Application getting crashed withing 4-7 minutes and 'Memory warning' appears in application output. This is the application output for the same: https://gist.github.com/saurabh360/54636c27a36c59ad5711

I have checked the same with latest XI 9.3.2.496, Project woking fine on this build. This is the application output: https://gist.github.com/saurabh360/5c575afbdea187151391

=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 2939b8b4-8977-42bd-82d6-100275ccd9cd
Runtime:
	Mono 4.2.1 (explicit/3ddba85)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010133

=== Xamarin.Profiler ===

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

=== Xamarin.Android ===

Version: 6.0.0.34 (Enterprise Edition)
Android SDK: /Users/360_macmini/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

=== Xamarin Android Player ===

Version: 0.3.4
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.1 (9079)
Build 7B91b

=== Xamarin.iOS ===

Version: 9.3.2.496 (Enterprise Edition)
Hash: 7156e11
Branch: master
Build date: 2015-12-01 17:47:30-0500

=== Xamarin.Mac ===

Version: 2.4.0.113 (Enterprise Edition)

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.10.5
Darwin Hello.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 9 Saurabh 2015-12-17 11:37:39 UTC
I have checked this Issue with C6SR1. I am getting this Issue again on this build. Application getting crashed after few minutes(within 4-5 minutes).

Application Output: https://gist.github.com/saurabh360/1b043610fe68d6713cd3

Device info:
iPhone 6+ version 9.2


=== Xamarin Studio ===

Version 5.10.2 (build 48)
Installation UUID: 2939b8b4-8977-42bd-82d6-100275ccd9cd
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

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

=== Xamarin.Android ===

Version: 6.0.1.5 (Business Edition)
Android SDK: /Users/360_macmini/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

=== Xamarin Android Player ===

Version: 0.3.4
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.1 (9079)
Build 7B91b

=== Xamarin.iOS ===

Version: 9.4.1.8 (Business Edition)
Hash: f146d47
Branch: master
Build date: 2015-12-15 16:23:04-0500

=== Xamarin.Mac ===

Version: 2.4.1.5 (Business Edition)

=== Build Information ===

Release ID: 510020048
Git revision: e9bd06cdfab010221c38efb284d166f49968d065
Build date: 2015-12-16 17:03:21-05
Xamarin addins: 8bd975e7b465f6fe812b64d736f3b7e8c1a79a3e
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.10.5
Darwin Hello.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 10 Saurabh 2015-12-18 07:00:24 UTC
 have checked this Issue again with latest builds of C6SR1, Now application working fine, not seeing any memory warning not even crash. This is the application output: https://gist.github.com/saurabh360/b1cd5e9b10b9c4ffcd35

=== Xamarin Studio ===

Version 5.10.2 (build 49)
Installation UUID: 2939b8b4-8977-42bd-82d6-100275ccd9cd
Runtime: Mono 4.2.2 (explicit/7b87787)
GTK+ 2.24.23 (Raleigh theme)

Package version: 402020010

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.1.12 (Enterprise Edition)
Hash: 78c6cd3
Branch: master
Build date: 2015-12-17 18:29:42-0500

=== Xamarin.Android ===

Version: 6.0.1.5 (Enterprise Edition)
Android SDK: /Users/360_macmini/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions: 2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

=== Xamarin Android Player ===

Version: 0.3.4
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.4.1.5 (Enterprise Edition)

=== Build Information ===

Release ID: 510020049
Git revision: deed4cd240ff3611c8742bbc62296e207f46173d
Build date: 2015-12-17 11:13:36-05
Xamarin addins: 8bd975e7b465f6fe812b64d736f3b7e8c1a79a3e
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.10.5
Darwin Hello.local 14.5.0 Darwin Kernel Version 14.5.0
Wed Jul 29 02:26:53 PDT 2015
root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

Note You need to log in before you can comment on or make changes to this bug.