Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I have created a list of strings from which I am creating a number of UIButtons that are added to a UIScrollView using the following code
y = 4;
t = 0;
foreach (string s in crops)
UIButton btn = new UIButton(UIButtonType.RoundedRect);
btn.Frame = new RectangleF(4, y, AppDelegate.Self.ScreenX - 8, 16);
btn.Tag = t;
btn.TouchUpInside += (object sender, EventArgs e) =>
UIButton but = (UIButton)sender;
NavigationController.PushViewController(new myNewView(s[but.Tag]), true);
y += 20;
The buttons are correctly added, but clicking any of them results in the following throwback
mono-rt: at <unknown> <0xffffffff>
mono-rt: at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string,intptr,intptr) <IL 0x0009f, 0xffffffff>
mono-rt: at MonoTouch.UIKit.UIApplication.Main (string,string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
mono-rt: at ftrack2ios.Application.Main (string) [0x0000a] in /Volumes/Developer/Developer/ftrack-2/iOS/ftrack2-ios/ftrack2-ios/Main.cs:18
mono-rt: at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
The `scrlView.AddSubview(btn);` should keep a reference to your button.
Can you attach a self-copntained test case that reproduce the issue ?
No idea why a change for it to display the string should make it work, but it does. Further digging didn't show much, but it now works.
It's all rather confusing really…
> why a change for it to display the string
Which string ? the button's title ? it should not matter.
If you can goback to the original (crash condition) and get me the app (or a test case) I'll have a look into it.