Hi,
In Xcode, I've defined a ViewController that contains 2 UIButtons (btnNext and btnPrevious) and a UITabBar that contains 4 UITabBarItems. Assume that tabitem 4 fires off a MT.D for the app settings.
The UIButton events are bog standard :
btnNext.TouchUpInside += (object s, EventArgs e) =>
{
HandleButton(s, e, some_param); // some_param is just an int
};
The events though are only set up if the buttons are needed (if some_param != 0, they're needed). Checking with the debugger when returning from the settings VC shows the buttons are not null.
If I select the settings item, then return to the main VC, select the settings item then return to the main VC then click on the next button, the app dies with either
mono-rt: Stacktrace:
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 polymorphios.Application.Main (string[]) [0x00009] in /Users/PFJ/Developer/Developer/polymorph/polymorph-ios/polymorph-ios/Main.cs:16
mono-rt: at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
mono-rt:
Native stacktrace:
mono-rt:
=================================================================
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.
=================================================================
or
NSInvalidArgumentException Reason: [NSConcreteValue BridgeSelector]
Having looked around, there are three suggestions - either the GC is being way to strict, the new VC for settings is overwriting memory so the button event is firing in the unknown or there is a problem with monotouch bindings.
The tabbaritem fires off the MT.D like this
NavigationController.PushViewController(new usersettingsDVC(NavigationController, tbBottom), true);
Any advice on checking if this is a GC issue so I can get this into BZ?
Paul