Forum Libraries, Components, and Plugins

Xamarin Profiler - Android App Crashes

When I start a profiling session via Visual Studio for Mac and attempt to use the Time Profiler, the app will run for ~10 seconds and then crash. The only thing I see is the SplashScreen.

03-16 13:45:25.056 F/DEBUG   (27984): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-16 13:45:25.056 F/DEBUG   (27984): Build fingerprint: 'motorola/ali/ali:9/PPSS29.118-15-11-9/34527:user/release-keys'
03-16 13:45:25.056 F/DEBUG   (27984): Revision: 'PVT2'
03-16 13:45:25.056 F/DEBUG   (27984): ABI: 'arm'
03-16 13:45:25.056 F/DEBUG   (27984): pid: 27848, tid: 27961, name: azonaws.com/...  >>> com.abc.standalone <<<
03-16 13:45:25.056 F/DEBUG   (27984): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-16 13:45:25.056 F/DEBUG   (27984): Abort message: '* Assertion at /Users/builder/jenkins/workspace/archive-mono/2019-08/android/release/mono/profiler/log.c:560, condition `PROF_TLS_SET (thread)' not met
03-16 13:45:25.056 F/DEBUG   (27984): '
03-16 13:45:25.056 F/DEBUG   (27984):     r0  00000000  r1  00006d39  r2  00000006  r3  00000008
03-16 13:45:25.056 F/DEBUG   (27984):     r4  00006cc8  r5  00006d39  r6  7fffe234  r7  0000010c
03-16 13:45:25.056 F/DEBUG   (27984):     r8  00000001  r9  803f4220  r10 7fffe760  r11 7fffe258
03-16 13:45:25.056 F/DEBUG   (27984):     ip  7fffe1d0  sp  7fffe220  lr  a792ce79  pc  a7924cb6
03-16 13:45:25.058 F/DEBUG   (27984): 
03-16 13:45:25.058 F/DEBUG   (27984): backtrace:
03-16 13:45:25.058 F/DEBUG   (27984):     #00 pc 0001ccb6  /system/lib/libc.so (abort+58)
03-16 13:45:25.058 F/DEBUG   (27984):     #01 pc 0001fc0c  /data/app/com.abc.standalone-6XBmX96HdhuJyqxMIhiWjw==/lib/arm/libmono-profiler-log.so (monoeg_log_default_handler+276)

Here are my Visual Studio/Tool Versions:

=== Visual Studio Enterprise 2019 for Mac ===

Version 8.4.8 (build 2)
Installation UUID: a066ae08-e373-4e2c-8db3-f2afd951fdc3
    GTK+ 2.24.23 (Raleigh theme)
    Xamarin.Mac 5.16.1.25 (issue-7441-d16-3-vsmac / 881172e73)

    Package version: 606000166

=== Mono Framework MDK ===

Runtime:
    Mono 6.6.0.166 (2019-08/d9001b5ae70) (64-bit)
    Package version: 606000166

=== Roslyn (Language Service) ===

3.4.0-beta4-19562-05+ff930dec4565e2bc424ad3bf3e22ecb20542c87d

=== NuGet ===

Version: 5.3.0.6192

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/3.1.101/Sdks
SDK Versions:
    3.1.101
    3.1.100
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
    3.1.1
    3.1.0
    2.1.15

=== Xamarin.Profiler ===

Version: 1.6.13.11
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 10.1.3.7 (Visual Studio Enterprise)
Commit: xamarin-android/d16-4/d66aed0
Android SDK: /Users/joe.chrisman/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
        7.0 (API level 24)
        7.1 (API level 25)
        8.0 (API level 26)
        8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.6
SDK Build Tools Version: 29.0.2

Build Information: 
Mono: fd9f379
Java.Interop: xamarin/java.interop/[email protected]
ProGuard: xamarin/proguard/[email protected]
SQLite: xamarin/sqlite/[email protected]
Xamarin.Android Tools: xamarin/xamarin-android-tools/[email protected]

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/joe.chrisman/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.4.0.10
Hash: 2c49a7d
Branch: remotes/origin/d16-4
Build date: 2020-02-20 19:25:52 UTC

=== Android Device Manager ===

Version: 16.4.0.32
Hash: 7a5cb8b
Branch: remotes/origin/d16-4
Build date: 2020-02-20 19:26:14 UTC

=== Apple Developer Tools ===

Xcode 11.3.1 (15715)
Build 11C504

=== Xamarin.Mac ===

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

=== Xamarin.iOS ===

Version: 13.10.0.21 (Visual Studio Enterprise)
Hash: 02c4b3bdc
Branch: xcode11.3
Build date: 2020-02-18 14:13:32-0500

=== Xamarin Designer ===

Version: 16.4.0.479
Hash: 074544417
Branch: remotes/origin/d16-4
Build date: 2020-01-22 22:50:22 UTC

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 804080002
Git revision: 4f35aa7e44fb398379e512d0bfd6f8df8d34b5ac
Build date: 2020-02-27 16:16:52+00
Build branch: release-8.4
Xamarin extensions: 4f35aa7e44fb398379e512d0bfd6f8df8d34b5ac

=== Operating System ===

Mac OS X 10.15.3
Darwin 19.3.0 Darwin Kernel Version 19.3.0
    Thu Jan  9 20:58:23 PST 2020
    root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    Xamarin Profiler - Android App Crashes

    Have you disabled the Use Shared Runtime option in Android Options? This ensures that the Android application package (APK) is built without a dependency on the shared development-time Mono runtime.

    Check the tutorial:
    https://docs.microsoft.com/en-us/xamarin/android/deploy-test/profiling#launching-a-xamarin-android-app-in-android-profiler

  • jchrismanjchrisman Member ✭✭

    @Jarvan said:

    Xamarin Profiler - Android App Crashes

    Have you disabled the Use Shared Runtime option in Android Options? This ensures that the Android application package (APK) is built without a dependency on the shared development-time Mono runtime.

    Yes, however that tutorial is for the Android Profiler. I am attempting to use the Xamarin Profiler.

  • jchrismanjchrisman Member ✭✭

    I am also seeing this at regular intervals in the logs:

    type=1400 audit(0.0:908): avc: denied { read } for uid=10270 comm=50726F66696C65722048656C706572 name="loadavg" dev="proc" ino=4026532320 scontext=u:r:untrusted_app:s0:c14,c257,c512,c768 tcontext=u:object_r:proc_loadavg:s0 tclass=file permissive=0
    
Sign In or Register to comment.