Bug 11047 - overriding UICollectionViewController::WillEndDragging causes crash
Summary: overriding UICollectionViewController::WillEndDragging causes crash
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2013-03-11 13:07 UTC by Nick
Modified: 2013-03-12 08:29 UTC (History)
3 users (show)

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


Attachments
Test case (2.26 MB, application/zip)
2013-03-11 13:07 UTC, Nick
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 Nick 2013-03-11 13:07:30 UTC
Created attachment 3573 [details]
Test case

In simulator, defining: 

public override void WillEndDragging (UIScrollView scrollView, PointF velocity, ref PointF targetContentOffset)
{
	base.WillEndDragging (scrollView, velocity, ref targetContentOffset);
}

in a UICollectionViewController subclass will crash on scroll. I've attached the Xamarin collection view sample with that method added as a teat case

Crash log:

Assertion failed: (0), function objc_type_size, file monotouch-glue.m, line 1606.
Stacktrace:

  at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at SimpleCollectionView.Application.Main (string[]) [0x00000] in /Users/bransnw6/Downloads/SimpleCollectionView-1/SimpleCollectionView/Main.cs:17
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>

Native stacktrace:

	0   SimpleCollectionView                0x000922cc mono_handle_native_sigsegv + 284
	1   SimpleCollectionView                0x000d84dd sigabrt_signal_handler + 109
	2   libsystem_c.dylib                   0x98b7686b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_sim_c.dylib               0x0420e57b abort + 140
	5   libsystem_sim_c.dylib               0x041f0286 basename + 0
	6   SimpleCollectionView                0x0021782f objc_type_size + 1215
	7   SimpleCollectionView                0x0020f3ae monotouch_trampoline + 830
	8   UIKit                               0x027ab40d -[UIScrollView _endPanWithEvent:] + 4779
	9   UIKit                               0x027ad9eb -[UIScrollView handlePan:] + 133
	10  UIKit                               0x02a1685a _UIGestureRecognizerSendActions + 139
	11  UIKit                               0x02a1599b -[UIGestureRecognizer _updateGestureWithEvent:] + 333
	12  UIKit                               0x02a170df -[UIGestureRecognizer _delayedUpdateGesture] + 46
	13  UIKit                               0x02a19d2d ___UIGestureRecognizerUpdate_block_invoke_0543 + 57
	14  UIKit                               0x02a19cac _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 331
	15  UIKit                               0x02a11a28 _UIGestureRecognizerUpdate + 1348
	16  UIKit                               0x0277e972 -[UIWindow _sendGesturesForEvent:] + 1283
	17  UIKit                               0x0277ee53 -[UIWindow sendEvent:] + 98
	18  UIKit                               0x0275cd4a -[UIApplication sendEvent:] + 436
	19  UIKit                               0x0274e698 _UIApplicationHandleEvent + 9874
	20  GraphicsServices                    0x04d40df9 _PurpleEventCallback + 339
	21  GraphicsServices                    0x04d40ad0 PurpleEventCallback + 46
	22  CoreFoundation                      0x012bfbf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
	23  CoreFoundation                      0x012bf962 __CFRunLoopDoSource1 + 146
	24  CoreFoundation                      0x012f0bb6 __CFRunLoopRun + 2118
	25  CoreFoundation                      0x012eff44 CFRunLoopRunSpecific + 276
	26  CoreFoundation                      0x012efe1b CFRunLoopRunInMode + 123
	27  GraphicsServices                    0x04d3f7e3 GSEventRunModal + 88
	28  GraphicsServices                    0x04d3f668 GSEventRun + 104
	29  UIKit                               0x0274bffc UIApplicationMain + 1211
	30  ???                                 0x0fdadb3d 0x0 + 266001213
	31  ???                                 0x0f886eb8 0x0 + 260599480
	32  ???                                 0x0f886228 0x0 + 260596264
	33  ???                                 0x0f88637e 0x0 + 260596606
	34  SimpleCollectionView                0x0000a762 mono_jit_runtime_invoke + 722
	35  SimpleCollectionView                0x0016d2ee mono_runtime_invoke + 126
	36  SimpleCollectionView                0x001714e4 mono_runtime_exec_main + 420
	37  SimpleCollectionView                0x001768d5 mono_runtime_run_main + 725
	38  SimpleCollectionView                0x00067c45 mono_jit_exec + 149
	39  SimpleCollectionView                0x00205195 main + 2005
	40  SimpleCollectionView                0x00003795 start + 53

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-03-11 20:01:16 UTC
I can reproduce this, I'll have a look to see what's going on.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-03-12 08:29:09 UTC
Fixed.

monotouch-master: 196eccd79dbf3cd6d4fb66df39b370835f47b0f8

This fix will not be included in the upcoming 6.2.1 release (it's too late), but it will be in the next release after that.