question

PerpetuaTechnologiesLLC-5713 avatar image
0 Votes"
PerpetuaTechnologiesLLC-5713 asked RobCaplan edited

Xamarin Profiler fails to start profiling

Our Xamarin app runs on Android, iOS and UWP. On a Moto Z phone, I'm attempting to profile allocations the Android which runs fine on it's own. As soon as the profiler starts it fails with errors that I don't see running in the Visual Studio debugger. The first error it shows is :
E/adbd ( 3034): failed to connect to socket 'tcp:9600': Connection refused
This is shown several times, but I'm not sure how relevant it is. Then is stops with a signal:
F/libc ( 6808): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x60 in tid 6808 (etua.ERPXamarin), pid 6808 (etua.ERPXamarin)
08-03 09:04:17.949 I/crash_dump64( 6838): obtaining output fd from tombstoned, type: kDebuggerdTombstone
08-03 09:04:17.949 I//system/bin/tombstoned( 1438): received crash request for pid 6808
08-03 09:04:17.950 I/crash_dump64( 6838): performing dump of process 6808 (target tid = 6808)
08-03 09:04:17.956 F/DEBUG ( 6838):
08-03 09:04:17.956 F/DEBUG ( 6838): Build fingerprint: 'motorola/messi_verizon/messi:9/PDX29.84-51-11-7/fb4f7:user/release-keys'
08-03 09:04:17.956 F/DEBUG ( 6838): Revision: 'pvt'
08-03 09:04:17.956 F/DEBUG ( 6838): ABI: 'arm64'
08-03 09:04:17.956 F/DEBUG ( 6838): pid: 6808, tid: 6808, name: etua.ERPXamarin >>> com.perpetua.ERPXamarin <<<
08-03 09:04:17.956 F/DEBUG ( 6838): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x60
08-03 09:04:17.956 F/DEBUG ( 6838): Cause: null pointer dereference
08-03 09:04:17.956 F/DEBUG ( 6838): x0 00000077de2faa08 x1 0000007fcc405780 x2 0000000000000000 x3 00000077e5d47cb0
08-03 09:04:17.956 F/DEBUG ( 6838): x4 0000007fcc405698 x5 0000007fcc404f90 x6 000000786beca000 x7 0000000001382e6a
08-03 09:04:17.956 F/DEBUG ( 6838): x8 0000000000000000 x9 00000000ffffffff x10 0000000000000001 x11 0000000000000001
08-03 09:04:17.956 F/DEBUG ( 6838): x12 0000000000000000 x13 00000077dd197adc x14 0036551b354d576c x15 0000000000000001
08-03 09:04:17.956 F/DEBUG ( 6838): x16 00000077cc98f448 x17 0000007866e061f0 x18 0000000000000008 x19 0000007fcc405cd0
08-03 09:04:17.956 F/DEBUG ( 6838): x20 00000077cb000ed8 x21 00000077cb0006d0 x22 00000077cb0005a8 x23 00000077cb0005a8
08-03 09:04:17.956 F/DEBUG ( 6838): x24 00000077cb001628 x25 00000077cb0005a8 x26 00000077e6593410 x27 0000000000000000
08-03 09:04:17.956 F/DEBUG ( 6838): x28 000000786bedc5e0 x29 0000007fcc4057a0
08-03 09:04:17.956 F/DEBUG ( 6838): sp 0000007fcc4057a0 lr 00000077dd19c064 pc 00000077cc452610
08-03 09:04:17.958 F/DEBUG ( 6838):
08-03 09:04:17.958 F/DEBUG ( 6838): backtrace:
08-03 09:04:17.958 F/DEBUG ( 6838): #00 pc 0000000000009610 /data/app/com.perpetua.ERPXamarin-0nqYv19ba2wF43wSZAXE4Q==/lib/arm64/libxa-internal-api.so (_monodroid_gref_get+12)
08-03 09:04:17.958 F/DEBUG ( 6838): #01 pc 000000000000c060 <anonymous:00000077dd190000>
08-03 09:04:18.088 E//system/bin/tombstoned( 1438): Tombstone written to: /data/tombstones/tombstone_06
08-03 09:04:18.090 W/ActivityManager( 1889): Force finishing activity com.perpetua.ERPXamarin/crc642ee174e4c755c01e.SplashActivity



dotnet-xamarin
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please test your application in the android emulator, if it works. if it not works in the emulator, please share your code about SplashActivity and SplashActivity's layout.

0 Votes 0 ·

Thanks for the suggestion!

Unfortunately, I'm unable to run emulator instances on this machine (apparently some GPU errors), but I am able to start the profiler on my app on a Galaxy J3 Orbit, though it runs too slow to do any comprehensive profiling.

I am a bit more certain that it's an issue with this particular phone model, or a setting of some kind on the phone or the profiler, but I'm unaware of what that might be. My hope was to use this phone because it's the same model as one of our client's who seem to be seeing uncommon issues. I figured if this was a simple fix I'd better attempt it.

I have a more powerful phone (Galaxy S8) I'm going to factory reset and try again. I'll add more notes if they pertain to this issue.

0 Votes 0 ·
LeonLu-MSFT avatar image LeonLu-MSFT PerpetuaTechnologiesLLC-5713 ·

Do you have web service that connect to server or use sockets? Have you added the android.permission.INTERNET to your manifest? And please check do you have some proxy settings via the settings terminal.

0 Votes 0 ·
Show more comments

1 Answer

PerpetuaTechnologiesLLC-5713 avatar image
0 Votes"
PerpetuaTechnologiesLLC-5713 answered PerpetuaTechnologiesLLC-5713 published

Here are the logs from the Xamarin Profiler:
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.1777] ##########################################
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.1807] # Xamarin Profiler version - 1.6.10.15
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.1812] # * Arch x86_64
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.1812] ##########################################
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.4572] initializing android platform
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.4577] initializing ios platform
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.4577] initializing mlpd platform
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.7337] processing command line = --options=name:Motorola moto z3,gc:sgen,maxframes:32 --type=android --device=ZY2258Q2Q5 --target=com.perpetua.ERPXamarin|crc642ee174e4c755c01e.SplashActivity --heapshot-mode=ondemand --heapshot-frequency=1000 --sampling-mode=cpu --sample-cycle-freq=10
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:27:49.7732] processing command line = C:\Program Files (x86)\Xamarin\Profiler\XamarinProfiler.exe --type=android --target=com.perpetua.ERPXamarin|crc642ee174e4c755c01e.SplashActivity --device=ZY2258Q2Q5 --options=name:Motorola moto z3
XamarinProfiler.Core.ProfilerService Information: 0 : [2021-08-03 10:29:07.2846] processing command line = --options=name:Motorola moto z3,gc:sgen,maxframes:32 --type=android --device=ZY2258Q2Q5 --target=com.perpetua.ERPXamarin|crc642ee174e4c755c01e.SplashActivity --heapshot-mode=ondemand --heapshot-frequency=1000 --sampling-mode=cpu --sample-cycle-freq=10
XamarinProfiler.Windows.Core.WindowsRunFactory Information: 0 : [2021-08-03 10:29:07.3266] Creating android run for com.perpetua.ERPXamarin|crc642ee174e4c755c01e.SplashActivity target on device ZY2258Q2Q5
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:29:07.3526] Initializing profiling...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:29:07.4131] Waiting for device ZY2258Q2Q5 to connect
XamarinProfiler.Windows.MainWindow Information: 0 : [2021-08-03 10:29:07.4161] StartRecording for com.perpetua.ERPXamarin
XamarinProfiler.Core.Platforms.Android.ProfileAndroidRun Information: 0 : [2021-08-03 10:29:07.5226] checking runtime version on device Motorola moto z3
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:29:07.6691] Starting application com.perpetua.ERPXamarin.crc642ee174e4c755c01e.SplashActivity
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:29:08.7515] Starting profiler on Android device Motorola moto z3 with nodefaults,heapshot=ondemand,maxframes=32,gc,gcalloc,gcroot,gcmove,counter,
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:29:09.0490] Opening C:\Users\akamr\AppData\Local\Temp\ld2vn2se.mlpd
XamarinProfiler.Core.Platforms.Mono.ImmediateMetadataLogEventVisitor Information: 0 : [2021-08-03 10:29:09.0745] reading MLPD with version 17
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:29:09.0750] Reading data...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:32:57.7750] Stopping application com.perpetua.ERPXamarin.crc642ee174e4c755c01e.SplashActivity
XamarinProfiler.Windows.MainWindow Information: 0 : [2021-08-03 10:32:57.7770] StopRecording for com.perpetua.ERPXamarin
XamarinProfiler.Windows.MainWindow Information: 0 : [2021-08-03 10:32:57.7775] StopRecording for com.perpetua.ERPXamarin
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:32:57.8790] Application com.perpetua.ERPXamarin.crc642ee174e4c755c01e.SplashActivity stopped
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:32:57.8810] Processing data...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:32:57.8820] Stopping session. Please wait...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2021-08-03 10:32:57.8965] Sorry, something went wrong trying to run com.perpetua.ERPXamarin: Object reference not set to an instance of an object.
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2021-08-03 10:32:57.8965] Sorry, something went wrong trying to run com.perpetua.ERPXamarin: Object reference not set to an instance of an object.
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2021-08-03 10:32:57.8970] Sorry, something went wrong trying to run com.perpetua.ERPXamarin: Object reference not set to an instance of an object.
XamarinProfiler.Core.ProfilerService Critical: 0 : [2021-08-03 10:32:57.8975] Domain UnhandledException: System.NullReferenceException: Object reference not set to an instance of an object.
at XamarinProfiler.Windows.MainWindow.<<SetupNewRun>b_26_7>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
XamarinProfiler.Core.ProfilerService Critical: 0 : [2021-08-03 10:32:57.8975] Domain UnhandledException: System.NullReferenceException: Object reference not set to an instance of an object.
at XamarinProfiler.Windows.MainWindow.<<SetupNewRun>b
_26_7>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.