Bug 31924 - Profiler launches app in the wrong simulator OR times out and doesn't launch at all
Summary: Profiler launches app in the wrong simulator OR times out and doesn't launch ...
Status: VERIFIED FIXED
Alias: None
Product: Profiler
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Rodrigo Moya
URL:
Depends on:
Blocks:
 
Reported: 2015-07-14 10:23 UTC by Randall Schmidt
Modified: 2015-10-19 09:55 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Profiler log (6.35 KB, text/plain)
2015-07-14 10:23 UTC, Randall Schmidt
Details
Profiler log 10/16/2015 (7.23 KB, text/plain)
2015-10-16 14:09 UTC, Randall Schmidt
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Randall Schmidt 2015-07-14 10:23:35 UTC
My app is iPad-only. I have the iPad 2 iOS 8.4 simulator set as the deploy target in Xamarin Studio. But when I go to Run -> Start Profiling, it launches the app in the iPhone 4s simulator.

That was the behavior a few days ago. When I tried to reproduce it today though, I get a timeout error while it's trying to launch the simulator. To the best of my knowledge nothing has changed in the meantime.

I see in the log it says "Shutdown iPhone 4s successfully." and then "Launching application".

I'm using the build Rodrigo linked to in a comment on this bug: https://bugzilla.xamarin.com/show_bug.cgi?id=30053

Xamarin Studio
Version 5.9.4 (build 5)
Installation UUID: 76cd4550-0ba3-46c2-9700-950d32dbe636
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

Apple Developer Tools
Xcode 6.4 (7720)
Build 6E35b

Xamarin.Mac
Not Installed

Xamarin.Android
Not Installed

Xamarin Android Player
Not Installed

Xamarin.iOS
Version: 8.10.3.2 (Business Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400

Build Information
Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

Operating System
Mac OS X 10.10.3
Darwin *machine_name* 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 Randall Schmidt 2015-07-14 10:23:57 UTC
Created attachment 12016 [details]
Profiler log
Comment 3 Rodrigo Moya 2015-08-11 10:05:36 UTC
Do you still get the timeouts? If not, this bug should be fixed (see bug #32459), and fix will be available in the next release (0.20).
Comment 4 Rodrigo Moya 2015-08-28 12:12:40 UTC
The "starts in wrong simulator" problem is already fixed, in both Profiler 0.20 and XS 5.10 (available in the alpha channel), so closing this one
Comment 5 Udham Singh 2015-09-01 10:22:52 UTC
I have checked this issue with profiler-mac-0.21-0 + XS 5.10.0.609 and observed that now this issue has been fixed. Hence I am closing this issue.

@Randall, Could you please check this issue at your end and let us know if you are still getting this issue.

Environment Info : https://gist.github.com/Udham1/91f30d38371ed66eda87

Thanks!
Comment 6 Randall Schmidt 2015-09-01 11:03:22 UTC
Hi, sorry for being slow, I am not doing any Mac dev these days.

I am in the alpha channel so I can get XS 5.10 but profiler version .20 shows an error: Unsupported MLPD format version (should be <= 10 but is 11). Please update to the latest Xamarin Profiler.

I will wait for the next profiler version and try with that, unless there's something else I should try.
Comment 7 Randall Schmidt 2015-10-16 12:47:43 UTC
With profiler .23 and XS 5.10 my app no longer starts in the wrong simulator, but it does crash on launch now. The profiler log shows an exception:

INFO[2015-10-16 11:44:35Z]: ##########################################
INFO[2015-10-16 11:44:35Z]: # Xamarin Profiler version -  0.23-0
INFO[2015-10-16 11:44:35Z]: #  * Arch x86_64
INFO[2015-10-16 11:44:35Z]: ##########################################
DEBUG[2015-10-16 11:44:35Z]: processing command line = 
DEBUG[2015-10-16 11:44:35Z]: 	/Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
DEBUG[2015-10-16 11:44:35Z]: 	--type=ios
DEBUG[2015-10-16 11:44:35Z]: 	--target=/p4/perforce/rschmidt_blushweaver/Measurements/Applications/softFrontPanel/app/trunk/15.1/objects/nisfpgui/iphoneos/i386/xcode6.1-clang6.0/debug/nisfpguiMonoTouch.app
DEBUG[2015-10-16 11:44:35Z]: 	--device=ipad|8.4
DEBUG[2015-10-16 11:44:35Z]: 	--options=gc:sgen,name:IPad2
DEBUG[2015-10-16 11:44:37Z]: Creating ios run for /p4/perforce/rschmidt_blushweaver/Measurements/Applications/softFrontPanel/app/trunk/15.1/objects/nisfpgui/iphoneos/i386/xcode6.1-clang6.0/debug/nisfpguiMonoTouch.app target on device ipad|8.4
DEBUG[2015-10-16 11:44:37Z]: performing service XamarinProfiler.Instruments.AllocationsSummaryService update while another one is in progress
DEBUG[2015-10-16 11:44:37Z]: performing service XamarinProfiler.Instruments.CallTreeService update while another one is in progress
DEBUG[2015-10-16 11:44:37Z]: performing service XamarinProfiler.Instruments.AllocationsListService update while another one is in progress
DEBUG[2015-10-16 11:44:37Z]: performing service XamarinProfiler.Instruments.HeapShotService update while another one is in progress
DEBUG[2015-10-16 11:44:37Z]: performing service XamarinProfiler.Instruments.CallTreeService update while another one is in progress
DEBUG[2015-10-16 11:44:37Z]: performing service XamarinProfiler.Instruments.SamplesListService update while another one is in progress
DEBUG[2015-10-16 11:44:37Z]: Creating connection with iOS device ipad
DEBUG[2015-10-16 11:44:37Z]: Starting profiler on iOS device ipad with log:heapshot=ondemand,sample,alloc,output=/var/folders/9d/7whzx30n1vg89cgd3jvsx0fc0000gp/T/aeu7oyha.mlpd
DEBUG[2015-10-16 11:44:37Z]: Starting /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch -v -v -v -v -sdkroot "/Applications/Xcode.app/Contents/Developer" -launchsim "/p4/perforce/rschmidt_blushweaver/Measurements/Applications/softFrontPanel/app/trunk/15.1/objects/nisfpgui/iphoneos/i386/xcode6.1-clang6.0/debug/nisfpguiMonoTouch.app" -sdk 8.4 -argument=-monodevelop-port -argument=52020 -device "ipad"
DEBUG[2015-10-16 11:44:39Z]: iOS app output: Using the specification 'ipad' and SDK '8.4' the following was selected:
DEBUG[2015-10-16 11:44:39Z]: iOS app output:    Runtime: com.apple.CoreSimulator.SimRuntime.iOS-8-4
DEBUG[2015-10-16 11:44:39Z]: iOS app output:    DeviceType: com.apple.CoreSimulator.SimDeviceType.iPad-2
DEBUG[2015-10-16 11:44:39Z]: iOS app output: Starting iPad 2
DEBUG[2015-10-16 11:44:39Z]: iOS app output: No need to boot (already booted): iPad 2
DEBUG[2015-10-16 11:44:39Z]: iOS app output: Installing /p4/perforce/rschmidt_blushweaver/Measurements/Applications/softFrontPanel/app/trunk/15.1/objects/nisfpgui/iphoneos/i386/xcode6.1-clang6.0/debug/nisfpguiMonoTouch.app with Bundle Identifier com.ni.apps.measurements.ios.virtualbench...
DEBUG[2015-10-16 11:44:42Z]: iOS app output: Installed 'com.ni.apps.measurements.ios.virtualbench' from /p4/perforce/rschmidt_blushweaver/Measurements/Applications/softFrontPanel/app/trunk/15.1/objects/nisfpgui/iphoneos/i386/xcode6.1-clang6.0/debug/nisfpguiMonoTouch.app
DEBUG[2015-10-16 11:44:42Z]: iOS app output: Launching application
DEBUG[2015-10-16 11:44:43Z]: iOS app output: Application launched. PID = 1645
DEBUG[2015-10-16 11:44:43Z]: iOS app output: Press enter to terminate the application
DEBUG[2015-10-16 11:44:45Z]: Waiting for device ipad to connect
DEBUG[2015-10-16 11:44:45Z]: opening /var/folders/9d/7whzx30n1vg89cgd3jvsx0fc0000gp/T/aeu7oyha.mlpd
DEBUG[2015-10-16 11:44:45Z]: reading log header
INFO[2015-10-16 11:44:45Z]: read header with format version 8
DEBUG[2015-10-16 11:44:45Z]: reading file /var/folders/9d/7whzx30n1vg89cgd3jvsx0fc0000gp/T/aeu7oyha.mlpd
ERROR[2015-10-16 11:44:45Z]: error while reading buffer
AppKit.AppKitThreadAccessException: AppKit Consistency error: you are calling a method that can only be invoked from the UI thread.
  at AppKit.NSApplication.EnsureUIThread () [0x00020] in /Users/builder/data/lanes/1503/8a0e7bca/source/maccore/src/AppKit/NSApplication.cs:101 
  at AppKit.NSView.set_AutoresizingMask (NSViewResizingMask value) [0x00001] in /Users/builder/data/lanes/1503/8a0e7bca/source/maccore/src/build/mac/full/AppKit/NSView.g.cs:3764 
  at XamarinProfiler.Mac.InspectorView.Initialize () [0x00005] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Mac/Views/Inspectors/InspectorView.cs:59 
  at XamarinProfiler.Mac.InspectorView..ctor () [0x00008] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Mac/Views/Inspectors/InspectorView.cs:54 
  at XamarinProfiler.Mac.SamplesSettingsInspectorView..ctor () [0x00000] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Mac/Views/Inspectors/SamplesSettingsInspectorView.cs:42 
  at XamarinProfiler.Mac.TimeProfilerSampleListController.get_InspectorViews () [0x00016] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Mac/Instruments/TimeProfiler/SampleList/TimeProfilerSampleListController.cs:131 
  at XamarinProfiler.Mac.TimeProfilerSampleListController.get_SamplesSettingsInspectorView () [0x00002] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Mac/Instruments/TimeProfiler/SampleList/TimeProfilerSampleListController.cs:140 
  at XamarinProfiler.Mac.TimeProfilerSampleListController.OnTimeTicked (System.Object sender, UInt64 currentTime) [0x00023] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Mac/Instruments/TimeProfiler/SampleList/TimeProfilerSampleListController.cs:171 
  at (wrapper delegate-invoke) System.EventHandler`1<ulong>:invoke_void_object_TEventArgs (object,ulong)
  at (wrapper delegate-invoke) System.EventHandler`1<ulong>:invoke_void_object_TEventArgs (object,ulong)
  at XamarinProfiler.Core.ProfileRun.OnTimeTicked (System.Object sender, UInt64 currentTime) [0x00011] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Core/ProfileRun.cs:341 
  at XamarinProfiler.Core.Internal.ProfileListener.OnTimeTicked (UInt64 currentTime) [0x00011] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Core/Internal/ProfileListener.cs:262 
  at XamarinProfiler.Core.Internal.ProfileListener.EventProcessor () [0x00169] in /Users/builder/data/lanes/560/6e0c8f6b/source/profiler/src/XamarinProfiler.Core/Internal/ProfileListener.cs:158 
DEBUG[2015-10-16 11:44:45Z]: LogReader finished
DEBUG[2015-10-16 11:45:06Z]: iOS app output: >
DEBUG[2015-10-16 11:45:06Z]: iOS app output: >
DEBUG[2015-10-16 11:45:06Z]: Stopping iOS app /p4/perforce/rschmidt_blushweaver/Measurements/Applications/softFrontPanel/app/trunk/15.1/objects/nisfpgui/iphoneos/i386DEBUG[2015-10-16 11:45:06Z]: iOS app output: Application Terminated
DEBUG[2015-10-16 11:45:06Z]: iOS app output: 
DEBUG[2015-10-16 11:45:06Z]: iOS app output: 
DEBUG[2015-10-16 11:45:06Z]: Stopping profiler log reader
Comment 8 Randall Schmidt 2015-10-16 14:09:49 UTC
Created attachment 13383 [details]
Profiler log 10/16/2015
Comment 9 Rodrigo Moya 2015-10-19 08:17:13 UTC
Yes, 0.23 came out with that crash, but we have already fixed and have 0.24 ready to be released, probably announced today or tomorrow, so keep an eye an upgrade when you get it.

If you want, I can send you the 0.24 build privately also.
Comment 10 Randall Schmidt 2015-10-19 09:55:58 UTC
Ah, I see, thanks for the offer but I can wait until it comes out publicly.