2014-09-12 114 views
0

我有一个非常基本的应用程序,用于测试第三方库绑定。我通过接口构建器创建了一个IBAction。当我点击连接到IBAction的按钮时,我的应用程序崩溃。这只发生在调试模式下。该应用程序不会在发布模式下崩溃或在我的设备上运行。甚至在调用任何IBAction方法之前发生崩溃。Xamarin应用程序仅在调试模式下崩溃

这是一个记录的控制台上的错误:

2014-09-12 08:38:45.293 VinScanSandBox[33818:70b] instance: <CSSNMobileSDKController: 0x7a6a8a30> 
mono-rt: Stacktrace: 


mono-rt: at <unknown> <0xffffffff> 

mono-rt: at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x000a6, 0xffffffff> 

mono-rt: at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:39 

mono-rt: at VinScanSandBox.Application.Main (string[]) [0x00008] in /Users/scordova/Projects/VinScanSandBox/VinScanSandBox/Main.cs:17 

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. 
================================================================= 

更新:取消选中“启用调试”修复崩溃,但为什么它在第一时间发生的事情并不向我解释。仍在寻找完整的解决方案。

回答

0

很明显,您的Mono运行时设置在调试和发布模式中有所不同。问题可能在于例如引用计数/ GC行为,因此应用程序会在调试模式下杀死必要的对象,而您仍然试图执行它们。单GC代表一个怪异的行为有时,检查此例如:The value of method argument changes after the method is called

2

如果使用lisview在您的应用程序,然后尝试的.​​xaml文件中添加lisview 的ListView CachingStrategy =“RecycleElement的下列财产

所有列表视图

相关问题