Xamarin Profiler 使应用程序从一开始就崩溃
Xamarin Profiler crashes the application from start
我有一个使用 MVVM Cross 开发的 Xamarin 应用程序,我正在尝试分析它。
但是,第一个屏幕一出现,应用程序就会崩溃。
接近崩溃的 Xamarin Profiler 控制台:
03-08 13:38:56.797 I/SurfaceFlinger( 3311): Display 0 HWC layers:
03-08 13:38:56.797 I/SurfaceFlinger( 3311): type | handle | flag | format | source crop (l,t,r,b) | frame | name
03-08 13:38:56.797 I/SurfaceFlinger( 3311): ------------+--------------+------+-----------+----------------------------+---------------------+------
03-08 13:38:56.797 I/SurfaceFlinger( 3311): Device | 0x7456253da0 | 0000 | RGBA_8888 | 0.0 0.0 1080.0 2220.0 | 0 0 1080 2220 | com.myapp.mobile/myapp.Mob[...].Views.InitializationScreen[29425]#0
03-08 13:38:56.797 I/SurfaceFlinger( 3311): Device | 0x7455e49000 | 0000 | RGBA_8888 | 0.0 0.0 67.0 429.0 | 1013 592 1080 1021 | com.samsung.android.app.cocktailbars[...]rservice.CocktailBarService[14111]#0
03-08 13:38:56.797 I/SurfaceFlinger( 3311):
03-08 13:38:56.798 D/Layer ( 3311): [9c16bd7 StatusBar#0]::reparent oldParent:[Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0], newParent:[WindowToken{4248f56 android.os.BinderProxy@79e2571}#0]
03-08 13:38:56.798 I/SurfaceFlinger( 3311): id=8714 Removed Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0 (1/86)
03-08 13:38:56.798 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.798 I/PanelView( 8301): n.B.P.E.C:false, false, false, false, false, false
03-08 13:38:56.806 I/Layer ( 3311): id=8714 onRemoved Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0
03-08 13:38:56.806 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.806 I/chatty ( 8301): uid=10002(com.samsung.android.app.aodservice) com.android.systemui identical 1 line
03-08 13:38:56.807 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.813 D/ViewRootImpl@6805198[InitializationScreen](29425): MSG_RESIZED: frame=Rect(0, 0 - 1080, 2220) ci=Rect(0, 63 - 0, 126) vi=Rect(0, 0 - 0, 0) or=1
03-08 13:38:56.847 E//system/bin/tombstoned( 3583): Tombstone written to: /data/tombstones/tombstone_04
03-08 13:38:56.850 E/audit ( 3433): type=1701 audit(1552045136.845:6051): auid=4294967295 uid=10403 gid=10403 ses=4294967295 subj=u:r:untrusted_app_25:s0:c512,c768 pid=29425 comm=54687265616420506F6F6C20576F72 exe="/system/bin/app_process64" sig=6
03-08 13:38:56.861 I/BootReceiver( 3871): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
03-08 13:38:56.866 W/ActivityManager( 3871): crash : com.myapp.mobile,0
03-08 13:38:56.876 W/ActivityManager( 3871): Force finishing activity com.myapp.mobile/myapp.Mobile.Droid.Views.InitializationScreen
Logcat 输出:
2019-03-08 14:33:24.824 30618-30618/com.myapp.mobile D/Mono: Assembly Ref addref Plugin.CurrentActivity[0x7627f95300] -> Mono.Android[0x7627fb1700]: 26
2019-03-08 14:33:24.827 30618-30618/com.myapp.mobile A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 30618 (cmyapp.mobile), pid 30618 (cmyapp.mobile)
我已经关注这个很长时间了,但我不明白为什么 Xamarin Profiler 会导致我的应用程序崩溃。
该应用程序在 Debug/Release 模式下表现良好。
尽管他们在 Xamarin Profiler documentation you should disable the Use Shared Runtime option in Android Options as they do suggest this in their Profiling documentation 中错过了这一步。
这对我有用。
我有一个使用 MVVM Cross 开发的 Xamarin 应用程序,我正在尝试分析它。
但是,第一个屏幕一出现,应用程序就会崩溃。
接近崩溃的 Xamarin Profiler 控制台:
03-08 13:38:56.797 I/SurfaceFlinger( 3311): Display 0 HWC layers:
03-08 13:38:56.797 I/SurfaceFlinger( 3311): type | handle | flag | format | source crop (l,t,r,b) | frame | name
03-08 13:38:56.797 I/SurfaceFlinger( 3311): ------------+--------------+------+-----------+----------------------------+---------------------+------
03-08 13:38:56.797 I/SurfaceFlinger( 3311): Device | 0x7456253da0 | 0000 | RGBA_8888 | 0.0 0.0 1080.0 2220.0 | 0 0 1080 2220 | com.myapp.mobile/myapp.Mob[...].Views.InitializationScreen[29425]#0
03-08 13:38:56.797 I/SurfaceFlinger( 3311): Device | 0x7455e49000 | 0000 | RGBA_8888 | 0.0 0.0 67.0 429.0 | 1013 592 1080 1021 | com.samsung.android.app.cocktailbars[...]rservice.CocktailBarService[14111]#0
03-08 13:38:56.797 I/SurfaceFlinger( 3311):
03-08 13:38:56.798 D/Layer ( 3311): [9c16bd7 StatusBar#0]::reparent oldParent:[Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0], newParent:[WindowToken{4248f56 android.os.BinderProxy@79e2571}#0]
03-08 13:38:56.798 I/SurfaceFlinger( 3311): id=8714 Removed Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0 (1/86)
03-08 13:38:56.798 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.798 I/PanelView( 8301): n.B.P.E.C:false, false, false, false, false, false
03-08 13:38:56.806 I/Layer ( 3311): id=8714 onRemoved Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0
03-08 13:38:56.806 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.806 I/chatty ( 8301): uid=10002(com.samsung.android.app.aodservice) com.android.systemui identical 1 line
03-08 13:38:56.807 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.813 D/ViewRootImpl@6805198[InitializationScreen](29425): MSG_RESIZED: frame=Rect(0, 0 - 1080, 2220) ci=Rect(0, 63 - 0, 126) vi=Rect(0, 0 - 0, 0) or=1
03-08 13:38:56.847 E//system/bin/tombstoned( 3583): Tombstone written to: /data/tombstones/tombstone_04
03-08 13:38:56.850 E/audit ( 3433): type=1701 audit(1552045136.845:6051): auid=4294967295 uid=10403 gid=10403 ses=4294967295 subj=u:r:untrusted_app_25:s0:c512,c768 pid=29425 comm=54687265616420506F6F6C20576F72 exe="/system/bin/app_process64" sig=6
03-08 13:38:56.861 I/BootReceiver( 3871): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
03-08 13:38:56.866 W/ActivityManager( 3871): crash : com.myapp.mobile,0
03-08 13:38:56.876 W/ActivityManager( 3871): Force finishing activity com.myapp.mobile/myapp.Mobile.Droid.Views.InitializationScreen
Logcat 输出:
2019-03-08 14:33:24.824 30618-30618/com.myapp.mobile D/Mono: Assembly Ref addref Plugin.CurrentActivity[0x7627f95300] -> Mono.Android[0x7627fb1700]: 26
2019-03-08 14:33:24.827 30618-30618/com.myapp.mobile A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 30618 (cmyapp.mobile), pid 30618 (cmyapp.mobile)
我已经关注这个很长时间了,但我不明白为什么 Xamarin Profiler 会导致我的应用程序崩溃。 该应用程序在 Debug/Release 模式下表现良好。
尽管他们在 Xamarin Profiler documentation you should disable the Use Shared Runtime option in Android Options as they do suggest this in their Profiling documentation 中错过了这一步。
这对我有用。