Bug 2900 - Can't stop app when started using Run
Summary: Can't stop app when started using Run
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 5.0
Hardware: PC Mac OS
: Highest normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-01-13 21:52 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2012-01-16 18:31 UTC (History)
6 users (show)

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

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 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.

Related Links:

Description Rolf Bjarne Kvinge [MSFT] 2012-01-13 21:52:49 UTC
* Open any iPhone project.
* Select a simulator target.
* Hit Run (not Debug)
* Wait for the app to open.
* Hit the Stop icon.

Watch how MonoDevelop returns from run mode, while the app continues to live happily in the simulator.
Comment 1 Miguel de Icaza [MSFT] 2012-01-16 15:15:00 UTC
Adding Jeff to this bug as well, as he has been working on the debugger
Comment 2 Miguel de Icaza [MSFT] 2012-01-16 15:15:56 UTC
This is what shows up when I start the application with Run, instead of Debug on the simulator:

MonoTouch: Socket error while connecting to MonoDevelop on Connection refused
Comment 3 Miguel de Icaza [MSFT] 2012-01-16 15:16:14 UTC
Added Michael as he might know what the error is just from the message:

MonoTouch: Socket error while connecting to MonoDevelop on Connection refused
Comment 4 Mikayla Hutchinson [MSFT] 2012-01-16 15:24:39 UTC
That error isn't really an error. It's a consequence of the way that we start the debugger. we don't have any way to pass args to the app, so it always tries to connect to the debugger. If it succeeds it runs in the debugger, if it fails it prints that message and runs normally. We should probably filter that message out.

This sounds like a regression in mtouch. MD ends the app when in simulator run mode by writing \n to mtouch's stdin to tell it to quit the program.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-01-16 17:23:10 UTC
The socket error is not actually an error when just running the app. In any case it's been fixed for MonoTouch 5.1.2, the message won't show up there.
Comment 6 Rolf Bjarne Kvinge [MSFT] 2012-01-16 18:31:45 UTC
It is an mtouch regression. Fixed (0fcf6871).

The issue was that Console.KeyAvailable doesn't work if the parent mono process (MonoDevelop) has redirected standard input (this has been filed as: bug #2923).