2012-08-13 101 views
0

我的Monotouch iOS應用中出現隨機崩潰。使用該應用程序一段時間後會發生崩潰。它們還經常在鎖定和解鎖設備後發生。有兩個蹤跡出現在這個崩潰,這樣的:Monotouch應用中的隨機崩潰

0 ogaza 0x00003382 + 0 
1 ogaza 0x00003fac + 0 
2 libsystem_c.dylib 0x327e17ec _sigtramp + 48 
3 libsystem_c.dylib 0x327d720e pthread_kill + 54 
4 libsystem_c.dylib 0x327d029e abort + 94 
5 ogaza 0x00684666 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6626814 
6 ogaza 0x005dc0ee _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5937286 
7 ogaza 0x005dc3b6 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5937998 
8 ogaza 0x006501a0 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6412600 
9 ogaza 0x00650f16 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6416046 
10 ogaza 0x00650fd8 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6416240 
11 ogaza 0x005e8244 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5986780 
12 ogaza 0x005e83f0 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5987208 
13 ogaza 0x005e70c2 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5982298 
14 ogaza 0x002ffd87 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 2938143 
15 ogaza 0x004579eb _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4346243 
16 ogaza 0x00457d0b _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4347043 
17 ogaza 0x00458e73 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4351499 
18 ogaza 0x00457c17 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4346799 
19 ogaza 0x004577bb _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4345683 
20 ogaza 0x00415ed3 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4077163 
21 ogaza 0x00415abf _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4076119 
22 ogaza 0x004807db _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4513651 
23 ogaza 0x004801eb _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4512131 
24 ogaza 0x0046db27 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4436671 
25 ogaza 0x003fdc7b _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 3978259 
26 ogaza 0x003ffacb _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 3986019 
27 ogaza 0x0004d2a3 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 109115 
28 ogaza 0x002aa467 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 2587647 
29 ogaza 0x005d4172 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5904650 
30 ogaza 0x0064f996 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6410542 
31 ogaza 0x005bf8d6 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5820526 
32 CoreFoundation 0x3532f3fc -[NSObject performSelector:withObject:withObject:] + 52 
33 UIKit 0x32e24e06 -[UIApplication sendAction:to:from:forEvent:] + 62 
34 UIKit 0x32e24dc2 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30 
35 UIKit 0x32e24da0 -[UIControl sendAction:to:forEvent:] + 44 
36 UIKit 0x32e24b10 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492 
37 UIKit 0x32e25448 -[UIControl touchesEnded:withEvent:] + 476 
38 UIKit 0x32e17b86 _UIGestureRecognizerUpdate + 5222 
39 CoreFoundation 0x353a9b1a __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18 
40 CoreFoundation 0x353a7d56 __CFRunLoopDoObservers + 258 
41 CoreFoundation 0x353a80b0 __CFRunLoopRun + 760 
42 CoreFoundation 0x3532b4a4 CFRunLoopRunSpecific + 300 
43 CoreFoundation 0x3532b36c CFRunLoopRunInMode + 104 
44 GraphicsServices 0x36fc7438 GSEventRunModal + 136 
45 UIKit 0x32e37cd4 UIApplicationMain + 1080 
46 ogaza 0x000712b3 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 256587 
47 ogaza 0x003d7777 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 3821327 
48 ogaza 0x002aa467 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 2587647 
49 ogaza 0x005d4172 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5904650 
50 ogaza 0x0064f996 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6410542 
51 ogaza 0x006526ae _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6422086 
52 ogaza 0x00655fda _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6436722 
53 ogaza 0x005d8bce _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5923686 
54 ogaza 0x00695697 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6696495 
55 ogaza 0x00032bfb _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 915 

這:

0 ogaza 0x00003382 + 0 
1 ogaza 0x00003fac + 0 
2 libsystem_c.dylib 0x327e17ec _sigtramp + 48 
3 ogaza 0x00053b8f _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 135975 
4 ogaza 0x0047abff _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4490135 
5 ogaza 0x00406cdb _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 4015219 
6 ogaza 0x002aa467 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 2587647 
7 ogaza 0x005d4172 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5904650 
8 ogaza 0x0064f996 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6410542 
9 ogaza 0x005cc522 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5872826 
10 UIKit 0x32e4bb94 -[UIViewController _setViewAppearState:isAnimating:] + 144 
11 UIKit 0x32ea5d84 -[UIViewController _endAppearanceTransition:] + 264 
12 UIKit 0x32e68250 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 680 
13 UIKit 0x32e67fa0 -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] + 292 
14 UIKit 0x32e67cba -[UINavigationTransitionView _cleanupTransition] + 650 
15 UIKit 0x32e67a2e -[UINavigationTransitionView _navigationTransitionDidStop] + 62 
16 UIKit 0x32e1eaaa -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 470 
17 UIKit 0x32e243d4 -[UIViewAnimationState animationDidStop:finished:] + 52 
18 QuartzCore 0x3222ac2e _ZN2CA5Layer23run_animation_callbacksEPv + 202 
19 libdispatch.dylib 0x34264ee6 _dispatch_main_queue_callback_4CF$VARIANT$mp + 194 
20 CoreFoundation 0x353a82ac __CFRunLoopRun + 1268 
21 CoreFoundation 0x3532b4a4 CFRunLoopRunSpecific + 300 
22 CoreFoundation 0x3532b36c CFRunLoopRunInMode + 104 
23 GraphicsServices 0x36fc7438 GSEventRunModal + 136 
24 UIKit 0x32e37cd4 UIApplicationMain + 1080 
25 ogaza 0x000712b3 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 256587 
26 ogaza 0x003d7777 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 3821327 
27 ogaza 0x002aa467 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 2587647 
28 ogaza 0x005d4172 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5904650 
29 ogaza 0x0064f996 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6410542 
30 ogaza 0x006526ae _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6422086 
31 ogaza 0x00655fda _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6436722 
32 ogaza 0x005d8bce _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 5923686 
33 ogaza 0x00695697 _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 6696495 
34 ogaza 0x00032bfb _ZNSt6vectorIhSaIhEEC2IPKhEET_S5_RKS0_ + 915 

我懷疑有一些問題與內存管理。我嘗試了幾個來自互聯網的提示,例如:

  • 當使用從UITableViewCell繼承的類時,將它們保存在我的viewcontroller的數組中。
  • 保存我在類字段中附加事件的所有控件。
  • 使用SGEN GC參照計數擴展

無的這個工作。

任何暗示我能做些什麼來調試?在設備

+0

可以創建崩潰而設備上進行調試?這應該會給你更好的信息。 – jonathanpeppers 2012-08-13 17:28:22

回答

1

1.Try調試,這裏是how to

2.Try加試風風火火的切入點

public class Application 
{ 
    private static void Main(string[] args) 
    { 
     try 
     { 
      UIApplication.Main(args, null, "AppDelegate"); 
     } 
     catch (Exception ex) 
     { 
      Logger.Error(ex); 
     } 
    } 

3.Try訂閱上UnhandledException

public override bool FinishedLaunching(UIApplication app, NSDictionary options) 
    { 
     AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; 
     ..... 
    } 

    private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) 
    { 
     Logger.Error(e.ExceptionObject); 
    } 

4.Take一看Monotouch limitations

+0

謝謝GSerko。我有這個相關的問題。我實際上正在處理Main中的異常,但是用Console.WriteLine編寫它們,但沒有成功。 – MaxM 2012-08-14 18:08:56