Profiler doesn't start, no error message

When I try to profile on the emulator via Visual Studio -> Analyze -> Xamarin Profiler, it logs some messages, ending with

Under Build:
Deploy successfully on 5" KitKat (4.4) XXHDPI Phone

Under Xamarin:
Starting profilling session. Arguments: --type=android --target=com.microsoft.health|microsoft.health.app.xamarinandroid.activities.SplashActivity --device=169.254.109.177:5555 --options=name:" 5" KitKat (4.4) XXHDPI Phone"

A window flashes up for a fraction of a second and then closes, and nothing else happens. I've tried restarting my computer but it does the same thing. I also tried deploying to a physical phone but I get a different error message when I do that. Also nothing happens when I try to launch the Xamarin Profiler standalone app.

Anyone else seen this? What's going on? Using Visual Studio 14.0.25421.03 Update 3 with Xamarin.Android 6.1.2.21 .

Tagged:

Posts

  • RodrigoMoyaRodrigoMoya ESXamarin Team Xamurai

    Does the profiler start standalone? Also, what does the profiler log says (it's under %localappdata%\Xamarin\Log)?

  • It does not start standalone. The log says this:

    INFO[2016-08-17 08:50:27Z]: ##########################################
    INFO[2016-08-17 08:50:27Z]: # Xamarin Profiler version - 0.33.2.2
    INFO[2016-08-17 08:50:27Z]: # * Arch x86_64
    INFO[2016-08-17 08:50:27Z]: ##########################################

  • MarcosPerezMarcosPerez USMember

    You try to run VS2015 run as administrator, some time VS2015 have problem to access some files and folders.

  • BradChase.2654BradChase.2654 USMember ✭✭✭
    edited September 2016

    I get the same problem, here is the output:

    DEBUG[2016-09-09 15:49:21Z]: Finished
    INFO[2016-09-09 15:49:21Z]: CurrentRun.Finished for com.Company.App
    ERROR[2016-09-09 15:49:21Z]: error occured on run com.Company.App Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: chunkLength
    ERROR[2016-09-09 15:49:21Z]: Error occured on run com.Company.App: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: chunkLength
    DEBUG[2016-09-09 15:49:21Z]: Stopping profiler log reader
    INFO[2016-09-09 15:49:52Z]: Creating android run for com.Company.App|md556783ced3debcf02de6e19e61a1661d4.MainActivity target on device Hi120Q64G45160403778
    DEBUG[2016-09-09 15:49:52Z]: Progress report initialized successfully
    INFO[2016-09-09 15:49:52Z]: StartRecording for com.Company.App
    DEBUG[2016-09-09 15:49:53Z]: Opening C:\Users\bwchase\AppData\Local\Temp\pd0tzhae.mlpd
    DEBUG[2016-09-09 15:49:53Z]: reading log header
    INFO[2016-09-09 15:49:53Z]: read header with format version 11
    DEBUG[2016-09-09 15:49:53Z]: reading file C:\Users\bwchase\AppData\Local\Temp\pd0tzhae.mlpd
    DEBUG[2016-09-09 15:49:53Z]: Forwarding port 60468 to Android device CHUWI CW-Hi12
    DEBUG[2016-09-09 15:49:55Z]: thread at 4151926400 loaded
    ERROR[2016-09-09 15:49:55Z]: error while reading buffer
    System.ArgumentNullException: Value cannot be null.
    Parameter name: key
    at System.Collections.Concurrent.ConcurrentDictionary`2.TryGetValue(TKey key, TValue& value)
    at XamarinProfiler.Core.Metadata.Store.SamplesStore.AddSample(SampleType type, UInt64 timestamp, CallTreeNode node)
    at XamarinProfiler.Core.Metadata.Store.ProfileListener.ProcessSampleHit(BufferDescriptor buffer, UInt64 timestamp, SampleType sampleType, Int64 threadId, Int64[] instructionPointers, Int64[] managedBacktrace)
    at XamarinProfiler.Core.Reader.EventReader.ReadSampleHitEvent(LogReader reader, BufferDescriptor buffer, Byte extendedInfo, IEventProcessor processor)
    at XamarinProfiler.Core.Reader.LogReader.d__30.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at XamarinProfiler.Core.Metadata.Store.ProfileListener.d__33.MoveNext()

    Note that we run just fine under normal debug.

    EDIT: Also note that we run ALWAYS in administrator mode for VS.

Sign In or Register to comment.