Xamarin iOS iPad应用程序崩溃,原因不明。

3
我们正在使用Xamarin开发一款大型iOS应用程序。 最近几天,我们遇到了一个问题:应用程序以绝对意想不到的方式崩溃。我们无法从Xamarin调试器中获取日志,它完全为空。只有停止按钮可以切换为播放按钮;) 我们唯一拥有的就是附加的XCode控制台日志。但是我无法找出发生了什么事情。 这个问题是不可重现的,并且会在应用程序的不同位置发生。 是否有人遇到过类似的问题并找到了解决方法?
Mar 21 15:01:15  Ios[312] <Error>: Stacktrace:
Mar 21 15:01:15  Ios[312] <Error>:   at <unknown> <0xffffffff>
Mar 21 15:01:15  Ios[312] <Error>:   at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>
Mar 21 15:01:15  Ios[312] <Error>:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pmcs-compat.UIApplication.cs:38
Mar 21 15:01:15  Ios[312] <Error>:   at Ios.Application.Main (string[]) [0x00008] in /Users/admin/Projects/XXX/Source/Ios/Main.cs:15
Mar 21 15:01:15  Ios[312] <Error>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Mar 21 15:01:15  Ios[312] <Error>: 
    Native stacktrace:
Mar 21 15:01:15  Ios[312] <Error>:  0   Ios                                 0x00cfdb69 mono_handle_native_sigsegv + 260
Mar 21 15:01:15  Ios[312] <Error>:  1   Ios                                 0x00d06d09 mono_sigsegv_signal_handler + 176
Mar 21 15:01:15  Ios[312] <Error>:  2   libsystem_platform.dylib            0x38b18063 _sigtramp + 42
Mar 21 15:01:15  Ios[312] <Error>:  3   UIKit                               0x307b8cf5 <redacted> + 76
Mar 21 15:01:15  Ios[312] <Error>:  4   CoreFoundation                      0x2de27504 <redacted> + 68
Mar 21 15:01:15  Ios[312] <Error>:  5   CoreFoundation                      0x2dd71dfb <redacted> + 282
Mar 21 15:01:15  Ios[312] <Error>:  6   CoreFoundation                      0x2dd75593 <redacted> + 50
Mar 21 15:01:15  Ios[312] <Error>:  7   WebKit                              0x368b2ee7 <redacted> + 222
Mar 21 15:01:15  Ios[312] <Error>:  8   CoreFoundation                      0x2de26069 <redacted> + 352
Mar 21 15:01:15  Ios[312] <Error>:  9   CoreFoundation                      0x2dd754d8 _CF_forwarding_prep_0 + 24
Mar 21 15:01:15  Ios[312] <Error>:  10  CoreFoundation                      0x2de27504 <redacted> + 68
Mar 21 15:01:15  Ios[312] <Error>:  11  CoreFoundation                      0x2dd71dfb <redacted> + 282
Mar 21 15:01:15  Ios[312] <Error>:  12  WebCore                             0x35f101bd <redacted> + 100
Mar 21 15:01:15  Ios[312] <Error>:  13  CoreFoundation                      0x2ddef183 <redacted> + 14
Mar 21 15:01:15  Ios[312] <Error>:  14  CoreFoundation                      0x2ddee653 <redacted> + 206
Mar 21 15:01:15  Ios[312] <Error>:  15  CoreFoundation                      0x2ddece47 <redacted> + 622
Mar 21 15:01:15  Ios[312] <Error>:  16  CoreFoundation                      0x2dd57c27 CFRunLoopRunSpecific + 522
Mar 21 15:01:15  Ios[312] <Error>:  17  CoreFoundation                      0x2dd57a0b CFRunLoopRunInMode + 106
Mar 21 15:01:15  Ios[312] <Error>:  18  GraphicsServices                    0x32a2b283 GSEventRunModal + 138
Mar 21 15:01:15  Ios[312] <Error>:  19  UIKit                               0x305fb049 UIApplicationMain + 1136
Mar 21 15:01:15  Ios[312] <Error>:  20  Ios                                 0x004ac450 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 272
Mar 21 15:01:15  Ios[312] <Error>:  21  Ios                                 0x0046335c MonoTouch_UIKit_UIApplication_Main_string___string_string + 300
Mar 21 15:01:15  Ios[312] <Error>:  22  Ios                                 0x0000bcc8 Ios_Application_Main_string__ + 172
Mar 21 15:01:15  Ios[312] <Error>:  23  Ios                                 0x0064c558 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
Mar 21 15:01:15  Ios[312] <Error>:  24  Ios                                 0x00d08e25 mono_jit_runtime_invoke + 1196
Mar 21 15:01:15  Ios[312] <Error>:  25  Ios                                 0x00d46e8d mono_runtime_invoke + 88
Mar 21 15:01:15  Ios[312] <Error>:  26  Ios                                 0x00d4aa67 mono_runtime_exec_main + 282
Mar 21 15:01:15  Ios[312] <Error>:  27  Ios                                 0x00d4a8a7 mono_runtime_run_main + 474
Mar 21 15:01:15  Ios[312] <Error>:  28  Ios                                 0x00cf710d mono_jit_exec + 48
Mar 21 15:01:15  Ios[312] <Error>:  29  Ios                                 0x00d97fe8 main + 2464
Mar 21 15:01:15  Ios[312] <Error>:  30  Ios                                 0x0000b028 start + 40
Mar 21 15:01:15  Ios[312] <Error>: 
    =================================================================
    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.
    =================================================================

你修改了 Stack Trade 并将其改为“已删除”吗? - AnthonyLambert
1
我认为出了问题在<已隐去>... - AnthonyLambert
1
这是我之前修复<已编辑>部分的方法:https://dev59.com/g2cs5IYBdhLWcg3wfEDa#12854350 - Rolf Bjarne Kvinge
1
听起来你需要将代码回滚到几天前,然后逐步重新引入你的更改。 - NovaJoe
1个回答

0

看起来你引入了一些将在编译器时间之前解析的代码。这在Android中是可能的(JIT即时编译器时间),但在iOS中不行(AOT预先编译时间)。 阅读Xamarin在其页面上写的内容http://docs.xamarin.com/guides/ios/advanced_topics/limitations/

由于iPhone内核防止应用程序动态生成代码,因此iPhone上的Mono不支持任何形式的动态代码生成。

希望我能帮到你!


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接