4

I'm new to MonoTouch and more times than not, when I try to run my MonoTouch app on the iPhone simulator (debug mode and regular), I receive a long error output that begins with the following message:

Error connecting stdout and stderr (127.0.0.1:10001) Couldn't register com.yourcompany.[appnamehere] with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.Stacktrace:

at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00004> at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00004> at MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x00089> at MonoTouch.UIKit.UIApplication.Main (string[]) <0x00014> at PodcastManager.Application.Main (string[]) <0x00010> at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr) <0x00043>

And ends with:

=================================================================

Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application.

=================================================================

The weird thing is it will work some of the time. Once, a reboot of my machine did it. Others, just restarting MonoDevelop and/or the simulator.

I can provide the entire error output if you think that may help.

Any ideas?

3 Answers 3

3

This is a problem with the monotouch debugger. Sometimes, when the application crashes, the debugger hangs in memory, and that then prevents you from running the app again. As you said, sometimes closing MonoDevelop and the simulator is enough to clean up the debugger, sometimes you need a full reboot. This is also the experience I have, which is probably the only bad thing I found with monotouch so far.

Many times, I'm able to directly kill the process from the console. To do that, open the console and type "top". You'll see the list of processes using the most memory, your app will likely be on top, using almost 100% of cpu. Save the id of the that line, and type q to quit. Now type "kill -9 ???" where ??? is the id you got from top.

Monotouch 2.0 fixed a lot of these problems, if you haven't updated yet I would seriously recommend you to do so. I'm running the beta channel of 2.0, and its a LOT more stable. Crashes went down from 1 or 2 every hour to 1 or 2 a day. It still happens, though, unfortunately.

4
  • I did upgrade to the beta channel today but I may have already been in a bad state. I'll reboot and give it another shot... Apr 8, 2010 at 15:00
  • Looked good on the first run. I'll try to stress it later today. Apr 8, 2010 at 17:42
  • Haven't seen this error since running the beta channel and rebooting. If I do see it i'll try the kill procedure you stated. Otherwise I'll accept this as the answer. Thanks! Apr 8, 2010 at 19:07
  • Update - I continue to have this problem. and I can only kill one of the two processes that has my app name. Looks like I'm still stuck with rebooting every time this occurs. How do other people develop with the trial when it's as buggy as it is? Gonna be hard to get to where I want to shell out the $$ for the full version... Apr 9, 2010 at 2:10
1

-- Update -- after updating to 2.0.2 I have not seen this issue.

After playing with it long enough, and coming across this bug report I've come to the conclusion that until it's fixed the way to prevent this error is by NEVER stopping a debug session in the IDE. As long as you stop the debug session when the code is not at a breakpoint by hitting the home button it appears that you will avoid this situation.

1
  • You might still get the problem randomnly. One solution is to stop the debugger with the iPhone simulator home button
    – Chris S
    Apr 19, 2010 at 16:02
0

I think this error comes when any native library of monotouch is missing. It happen due to uninstall Visual Studio or Update Xamarin. I faced the Same error and resolve it by Unistalland reinstall the Xamarin Visual Studio and Xamarin Studio. It takes 10 min and all issues are solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.