Bug 29768 - UIPopoverControllerDelegate WillReposition crash in simulator (SGEN assertion)
Summary: UIPopoverControllerDelegate WillReposition crash in simulator (SGEN assertion)
Status: RESOLVED DUPLICATE of bug 29720
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.10
Hardware: Macintosh Mac OS
: High major
Target Milestone: Untriaged
Assignee: Mark Probst
URL:
Depends on:
Blocks:
 
Reported: 2015-05-05 16:05 UTC by BB
Modified: 2015-05-06 05:00 UTC (History)
4 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:
RESOLVED DUPLICATE of bug 29720

Description BB 2015-05-05 16:05:32 UTC
In the lastest Xamarin.iOS (8.10.0.267) UIPopoverControllerDelegate WillReposition crashes when you reference the "view" parameter. see below

This happens in the iPad simulator, when showing a popover and the device is rotated.
I think this has been introduced in this latest Xamarin.iOS version as it didn't happen before I upgraded.

It seems OK on an actual iPad device, but always crashes on the simulator (iPad 2 iOS 8.3)


CODE
====

public override void WillReposition(UIPopoverController popoverController, ref CGRect rect, ref UIView view)
{
Console.WriteLine("111 ######## ");
Console.WriteLine("222 ######## this={0}",this);
Console.WriteLine("333 ######## rect={0}",rect);
Console.WriteLine("444 ######## view={0}",view);
}


RESULT
======


2015-05-05 20:54:46.215 ObymobiMobileAppiOS[4034:95207] 111 ######## 
2015-05-05 20:54:46.216 ObymobiMobileAppiOS[4034:95207] 222 ######## this=<Obymobi_Mobile_App_iOS_PopoverController_PopoverDelegate: 0x7db846b0>
2015-05-05 20:54:46.222 ObymobiMobileAppiOS[4034:95207] 333 ######## rect={X=-1.892707,Y=-1.892709,Width=4.600789E-39,Height=0}
2015-05-05 20:54:47.084 ObymobiMobileAppiOS[4034:95275] error: * Assertion: should not be reached at ../../../../../mono/mono/metadata/sgen-scan-object.h:101
2015-05-05 20:54:47.084 ObymobiMobileAppiOS[4034:95275] critical: Stacktrace:

2015-05-05 20:54:47.084 ObymobiMobileAppiOS[4034:95275] critical: 
Native stacktrace:

2015-05-05 20:54:47.123 ObymobiMobileAppiOS[4034:95275] critical: 	0   ObymobiMobileAppiOS                 0x00195d37 mono_handle_native_sigsegv + 311
2015-05-05 20:54:47.124 ObymobiMobileAppiOS[4034:95275] critical: 	1   ObymobiMobileAppiOS                 0x0019c4d1 sigabrt_signal_handler + 129
2015-05-05 20:54:47.124 ObymobiMobileAppiOS[4034:95275] critical: 	2   libsystem_platform.dylib            0x08cd503b _sigtramp + 43
2015-05-05 20:54:47.125 ObymobiMobileAppiOS[4034:95275] critical: 	3   ???                                 0xffffffff 0x0 + 4294967295
2015-05-05 20:54:47.125 ObymobiMobileAppiOS[4034:95275] critical: 	4   libsystem_sim_c.dylib               0x08a6ca5a abort + 156
2015-05-05 20:54:47.125 ObymobiMobileAppiOS[4034:95275] critical: 	5   ObymobiMobileAppiOS                 0x0031934b log_callback + 91
2015-05-05 20:54:47.125 ObymobiMobileAppiOS[4034:95275] critical: 	6   ObymobiMobileAppiOS                 0x002fe404 log_adapter + 164
2015-05-05 20:54:47.126 ObymobiMobileAppiOS[4034:95275] critical: 	7   ObymobiMobileAppiOS                 0x0030c93b monoeg_assertion_message + 107
2015-05-05 20:54:47.126 ObymobiMobileAppiOS[4034:95275] critical: 	8   ObymobiMobileAppiOS                 0x002a89e5 drain_gray_stack + 6869
2015-05-05 20:54:47.126 ObymobiMobileAppiOS[4034:95275] critical: 	9   ObymobiMobileAppiOS                 0x0029d502 finish_gray_stack + 130
2015-05-05 20:54:47.127 ObymobiMobileAppiOS[4034:95275] critical: 	10  ObymobiMobileAppiOS                 0x0029c37b major_finish_collection + 331
2015-05-05 20:54:47.127 ObymobiMobileAppiOS[4034:95275] critical: 	11  ObymobiMobileAppiOS                 0x00297d04 major_do_collection + 100
2015-05-05 20:54:47.127 ObymobiMobileAppiOS[4034:95275] critical: 	12  ObymobiMobileAppiOS                 0x00295fd2 sgen_perform_collection + 1170
2015-05-05 20:54:47.127 ObymobiMobileAppiOS[4034:95275] critical: 	13  ObymobiMobileAppiOS                 0x00298d52 mono_gc_collect + 82
2015-05-05 20:54:47.128 ObymobiMobileAppiOS[4034:95275] critical: 	14  ObymobiMobileAppiOS                 0x003195b9 pump_gc + 41
2015-05-05 20:54:47.128 ObymobiMobileAppiOS[4034:95275] critical: 	15  libsystem_pthread.dylib             0x08ce1e13 _pthread_body + 138
2015-05-05 20:54:47.128 ObymobiMobileAppiOS[4034:95275] critical: 	16  libsystem_pthread.dylib             0x08ce1d89 _pthread_body + 0
2015-05-05 20:54:47.128 ObymobiMobileAppiOS[4034:95275] critical: 	17  libsystem_pthread.dylib             0x08cdfe52 thread_start + 34
2015-05-05 20:54:47.128 ObymobiMobileAppiOS[4034:95275] critical: 
=================================================================
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 Sebastien Pouliot 2015-05-05 20:54:38 UTC
@Mark that seems to be identical to bug #29486 but it also affect current stable release (and mono 4.0) not just master.
Comment 2 Miguel de Icaza [MSFT] 2015-05-05 21:50:54 UTC
While trying to create a repro (#29779), I noticed a different problem, the parameters to "rect" look wrong (also on this stack trace).

So I wonder if we got something wrong in the marshaling that is corrupting Sgen?
Comment 3 Miguel de Icaza [MSFT] 2015-05-05 21:56:57 UTC
See additional information on the other bug, we have a marshaling bug, and this might explain this bug.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-05-06 05:00:49 UTC

*** This bug has been marked as a duplicate of bug 29720 ***