Bug 18487 - [iOS Simulator] Getting 'SIGSEGV' for iOS sample 'CustomCollectionViewLayoutAttributes' when clicking on image
Summary: [iOS Simulator] Getting 'SIGSEGV' for iOS sample 'CustomCollectionViewLayoutA...
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Samples ()
Version: 7.2.1
Hardware: Macintosh Mac OS
: High critical
Target Milestone: 7.2.1
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2014-03-20 04:33 UTC by Nischal
Modified: 2014-03-25 02:06 UTC (History)
5 users (show)

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

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 Nischal 2014-03-20 04:33:35 UTC
Steps to reproduce:
1. Open iOS sample 'CustomCollectionViewLayoutAttributes'.
2. Debug or run the sample.
3. Click on any image on iOS Simulator.

Actual result: Application getting crashed and throwing exception "SIGSEGV". However, this is working fine on physical device.

Expected Result: Image should get removed after clicking on Image on iOS Simulator.

Supplement info:
Application output: https://gist.github.com/saurabh360/21cec5afa3d261cf3693
Application crash log: https://gist.github.com/saurabh360/abd5fb433477cf7329cc

checked with:
iPad Simulator 6.1, 6.0 and 7.0

Environment details:
All Mac
X.S 4.2.4(build 32)
X.iOS 7.2.1-20

Regression Status:
REGRESSION: This is working fine with stable X.iOS 7.2.0.2
Comment 1 Rolf Bjarne Kvinge [MSFT] 2014-03-20 11:40:38 UTC
This seems to be an object getting freed.

Running with GC_DONT_GC=1 doesn't crash.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-03-20 12:46:26 UTC
This is the cause:

https://github.com/xamarin/maccore/commit/2829d3fd2ac15cb24b1dda62484fdaa6268f2240

We must also call retain on the return value when users override Copy (really any method with the [Release] attribute on its return value).
Comment 3 Rolf Bjarne Kvinge [MSFT] 2014-03-21 13:07:58 UTC
Fixed.

maccore/master: cbcffcc740f4703f5c57ce65bbc09d70fd669b79
monotouch/master: c6f8ba806b83f62e17daceac21570c0e3c3c6e84
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-03-21 13:37:07 UTC
Actually the test project still crashes.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2014-03-21 14:34:05 UTC
OK, I believe I managed to finally fix it now.

monotouch/master: 499f4c375d7dc7092dca003a717ecb0115847a19
Comment 6 Tajinder Singh 2014-03-24 05:37:47 UTC
I have tested this issue with the following builds:
XS 4.2.4(build 32)
X.iOS 7.2.1.24

monotouch-samples-mastere7df2539444ee8ff731a614d227cdd8588e154c3

I am observing same issue with the latest build and sample also.Hence reopening the issue.
Comment 8 Sebastien Pouliot 2014-03-24 23:17:28 UTC
It was not (then) backported - but only on master (as stated in comment 5).

It is now backported in monotouch-7.2.1-branch 46b2486c6e69811dd4e0c69c61e57fa34b257461

You need 7.2.1.25 (or newer) to get/test this fix.
Comment 9 Tajinder Singh 2014-03-25 02:06:59 UTC
Today I have tested this sample with the following builds:

XS 4.2.4(build 32)
X.iOS 7.2.1.25

Now it is working fine.Hence marking this issue as verified fixed.