Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 or GitHub 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.
Xamarin gets itself into a state where installing an app to the simulator results in the error 'Cannot Execute' with the rest of the error cut off. There are no logs anywhere, so it's impossible to find out what's going on.
Furthermore, when in this state Xamarin also randomly fails to both deploy to the device, and actually -connect- to the running application. Sometimes it even fails to register breakpoints, or prevents you adding/removing them in the UI.
This is extremely frustrating, it went away randomly a while ago and now it's back again in full force.
Does any of the following help when this happens:
* Restart Xamarin Studio
* Restart the device.
* Restart your Mac.
And could you do the following which will provide more information when it occurs again:
* Go to the project's iOS Build options and add "-v -v -v" (without the quotes) to the additional mtouch arguments.
* Next time the debugger won't connect, get anything printed to the Application Output in Xamarin Studio and the output in the device log (Xamarin's menu: View -> Pads -> iOS Device Log) Note that you do not have to keep the device log open all the time, some history will be printed when you connect.
Error I get in the logs when experiencing this issue:
ERROR [2013-04-08 16:48:47Z]: Cannot execute "/Users/jasonsmith/Sources/TravelPlanner/src/TravelPlanner.iOS/bin/iPhoneSimulator/Debug/Hotwire.exe"
System.Net.Sockets.SocketException: Address already in use
at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x0006c] in /private/tmp/source/bockbuild/profiles/mono-2-10/build-root/mono-2.10.12/_build/mono-2.10.12.git/mcs/class/System/System.Net.Sockets/Socket.cs:1130
at MonoDevelop.IPhone.IPhoneTcpCommandConnection..ctor (System.Net.IPAddress ipAddress, Int32 port) [0x00036] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneCommandConnection.cs:482
at MonoDevelop.IPhone.IPhoneExecutionHandler.CreateCommandConnection (MonoDevelop.IPhone.IPhoneDevice device) [0x0000b] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.IPhone/MonoDevelop.IPhone/Execution/IPhoneExecutionHandler.cs:341
at MonoDevelop.Debugger.Soft.IPhone.IPhoneSoftDebuggerEngine.CreateDebuggerStartInfo (MonoDevelop.Core.Execution.ExecutionCommand command) [0x00038] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.IPhone/MonoDevelop.Debugger.Soft.IPhone/IPhoneSoftDebuggerEngine.cs:58
at MonoDevelop.Debugger.DebuggerEngine.CreateDebuggerStartInfo (MonoDevelop.Core.Execution.ExecutionCommand cmd) [0x00006] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggerEngine.cs:82
at MonoDevelop.Debugger.DebuggingService.InternalRun (MonoDevelop.Core.Execution.ExecutionCommand cmd, MonoDevelop.Debugger.DebuggerEngine factory, IConsole c) [0x0003a] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs:523
at MonoDevelop.Debugger.DebugExecutionHandler.Execute (MonoDevelop.Core.Execution.ExecutionCommand command, IConsole console) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugExecutionHandlerFactory.cs:70
at MonoDevelop.Debugger.DebugExecutionHandlerFactory.Execute (MonoDevelop.Core.Execution.ExecutionCommand command, IConsole console) [0x00015] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugExecutionHandlerFactory.cs:52
at MonoDevelop.Projects.DotNetProject.DoExecute (IProgressMonitor monitor, MonoDevelop.Projects.ExecutionContext context, MonoDevelop.Projects.ConfigurationSelector configuration) [0x000ca] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs:1145
Restarting the app doesn't fix the issue
Restarting the device doesn't fix the issue
Restarting my computer doesn't immediately fix the issue, I usually have to wait until the next day before it works again
I should note this has been happening for about 4 months, so this bug is irrespective of IDE version. Even the latest alpha doesn't fix it.
Rhys: can you attach the Ide.* log files from /Users/<username>/Library/Logs/XamarinStudio-4.0/ in addition to adding the diagnostic output to your project.
Even with -v -v -v I get no useful output from build:
---------------------- Done ----------------------
I've tried adding in both Compiler - Additional arguments and iOS Build - additional mtouch arguments. Neither provides anything more than that.
I've attached the requested files.
I've checked what ports are being listened by what executables, the only one relevant to MonoTouch was the Xamarin IDE. Killing and restarting didn't fix anything.
Can you try this to see if anything improves: https://bugzilla.xamarin.com/show_bug.cgi?id=11341#c3 ?
Note that this test will break debugging on device, you'll likely have to undo it for device debugging to work.
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?
If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.
Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.