1

vnextへの旅を続けます...

これで、ソリューション全体を構築して正常に実行できます。ただし、IMvxGeoLocationWatcherを初期化しようとすると、クラッシュします。コードと出力は-

private IMvxGeoLocationWatcher _geoWatcher;

public void StartGettingLocation(Action<MvxCoordinates> response)
{
    Log.Info("LocationService->StartGettingLocation");

    // crashes on this line -
    if (_geoWatcher == null) _geoWatcher = this.GetService<IMvxGeoLocationWatcher>();

出力-

未処理の例外:0 MyApp 0x000797ae mono_handle_exception_internal_first_pass + 2190 1 MyApp 0x0007b1e2 mono_handle_exception_internal + 1602 2 MyApp 0x0007bd2f mono_handle_exception + 47 3 MyApp 0x000bce22 mono_x86_throw_exception + 306 4 ??? 0x07f30f8f 0x0 + 133369743 at System.Reflection.MonoCMethod.Invoke(System.Reflection.BindingFlags、System.Reflection.Binder、object []、System.Globalization.CultureInfo)[0x00000] in / Developer / MonoTouch / Source / mono / mcs / class / corlib / System.Reflection / MonoMethod.cs:545 at System.Activator.CreateInstance(System.Type、System.Reflection.BindingFlags、System.Reflection.Binder、object []、System.Globalization.CultureInfo、2<string, string>,Cirrious.MvvmCross.Interfaces.ViewModels.IMvxViewModel&) <IL 0x00043, 0x000d8> at Cirrious.MvvmCross.Application.MvxViewModelLoader.LoadViewModel (Cirrious.MvvmCross.Views.MvxShowViewModelRequest) <IL 0x0005b, 0x000a2> at Cirrious.MvvmCross.Touch.ExtensionMethods.MvxTouchViewControllerExtensionMethods.LoadViewModel<TViewModel> (Cirrious.MvvmCross.Touch.Interfaces.IMvxTouchView1)Cirrious.MvvmCross.Touch.ExtensionMethods.MvxTouchViewControllerExtensionMethods / c__AnonStorey0 1.<>m__0 () <IL 0x00006, 0x00034> at Cirrious.MvvmCross.ExtensionMethods.MvxViewExtensionMethods.OnViewCreate<TViewModel> (Cirrious.MvvmCross.Interfaces.Views.IMvxView1、System.Func 1<TViewModel>) <IL 0x00012, 0x00045> at Cirrious.MvvmCross.Touch.ExtensionMethods.MvxTouchViewControllerExtensionMethods.OnViewCreate<TViewModel> (Cirrious.MvvmCross.Touch.Interfaces.IMvxTouchView1)Cirrious.MvvmCross.Touch.Views.MvxTouchViewController`1.ViewDidLoad()at MyApp.UI.Touch.MainMenuViewController.ViewDid 0x00000]/Users/franklyn/Documents/Programming/MyApp/MyApp.UI.Touch/Views/MainMenuViewController.cs:34

編集-残りの例外トレース:

at(wrapper runtime-invoke)object.runtime_invoke_void_ this_(object、intptr、intptr、intptr)18 MyApp 0x00008732 mono_jit_runtime_invoke + 722 19 MyApp 0x0014f39e mono_runtime_invoke + 126 20 MyApp 0x001e6296 monotouch_trampoline + 3686 21 UIKit 0x00a4b817-[UIViewController loadViewIfRequired 0x00a4bb2a-[UIViewController contentScrollView] + 36 24 UIKit 0x00a62ef5-[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 36 25 UIKit 0x00a62fdb-[UINavigationController _layoutViewController:] + 43 26 UIKit 0x00a63286-[UINavigationController _updateScrollViewFromViewController:toViewController:] + 254 27 UIKit 0x00a63381-[UINavigationController _startTransition:fromViewController:toViewController:] + 72 28 UIKit 0x00a63eab-[UINavigationController _start + 41 30 UIKit 0x00a64055-[UINavigationController] + 72 28 UIKit 0x00a63eab-[UINavigationController _startDeferredTransitionIfNeeded:] + 386 29 UIKit 0x00a63fc9-[UINavigationController _startDeferredTransitionIfNeeded] + 41 30 UIKit 0x00a64055-[UINavigationController] + 72 28 UIKit 0x00a63eab-[UINavigationController _startDeferredTransitionIfNeeded:] + 386 29 UIKit 0x00a63fc9-[UINavigationController _startDeferredTransitionIfNeeded] + 41 30 UIKit 0x00a64055-[UINavigationControllerviewWillLayoutSubviews] + 33 31 UIKit 0x00b693ab-[UILayoutContainerView layoutSubviews] + 233 32 UIKit 0x009ba92d-[UIView(CALayerDelegate)layoutSublayersOfLayer:] + 279 33 libobjc.A.dylib 0x022086b0-[NSObject PerformSelector:withObject:] CALayer layoutSublayers] + 240 35 QuartzCore 0x0194733c _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 468 36 QuartzCore 0x01952eaf-[CALayer layoutIfNeeded] + 166 37 UIKit 0x00a598cd-[UIViewController window:setupWithInterfaceOrientation isRotating:] + 5346 39 UIKit 0x009a0cbf-[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82 40 UIKit 0x009a0bd9-[UIWindow _setRotatableViewOrientation:duration:force:] + 89 41 UIKit 0x0099fe34 __57 ] _block_invoke_0 + 224 42 UIKit 0x0099fc6e-[UIWindow _updateToInterfaceOrientation:duration:force:] + 209 43 UIKit 0x009a0a29-[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 853 44 UIKit 0x009a3922-[UIWindow setDelegate] :] + 164 46 UIKit 0x0099abc4-[UIWindow addRootViewControllerViewIfPossible] + 481 47 UIKit 0x0099adbf-[UIWindow _setHidden:forced:] + 368 48 UIKit 0x0099af55-[UIWindow _orderFrontWithoutMakingKey] + 49 49 UIKit 0x009a3f -to-native)MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend(intptr、intptr)at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible()[0x00008] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIWindow.g.cs: 126 at MyApp.UI.Touch.AppDelegate.FinishedLaunching(MonoTouch.UIKit.UIApplication、MonoTouch.Foundation.NSDictionary)[0x0003b] in / Users / franklynweber / Documents / Programming / MyApp / MyApp.UI.Touch / OtherClasses / AppDelegate.cs :46 at(ラッパーランタイム-呼び出し)。runtime_invoke_bool__this_object_object(object、intptr、intptr、intptr)54 MyApp 0x00008732 mono_jit_runtime_invoke + 722 55 MyApp 0x0014f39e mono_runtime_invoke + 126 56 MyApp 0x001e6296 monotouch_trampoline: :payload:suspended:] + 1248 59 UIKit 0x00968fab-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 805 60 UIKit 0x0097a315-[UIApplication handleEvent:withNewEvent:] + 1022 61 UIKit 0x0097b24b-[UIApplication sendEvent:] + 85 62 UIKit 0x0096ccf8 _UIApplicationHandleEvent + 9874 63 GraphicsServices 0x02c98df9 _PurpleEventCallback + 339 64 GraphicsServices 0x02c98ad0 PurpleEventCallback + 46 65 CoreFoundation 0x01f34bf5CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION+ 53 66 CoreFoundation 0x01f34962 __CFRunLoopDoSource1 + 146 67 CoreFoundation 0x01f65bb6 __CFRunLoopRun + 2118 68 CoreFoundation 0x01f64f44 CFRunLoopRunSpecific + 276 69 CoreFoundation 0x01f64e1b CFRunLoopRunInMode + 123 70 UIKit 0x009687 )MonoTouch.UIKit.UIApplication.UIApplicationMain(int、string []、intptr、intptr)at MonoTouch.UIKit.UIApplication.Main(string []、string、string)[0x0004c] in / Developer / MonoTouch / Source / monotouch / src /UIKit/UIApplication.cs:38 at MyApp.UI.Touch.Application.Main(string [])[0x00000] in/Users/franklynweber/Documents/Programming/MyApp/MyApp.UI.Touch/OtherClasses/Main。cs:17 at(wrapper runtime-invoke).runtime_invoke_void_object(object、intptr、intptr、intptr)76 MyApp 0x00008732 mono_jit_runtime_invoke + 722 77 MyApp 0x0014f39e mono_runtime_invoke + 126 78 MyApp 0x001534c4 mono_runtime_exec 149 81 MyApp 0x001db7b5 main + 2005 82 MyApp 0x000021f5 start + 53intptr)76 MyApp 0x00008732 mono_jit_runtime_invoke + 722 77 MyApp 0x0014f39e mono_runtime_invoke + 126 78 MyApp 0x001534c4 mono_runtime_exec_main + 420 79 MyApp 0x00157ff5 mono_runtime_run_main + 725 80 MyApp 0x000651a5 mono_intptr)76 MyApp 0x00008732 mono_jit_runtime_invoke + 722 77 MyApp 0x0014f39e mono_runtime_invoke + 126 78 MyApp 0x001534c4 mono_runtime_exec_main + 420 79 MyApp 0x00157ff5 mono_runtime_run_main + 725 80 MyApp 0x000651a5 mono_

2013-03-25 08:12:00.09 MyApp [7906:12203]未処理のマネージド例外:呼び出しのターゲットによって例外がスローされました。(System.Reflection.TargetInvocationException)at System.Reflection.MonoCMethod.Invoke(System.Object obj、BindingFlags invokeAttr、System.Reflection.Binderバインダー、System.Object []パラメーター、System.Globalization.CultureInfoカルチャー)[0x0011f] in / Developer / MonoTouch / Source / mono / mcs / class / corlib / System.Reflection / MonoMethod.cs:536 at System.Reflection.MonoCMethod.Invoke(BindingFlags invokeAttr、System.Reflection.Binderバインダー、System.Object []パラメーター、システム.Globalization.CultureInfoカルチャー)[0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:545 at System.Activator.CreateInstance(System.Type type、BindingFlags bindingAttr、System .Reflection.Binderバインダー、システム。2 parameterValueLookup, IMvxViewModel& model) [0x00000] in <filename unknown>:0 at Cirrious.MvvmCross.Application.MvxViewModelLoader.LoadViewModel (Cirrious.MvvmCross.Views.MvxShowViewModelRequest request) [0x00000] in <filename unknown>:0 at Cirrious.MvvmCross.Touch.ExtensionMethods.MvxTouchViewControllerExtensionMethods.LoadViewModel[MainMenuViewModel] (IMvxTouchView1 touchView)[0x00000] in:0 at Cirrious.MvvmCross.Touch.ExtensionMethods.MvxTouchViewControllerExtensionMethods + c__AnonStorey0 1[MyApp.Core.ViewModels.MainMenuViewModel].<>m__0 () [0x00000] in <filename unknown>:0 at Cirrious.MvvmCross.ExtensionMethods.MvxViewExtensionMethods.OnViewCreate[MainMenuViewModel] (IMvxView1ビュー、System.Func1 viewModelLoader) [0x00000] in <filename unknown>:0 at Cirrious.MvvmCross.Touch.ExtensionMethods.MvxTouchViewControllerExtensionMethods.OnViewCreate[MainMenuViewModel] (IMvxTouchView1 touchView)[0x00000] in:0 at Cirrious.MvvmCross.Touch.Views.MvxTouchViewController`1 [MyApp.Core.ViewModels.MainMenuViewModel] .ViewDidLoad()[0x00000] in:0 at MyApp.UI.Touch.MainMenuViewController.ViewDidLoad ()[0x00000] in /Users/franklynweber/Documents/Programming/MyApp/MyApp.UI.Touch/Views/MainMenuViewController.cs:34 at(wrapper managed-to-native)MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend(intptr、intptr )at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible()[0x00008] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIWindow.g.cs:126 at MyApp.UI.Touch.AppDelegate.FinishedLaunching(MonoTouch.UIKit。 UIApplicationアプリ、MonoTouch.Foundation.NSDictionaryオプション)[0x0003b] in /Users/franklynweber/Documents/Programming/MyApp/MyApp.UI.Touch/OtherClasses/AppDelegate.cs:46 at(wrapper managed-to-native)MonoTouch.UIKit 。UIApplication:UIApplicationMain(int、string []、intptr、intptr)at MonoTouch.UIKit.UIApplication.Main(System.String [] args、System.StringprincipalClassName、System.StringdelegateClassName)[0x0004c] in / Developer / MonoTouch / Source /monotouch/src/UIKit/UIApplication.cs:38 at MyApp.UI.Touch.Application.Main(System.String [] args)[0x00000] in /Users/franklynweber/Documents/Programming/MyApp/MyApp.UI.Touch /OtherClasses/Main.cs:17 Stacktrace:Touch / OtherClasses / Main.cs:17スタックトレース:Touch / OtherClasses / Main.cs:17スタックトレース:

ネイティブスタックトレース:

0   MyApp                      0x0007bf6c mono_handle_native_sigsegv + 284
1   MyApp                      0x000c01ad sigabrt_signal_handler + 109
2   libsystem_c.dylib                   0x9a5da59b _sigtramp + 43
3   ???                                 0xffffffff 0x0 + 4294967295
4   libsystem_sim_c.dylib               0x0297457b abort + 140
5   MyApp                      0x001ed17b monotouch_unhandled_exception_handler + 283
6   MyApp                      0x00077dbc mono_invoke_unhandled_exception_hook + 140
7   MyApp                      0x0007bbda mono_handle_exception_internal + 4154
8   MyApp                      0x0007bd2f mono_handle_exception + 47
9   MyApp                      0x000bce22 mono_x86_throw_exception + 306
10  ???                                 0x07f30f8f 0x0 + 133369743
11  ???                                 0x0bad1a5d 0x0 + 195893853
12  ???                                 0x0bad13dd 0x0 + 195892189
13  ???                                 0x0bad1164 0x0 + 195891556
14  ???                                 0x0bad112c 0x0 + 195891500
15  ???                                 0x11b0a360 0x0 + 296788832
16  ???                                 0x11b09fca 0x0 + 296787914
17  ???                                 0x11b09de2 0x0 + 296787426
18  ???                                 0x11b09cf4 0x0 + 296787188
19  ???                                 0x11b09c65 0x0 + 296787045
20  ???                                 0x11b09b60 0x0 + 296786784
21  ???                                 0x11b09a5c 0x0 + 296786524
22  ???                                 0x11b099c4 0x0 + 296786372
23  ???                                 0x07fe2059 0x0 + 134094937
24  MyApp                      0x00008732 mono_jit_runtime_invoke + 722
25  MyApp                      0x0014f39e mono_runtime_invoke + 126
26  MyApp                      0x001e6296 monotouch_trampoline + 3686
27  UIKit                               0x00a4b817 -[UIViewController loadViewIfRequired] + 536
28  UIKit                               0x00a4b882 -[UIViewController view] + 33
29  UIKit                               0x00a4bb2a -[UIViewController contentScrollView] + 36
30  UIKit                               0x00a62ef5 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 36
31  UIKit                               0x00a62fdb -[UINavigationController _layoutViewController:] + 43
32  UIKit                               0x00a63286 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 254
33  UIKit                               0x00a63381 -[UINavigationController _startTransition:fromViewController:toViewController:] + 72
34  UIKit                               0x00a63eab -[UINavigationController _startDeferredTransitionIfNeeded:] + 386
35  UIKit                               0x00a63fc9 -[UINavigationController _startDeferredTransitionIfNeeded] + 41
36  UIKit                               0x00a64055 -[UINavigationController __viewWillLayoutSubviews] + 33
37  UIKit                               0x00b693ab -[UILayoutContainerView layoutSubviews] + 233
38  UIKit                               0x009ba92d -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 279
39  libobjc.A.dylib                     0x022086b0 -[NSObject performSelector:withObject:] + 70
40  QuartzCore                          0x01952fc0 -[CALayer layoutSublayers] + 240
41  QuartzCore                          0x0194733c _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 468
42  QuartzCore                          0x01952eaf -[CALayer layoutIfNeeded] + 166
43  UIKit                               0x00a598cd -[UIViewController window:setupWithInterfaceOrientation:] + 242
44  UIKit                               0x009a21a6 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 5346
45  UIKit                               0x009a0cbf -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
46  UIKit                               0x009a0bd9 -[UIWindow _setRotatableViewOrientation:duration:force:] + 89
47  UIKit                               0x0099fe34 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke_0 + 224
48  UIKit                               0x0099fc6e -[UIWindow _updateToInterfaceOrientation:duration:force:] + 209
49  UIKit                               0x009a0a29 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 853
50  UIKit                               0x009a3922 -[UIWindow setDelegate:] + 351
51  UIKit                               0x00a4dfec -[UIViewController _tryBecomeRootViewControllerInWindow:] + 164
52  UIKit                               0x0099abc4 -[UIWindow addRootViewControllerViewIfPossible] + 481
53  UIKit                               0x0099adbf -[UIWindow _setHidden:forced:] + 368
54  UIKit                               0x0099af55 -[UIWindow _orderFrontWithoutMakingKey] + 49
55  UIKit                               0x009a3f67 -[UIWindow makeKeyAndVisible] + 65
56  ???                                 0x11aee564 0x0 + 296674660
57  ???                                 0x11b099a8 0x0 + 296786344
58  ???                                 0x0bad24ee 0x0 + 195896558
59  ???                                 0x0bad25df 0x0 + 195896799
60  MyApp                      0x00008732 mono_jit_runtime_invoke + 722
61  MyApp                      0x0014f39e mono_runtime_invoke + 126
62  MyApp                      0x001e6296 monotouch_trampoline + 3686
63  UIKit                               0x009677b7 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 266
64  UIKit                               0x00967da7 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1248
65  UIKit                               0x00968fab -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 805
66  UIKit                               0x0097a315 -[UIApplication handleEvent:withNewEvent:] + 1022
67  UIKit                               0x0097b24b -[UIApplication sendEvent:] + 85
68  UIKit                               0x0096ccf8 _UIApplicationHandleEvent + 9874
69  GraphicsServices                    0x02c98df9 _PurpleEventCallback + 339
70  GraphicsServices                    0x02c98ad0 PurpleEventCallback + 46
71  CoreFoundation                      0x01f34bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
72  CoreFoundation                      0x01f34962 __CFRunLoopDoSource1 + 146
73  CoreFoundation                      0x01f65bb6 __CFRunLoopRun + 2118
74  CoreFoundation                      0x01f64f44 CFRunLoopRunSpecific + 276
75  CoreFoundation                      0x01f64e1b CFRunLoopRunInMode + 123
76  UIKit                               0x009687da -[UIApplication _run] + 774
77  UIKit                               0x0096a65c UIApplicationMain + 1211
78  ???                                 0x0bacf84c 0x0 + 195885132
79  ???                                 0x0bace218 0x0 + 195879448
80  ???                                 0x0bacdfb0 0x0 + 195878832
81  ???                                 0x0bace03f 0x0 + 195878975
82  MyApp                      0x00008732 mono_jit_runtime_invoke + 722
83  MyApp                      0x0014f39e mono_runtime_invoke + 126
84  MyApp                      0x001534c4 mono_runtime_exec_main + 420
85  MyApp                      0x00157ff5 mono_runtime_run_main + 725
86  MyApp                      0x000651a5 mono_jit_exec + 149
87  MyApp                      0x001db7b5 main + 2005
88  MyApp                      0x000021f5 start + 53

================================================== ===============ネイティブコードの実行中にSIGABRTを取得しました。これは通常、モノラルランタイムまたはネイティブライブラリの1つで致命的なエラーが発生したことを示します

アプリケーションで使用されます。

助けてくれてありがとう。

4

1 に答える 1

0

内部例外がなければ、何が問題なのかを知るのは困難です - 申し訳ありません。

ジオウォッチャーの初期化に問題があると思います-次のいずれかの理由で:

  • プラグインが登録されていません
  • 電話をかける前に、この回線に電話してくださいCirrious.MvvmCross.Plugins.Location.PluginLoader.Instance.EnsureLoaded()
  • または、「アプリ固有の理由」のためです。

チュートリアル アプリは、次の場所のプラグインを使用します: https://github.com/slodge/MvvmCross/tree/vnext/Sample%20-%20Tutorial/Tutorial/Tutorial.UI.Touch

チュートリアルは役に立ちましたか? もしそうなら、おそらく2つを比較する必要があります。

クラッシュが続く場合は、おそらく: - 可能であれば内部例外を投稿しますか? - または、問題のデモを行う小さなレポを投稿してください - この 2 行のスニペットで確認できるよりも多くのコードが必要になることは確かです。


ドキュメントが不足していて申し訳ありません。私は現在、リリースされた新しい v3 用の適切なドキュメントとチュートリアルを作成するために多大な努力を払っていますが、これはすべて自己資金で行っています!

于 2013-03-22T13:02:35.080 に答える