locked
Cannot debug HelloWorld template with SDK 6 or 6.1 RRS feed

  • Question

  • User1670 posted

    Hi,

    We are trailing the Xamarin.ios product. But we are having issues with debugging apps in SDK 6.0/6.1. If I create a new solution from the Hello World template and F5 debug then the ios simulator on the connected mac mini starts but an error is thrown. The template debugs fine in the simulator is I change the SDK to verison 5 or 5.1.

    In Visual Studio the MVC Server Log shows:

    [2013-02-21 13:17:18.6] Handling with command: [Info: CommmandUrl=Info] (50) [2013-02-21 13:17:18.6] Attempting to acquire command execution lock, timeout set to 00:10:00 [2013-02-21 13:17:18.6] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --listdev [2013-02-21 13:17:20.0] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements [2013-02-21 13:17:20.6] stdout: 6b711def5158519ba50744378fd86d5cb390a352 MonoTouch TRIAL 2013-03-20T14:31:13 [2013-02-21 13:17:20.8] [2013-02-21 13:17:20.8] Command [Info: CommmandUrl=Info] finished (50) [2013-02-21 13:17:20.8] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements [2013-02-21 13:17:21.5] stdout: 6b711def5158519ba50744378fd86d5cb390a352 MonoTouch TRIAL 2013-03-20T14:31:13 [2013-02-21 13:17:21.7] [2013-02-21 13:17:21.7] Handling with command: [FileManifest: CommmandUrl=FileManifest] (50) [2013-02-21 13:17:21.7] Attempting to acquire command execution lock, timeout set to 00:10:00 [2013-02-21 13:17:21.7] Command [FileManifest: CommmandUrl=FileManifest] finished (50) [2013-02-21 13:17:21.9] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements [2013-02-21 13:17:22.4] stdout: 6b711def5158519ba50744378fd86d5cb390a352 MonoTouch TRIAL 2013-03-20T14:31:13 [2013-02-21 13:17:22.6] [2013-02-21 13:17:22.6] Handling with command: [UploadChanges: CommmandUrl=UploadChanges] (50) [2013-02-21 13:17:22.6] Attempting to acquire command execution lock, timeout set to 00:10:00 [2013-02-21 13:17:22.6] Command [UploadChanges: CommmandUrl=UploadChanges] finished (50) [2013-02-21 13:17:22.6] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements [2013-02-21 13:17:23.2] stdout: 6b711def5158519ba50744378fd86d5cb390a352 MonoTouch TRIAL 2013-03-20T14:31:13 [2013-02-21 13:17:23.4] [2013-02-21 13:17:23.4] Handling with command: [Build: CommmandUrl=Build] (50) [2013-02-21 13:17:23.4] Attempting to acquire command execution lock, timeout set to 00:10:00 [2013-02-21 13:17:23.4] Running tool: DebugInformationConverter [2013-02-21 13:17:23.4] Starting pdb2mdb "HelloWorldApp1.exe" [2013-02-21 13:17:23.4] Running tool: PreBuildFixups [2013-02-21 13:17:23.4] Running tool: IBTool [2013-02-21 13:17:23.4] Running tool: ContentCopier [2013-02-21 13:17:23.4] Copying '/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/bundle/HelloWorldApp1.app/Resources/Default.png' to '/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/output/Debug/iPhoneSimulator/HelloWorldApp1.app/Default.png' [2013-02-21 13:17:23.4] Copying '/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/bundle/HelloWorldApp1.app/Resources/Default@2x.png' to '/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/output/Debug/iPhoneSimulator/HelloWorldApp1.app/Default@2x.png' [2013-02-21 13:17:23.4] Copying '/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/bundle/HelloWorldApp1.app/Resources/Default-568h@2x.png' to '/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/output/Debug/iPhoneSimulator/HelloWorldApp1.app/Default-568h@2x.png' [2013-02-21 13:17:23.4] Running tool: TrialCheckChanges [2013-02-21 13:17:23.4] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements [2013-02-21 13:17:24.1] stdout: 6b711def5158519ba50744378fd86d5cb390a352 MonoTouch TRIAL 2013-03-20T14:31:13 [2013-02-21 13:17:24.3] [2013-02-21 13:17:24.3] Resource Names : System.String[] [2013-02-21 13:17:24.3] Running tool: Mtouch [2013-02-21 13:17:24.3] Starting /Developer/MonoTouch/usr/bin/mtouch -v -sdkroot "/Applications/Xcode.app/Contents/Developer" --cache "/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/output/temp/mtouch-cache" --nomanifest --nosign -sim "/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/output/Debug/iPhoneSimulator/HelloWorldApp1.app" -debug -nolink -sdk "6.1" -targetver "3.2" --abi=armv7 "/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/assemblies/HelloWorldApp1.exe" [2013-02-21 13:17:25.2] stdout: MonoTouch Business version 6.2.0 using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk [2013-02-21 13:17:25.4] [2013-02-21 13:17:26.0] Running tool: EmbeddedResourcesUnpacker [2013-02-21 13:17:26.0] Running tool: InfoPlistBuilder [2013-02-21 13:17:26.0] Warning: No valid iPhone code signing keys found in keychain. [2013-02-21 13:17:26.0] No provisioning profile [2013-02-21 13:17:26.0] Warning: Application icons have not been set in /Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/bundle/HelloWorldApp1.app/Info.plist [2013-02-21 13:17:26.0] Warning: Supported iPhone orientations are not matched pairs in /Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/bundle/HelloWorldApp1.app/Info.plist [2013-02-21 13:17:26.0] Warning: Supported iPhone orientations are not matched pairs [2013-02-21 13:17:26.0] Running tool: DebugConfigFileBuilder [2013-02-21 13:17:26.0] Running tool: DebugSettingsManifestBuilder [2013-02-21 13:17:26.0] Running tool: PosBuildFixups [2013-02-21 13:17:26.0] Running tool: Packager [2013-02-21 13:17:26.0] Command [Build: CommmandUrl=Build] finished (50) [2013-02-21 13:17:26.0] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements [2013-02-21 13:17:26.0] stdout: 6b711def5158519ba50744378fd86d5cb390a352 MonoTouch TRIAL 2013-03-20T14:31:13 [2013-02-21 13:17:26.2] [2013-02-21 13:17:26.2] Handling with command: [StartDebugProxy: CommmandUrl=StartDebugProxy] (50) [2013-02-21 13:17:26.2] Attempting to acquire command execution lock, timeout set to 00:10:00 [2013-02-21 13:17:26.2] WaitForAppConnected Waited! [2013-02-21 13:17:26.2] Command [StartDebugProxy: CommmandUrl=StartDebugProxy] finished (50) [2013-02-21 13:17:26.2] Error: Failed to send response to Visual Studio [2013-02-21 13:17:26.2] Got connection from Visual Studio : Waiting application... (output) [2013-02-21 13:17:26.2] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements [2013-02-21 13:17:26.2] Exception: Exception type: System.IO.IOException [2013-02-21 13:17:26.2] Write failure [2013-02-21 13:17:26.2] at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in :0 [2013-02-21 13:17:26.2] at System.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in :0 [2013-02-21 13:17:26.2] at System.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in :0 [2013-02-21 13:17:26.2] at Mtb.Server.Helpers.SendXml[ResponseRecord] (System.Net.HttpListenerContext context, Mtb.Server.Serialization.ResponseRecord o, Int32 statusCode) [0x00000] in :0 [2013-02-21 13:17:26.2] Command [DebugApplication: CommmandUrl=DebugApplication] finished (9) [2013-02-21 13:17:26.2] Got connection from Visual Studio: (sdb) [2013-02-21 13:17:26.7] stdout: 6b711def5158519ba50744378fd86d5cb390a352 MonoTouch TRIAL 2013-03-20T14:31:13 [2013-02-21 13:17:26.9] [2013-02-21 13:17:26.9] Handling with command: [DebugApplication: CommmandUrl=DebugApplication] (8) [2013-02-21 13:17:26.9] Attempting to acquire command execution lock, timeout set to 00:10:00 [2013-02-21 13:17:26.9] WaitForAppConnected [2013-02-21 13:17:26.9] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --launchsim "/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/output/Debug/iPhoneSimulator/HelloWorldApp1.app" -stdout "/Users/martyns/Library/Logs/Xamarin/MonoTouchVS/Simulator/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/out.log" -stderr "/Users/martyns/Library/Logs/Xamarin/MonoTouchVS/Simulator/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/err.log" --device 1 -argument=-monodevelop-port -argument=49449 -sdk 6.0 [2013-02-21 13:17:41.5] stdout: Starting iOS simulator 6.0 [2013-02-21 13:17:41.5] Launching application [2013-02-21 13:17:41.5] ERR: There was an error launching the application: The simulated application quit. [2013-02-21 13:17:41.7]

    On the mac the simulator pops up with the messages "The simulated application quit", with options to Relaunch or Quit. Relauch leads to the same error a few seconds later. I've tried 'Reset Content and Settings..." in the simulator but that also makes no difference.

    The Console on OSX displays many messages but a few key ones seem to me to be:

    21/02/2013 13:17:34.920 installd[1464]: 0xb0115000 handleinstall: Install of "/Users/martyns/Library/Caches/Xamarin/mtbs/builds/HelloWorldApp1/93818e30-49ba-4be1-89b4-15222f36ad0c/output/Debug/iPhoneSimulator/HelloWorld_App1.app" requested by SimulatorBridge

    ...

    21/02/2013 13:17:35.851 locationd[1467]: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' setObjectForKey: key cannot be nil' ** First throw call stack: (0xdd7012 0x917e7e 0xe5a0de 0x82c6b1 0x2679ed 0xb61b 0xab93 0x178814 0x1787c0 0x179559 0x1c708c3 0x1c70140 0x1b280f4 0x1b1cb53 0x1b183ab 0x1b1cee7 0x1b18768 0xd7daf5 0xd7cf44 0xd88f91 0x4e51 0x5127 0x277ab 0x2f15) 21/02/2013 13:17:36.151 com.apple.launchd.peruser.1583220243[160]: (com.apple.iPhoneSimulator:com.apple.locationd[1467]) Job appears to have crashed: Abort trap: 6

    21/02/2013 13:17:36.151 com.apple.launchd.peruser.1583220243[160]: (com.apple.iPhoneSimulator:com.apple.locationd) Throttling respawn: Will start in 1 seconds 21/02/2013 13:17:36.223 ReportCrash[1480]: Saved crash report for locationd[1467] version 1491.2 to /Users/martyns/Library/Logs/DiagnosticReports/locationd2013-02-21-131736Camps-Mac-mini.crash

    I have attached the crash log as a text file.

    Any ideas what is cauing this? I don't like the idea of going much further if I can't even get the built in templates working correctly :).

    I have tried the other templates (empty and OpenGL) and they exhibit the same behaviour. Very strange...

    Sorry for the wall of text and logs.

    Thanks, Martyn

    Thursday, February 21, 2013 1:30 PM

All replies

  • User1497 posted

    Hello @ms_camps

    Can you try to Reset your Simulator settings and try again?

    Also, check the SDK version you are building your application,

    Thank you.

    Thursday, February 21, 2013 4:41 PM
  • User1670 posted

    Hi @Jarina,

    I mention trying resetting the simulator in the original post. It doesn't seem to fix the issue unfortunately.

    I changed the SDK version to match but still no joy.

    Thanks

    Friday, February 22, 2013 9:19 AM
  • User1497 posted

    Ok. Let's try the hard way.

    Here @StefandeVogelaere said he was able to run after cleanup all folder of simulator.

    Let's try the same.

    Friday, February 22, 2013 12:50 PM
  • User1620 posted

    i have the same problem as @ms_camps ! but i have no chance to switch the SDK version, because there is only one element shown in the ComboBox (--> 6.1)

    @Jarina : i deleted all content of the simulator folder, but it still not works! The ToolBarButton "Show iOS Simulator" doesn't work also.

    Friday, February 22, 2013 2:43 PM
  • User1497 posted

    @Genne can you gist your "Mac Server Log" output ?

    Thank you.

    Friday, February 22, 2013 2:48 PM
  • User1670 posted

    @Jarina : Yeah same as @Genne, that doesn't seem to make a difference.

    I have seen @StefandeVogelaere error message before (SpringBoard failed to launch application with error: 7) seperately and a Reset from the menu does seem to fix that but I think this issue is unrelated.

    Friday, February 22, 2013 3:02 PM
  • User1620 posted

    at first i will try to install sdk 5.1 --> Xcode go to preferences-> downloads and download iOS 5.1 simulator

    @Jarina: where can i find the "Mac Server Log" i'm a newbie in MacOS (and i hate it from the beginning)

    Friday, February 22, 2013 3:11 PM
  • User1620 posted

    now i can confirm that it works with SDK 5.1 but not with SDK 6.1

    Friday, February 22, 2013 3:24 PM
  • User1497 posted

    The "Mac Server Log" is output pane on Visual Studio

    http://screencast.com/t/Qcz9qYLcM

    @Genne can you try this, just to be sure

    Friday, February 22, 2013 8:09 PM
  • User1620 posted

    @Jarina : here is the Log: https://gist.github.com/genne5/a9b908005f86bcf7d23b

    Monday, February 25, 2013 12:03 PM
  • User1497 posted

    @Genne did you try this ?

    Monday, February 25, 2013 1:37 PM
  • User1620 posted

    yep i did it, but with no success

    Monday, February 25, 2013 1:39 PM
  • User1670 posted

    Not sure if this will help with diagnosis but I cleared the Xamarin cache as above as I hadn't tried that yet.

    Doing a build from Windows still fails but if I take the code from the cache after this failed attempt (/Users/USERNAME/Library/Cahces/Xamarin/mtbs/builds/GUID/source/) and wrap it in a blank solution using Xamarin Studio on the Mac and run it, it will run in the iPhone Simulator (all SDK versions)!

    Not sure if that helps but thought it was interesting.

    Monday, February 25, 2013 4:17 PM
  • User3231 posted

    I can confirm the same behavior as Genne. My Mac Server Log output looks just like his. Resetting the cache and simulator state did not change the behavior.

    I also found that after receiving this error in the simulator I am unable to run any application created using Xamarin on the Mac or Xcode in the iPhone or iPad simulator until I do a reset of it.

    Monday, February 25, 2013 6:00 PM
  • User820 posted

    I too am having the same issue :(

    Wednesday, February 27, 2013 2:19 AM
  • User1497 posted

    This might help:

    • Ensure you have the latest Xcode installed on your Mac to avoid issues.

    • Ensure you have the latest Xamarin.iOS

    • Delete Directory: ~/Library/Application Support/iPhone Simulator (http://screencast.com/t/lnUFMBrc)

    • Cleanup your Xamarin cache (http://screencast.com/t/ujmgiVbMONyn)

    • Restart Mac OS X

    • On Windows, Run your Visual Studio as Administrator.

    • Create a new project.

    • Don't touch anything until update dialog.

    • Update SDK.

    • Close Visual Studio.

    • Run VS again as your windows account.

    • Open your project, and Debug.

    (please ensure your Mac and your Windows are activated)

    Wednesday, February 27, 2013 3:27 PM
  • User1670 posted

    Hi @Jarina,

    That hasn't worked either. Any more ideas?

    Thanks.

    Thursday, February 28, 2013 3:17 PM
  • User1497 posted

    Hi @mscamps try to fill the Name, Identifier and Version of your application. http://forums.xamarin.com/discussion/comment/6053/#Comment6053

    Thursday, February 28, 2013 3:19 PM
  • User1670 posted

    Magic! That worked!

    You might want to update the documentation to mention that or popup a message before deploying if it's empty. I imagine you might see a lot of this issue in the future otherwise.

    Thank you for all your help.

    Thursday, February 28, 2013 3:48 PM
  • User16270 posted

    Thank you! This solved my issue too!

    Saturday, June 29, 2013 8:10 PM
  • User3932 posted

    For me manually deleting the Simulator folder (list from Jarina) worked. Resetting the simulator from the simulator menu did not work.

    Tuesday, August 13, 2013 11:14 AM
  • User99109 posted

    Cleanup your Xamarin cache solved my issue .but other problem come out ?? Could not load Info.plist: Could not find a part of the path "/Users/songliuchen/Library/Caches/Xamarin/mtbs/builds/App1/3abe8d2a4d06c788d524f671235b8cc7/bin/iPhoneSimulator/Release/App1.app/Info.plist". I cannot find App1.app in folder ,so can not find Info.plist

    Friday, January 23, 2015 4:34 PM
  • User99109 posted

    Cleanup your Xamarin cache solved my issue .but other problem come out ?? Could not load Info.plist: Could not find a part of the path "/Users/songliuchen/Library/Caches/Xamarin/mtbs/builds/App1/3abe8d2a4d06c788d524f671235b8cc7/bin/iPhoneSimulator/Release/App1.app/Info.plist". I cannot find App1.app in folder ,so can not find Info.plist

    Friday, January 23, 2015 4:35 PM