Hello,
I am facing an error in Xamarin.IOS and was working more than a week on it, reading different articles in SO and Xamarin.forum and trying to get an answer from the support team, but there was nothing. Maybe someone here can help me. I wanted to use the PresentViewController to popup a viewcontroller (with a tableview, searchbar and toolbar) so the user can select an item from the tableview like the Fieldservice sample.
I wrote the code and the PresentViewController works fine showing the viewcontroller, but sometimes after selecting an item and closing the popup viewcontroller the whole solution crashes, showing the following error message in the output window:
mono-rt: Stacktrace:
mono-rt: at <0xffffffff>
mono-rt: at (wrapper managed-to-native) MonoTouch.Foundation.NSObject.monotouch_release_managed_ref (intptr,intptr)
mono-rt: at MonoTouch.Foundation.NSObject.ReleaseManagedRef () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:94
mono-rt: at MonoTouch.Foundation.NSObject/NSObject_Disposer.Drain (MonoTouch.Foundation.NSObject) [0x00062] in /Developer/MonoTouch/Source/maccore/src/Foundation/NSObject2.cs:690
mono-rt: at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr)
mono-rt: at <0xffffffff>
mono-rt: at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr)
mono-rt: at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:39
mono-rt: at ApolloMobileIOS.Application.Main (string[]) [0x00008] in /Users/MbProg/Projects/MasterDetailTestProject 2/MasterDetailTestProject/Main.cs:17
mono-rt: at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr)
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.
I have simplified the app so I can show you the error. The solution (MasterDetailTestProject.sln) is attached. The critical part of the code where this bug is raised is flagged by TODO statements.
To test the bug:
1. Run the solution.
2. On the Segmented Buttons click on "Ansprechpartner".
3. Click on the arrow on the cell labeled "Ansprechpartner".
4. A View controller appears. Scroll down and select "Schauman Schauman". You can select also another one. But the bug does not always appear. I think you have to scroll and select fastly.
Then the app crashes and you can see this bug in the output window.
I have also looked if there is a memory leak anywhere, but could not find anything in the code.
Is there anybody who can help me?