Bug 165 - Upgrading to MonoDevelop 2.6 B3 results in debugger error
Summary: Upgrading to MonoDevelop 2.6 B3 results in debugger error
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 2.6 Beta 3
Hardware: Macintosh Mac OS
: --- critical
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
: 299 ()
Depends on:
Blocks:
 
Reported: 2011-08-03 16:16 UTC by Ian
Modified: 2011-08-30 13:57 UTC (History)
5 users (show)

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


Attachments
Crash Log (577.06 KB, text/plain)
2011-08-15 17:18 UTC, Ian
Details
ss (100.25 KB, image/jpeg)
2011-08-23 17:39 UTC, Ian
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 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:
Status:
RESOLVED FIXED

Description Ian 2011-08-03 16:16:20 UTC
We updated to MonoDevelop 2.6 Beta 3 with MonoTouch 4.(newest)

When we try to debug to the simulator we get the following error on any of our many apps.

We have tried full refresh, ensuring we have the newest GTK, newest Monotouch etc.

Downgrading to MonoDevelop 2.4 resolves the issue.

CHoosing a simple "Run" works fine. The issue seems to be related to Debug.

-------------------

Cannot execute "/Volumes/Apps/Customers/XXXXXX/XXXXXXX/XXXXX/bin/iPhoneSimulator/Debug/XXXXXX.exe". A type load exception has occurred.

System.TypeLoadException: A type load exception has occurred.
  at MonoDevelop.Debugger.DebuggerEngine.CreateDebuggerStartInfo (MonoDevelop.Core.Execution.ExecutionCommand cmd) [0x00006] in /Users/michael/Mono/md-2-6/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/michael/Mono/md-2-6/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs:483 
  at MonoDevelop.Debugger.DebugExecutionHandler.Execute (MonoDevelop.Core.Execution.ExecutionCommand command, IConsole console) [0x00000] in /Users/michael/Mono/md-2-6/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/michael/Mono/md-2-6/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) [0x000b2] in /Users/michael/Mono/md-2-6/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs:1141
Comment 1 Rolf Bjarne Kvinge [MSFT] 2011-08-08 12:07:47 UTC
Can you open a terminal window, run the following commands:

export MONO_OPTIONS=--trace=E:all
export MONO_LOG_MASK=asm
export MONO_LOG_LEVEL=debug

then run monodevelop from that terminal window and finally attach this file:

/Users/rolf/Library/Logs/MonoDevelop-2.6/MonoDevelop.log

to this bug report? That will hopefully provide enough information to find out where the problem is.
Comment 2 Ian 2011-08-08 13:09:54 UTC
I installed the new Mono framework patch that fixed the Lion bugs and it's now working.
Comment 3 Lluis Sanchez 2011-08-08 20:20:15 UTC
Closing.
Comment 4 Ian 2011-08-15 17:18:11 UTC
Created attachment 131 [details]
Crash Log

The problem has returned. Attached is a clean crash log
Comment 5 Miguel de Icaza [MSFT] 2011-08-23 09:50:09 UTC
THis looks like an incomplete Mono setup.

What versions of every component are you using?

* Mono
* MonoDevelop
* Operating System

As a workaround, use the stable MonoDevelop 2.4.2

This reports:


Mono: The following assembly referenced from /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.IPhone/MonoDevelop.Debugger.Soft.IPhone.dll could not be loaded:
     Assembly:   Mono.Debugging.Soft    (assemblyref_index=3)
     Version:    0.0.0.0
     Public Key: 5e9ce85b0923c84f
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.IPhone/).

Mono: Failed to load assembly MonoDevelop.Debugger.Soft.IPhone[0x1829a710]
Comment 6 Miguel de Icaza [MSFT] 2011-08-23 10:02:31 UTC
*** Bug 299 has been marked as a duplicate of this bug. ***
Comment 7 Jeffrey Stedfast 2011-08-23 11:25:56 UTC
Also useful to know might be which Mono package did you install? MDK vs MRE

Have you tried under MonoDevelop 2.6 RC2?
Comment 8 Ian 2011-08-23 11:27:32 UTC
MRE and 2.6 b2 and b3 and b1
Comment 9 Jeffrey Stedfast 2011-08-23 11:30:25 UTC
Oh, and the MonoTouch Addin version (MonoDevelop menu -> Add-in Manager -> Mobile Development -> Mono iPhone Development). The version should be in the right-side pane under the Add-in title.
Comment 10 Ian 2011-08-23 13:04:29 UTC
It's 4.0.5
Comment 11 Jeffrey Stedfast 2011-08-23 13:33:22 UTC
Thanks Ian, there's only 2 versions I still need from you.

MonoFramework-MRE-2.10.??  <-- which version? I'm guessing 2.10.4?
MonoDevelop 2.6b3
MonoTouch 4.0.5

The MonoDevelop MonoTouch/iPhone Add-in is separate from the MonoTouch version and should be something like 2.5.93. Can you get that version for me, too?

MonoDevelop menu -> Add-in Manager -> Mobile Development -> Mono iPhone Development

Once you select the Mono iPhone Development item, the right-hand side of the dialog should then display the version right below the bold text: "Mono iPhone development".

My guess is that the iPhone Development add-in version is probably not the culprit here, but it might be helpful to know anyway.

Thanks!
Comment 12 Mikayla Hutchinson [MSFT] 2011-08-23 15:51:20 UTC
Could you please upgrade to MD 2.6 RC2? It has a possible fix for this issue.

https://github.com/mono/monodevelop/commit/77aec7408f97f371bea53898c1b275d19056810a
Comment 13 Ian 2011-08-23 16:24:56 UTC
I upgraded to 2.6 B3

Jeff: The version number is 2.4 from the menu item you refereed to.
Comment 14 Jeffrey Stedfast 2011-08-23 16:33:09 UTC
Ian: MonoDevelop 2.6 RC2 is newer than 2.6b3 and judging from the patch Michael linked to, it seems plausible that it might solve the issue you are seeing.

If upgrading to 2.6 RC2 doesn't solve the problem, can you provide the version of MonoFramework you have?

`mono --version` should get you the version.

Thanks!
Comment 15 Ian 2011-08-23 17:20:10 UTC
The web site: https://github.com/mono/monodevelop/downloads does not have a reference to MonoDevelop 2.6. It has 2.5 and 2.7 only

Ian
Comment 16 Jeffrey Stedfast 2011-08-23 17:26:09 UTC
Try http://monodevelop.com/Downloads - you'll need to download RC1 (there is no RC2 to download there), but once you install that, MonoDevelop will prompt you to update to RC2 (RC2 is Mac-only).
Comment 17 Jeffrey Stedfast 2011-08-23 17:26:38 UTC
Oops, I mean http://monodevelop.com/Download
Comment 18 Ian 2011-08-23 17:32:02 UTC
I installed RC2, then went to the MonoDevelop Updater in the program. It offers me 2.4.2 in Stable and 2.8 in Alpha. Nothing new in Beta.

Perhaps it's not published yet to Beta or is tagged incorrectly?

Ian
Comment 19 Jeffrey Stedfast 2011-08-23 17:34:31 UTC
If you have 2.6 RC2, you have the latest Beta (RC2 is Release Candidate #2, which is newer than RC1 which is newer than Beta 3, etc).
Comment 20 Ian 2011-08-23 17:39:40 UTC
Created attachment 173 [details]
ss
Comment 21 Ian 2011-08-23 17:40:24 UTC
I have RC2 installed. The error no longer appears, but the debugger does not attach any more,.


See screenshot attached.
Comment 22 Jeffrey Stedfast 2011-08-23 19:24:13 UTC
And you have Mono 2.10.4?
Comment 23 Mikayla Hutchinson [MSFT] 2011-08-23 19:29:02 UTC
I think you've run into a different issue after overcoming that one. Recent MD releases assumed that MonoTouch versions greater than 4.0.4 support USB debugging, but 4.0.5 broke that assumption. You'll need to use an older or newer version of MT for now.
Comment 24 Jeffrey Stedfast 2011-08-27 17:03:03 UTC
Another option would be to downgrade back to MonoDevelop 2.4.2 since that doesn't have the broken assumption that anything newer than 4.0.4.1 will use USB debugging. (USB debugging is only available in MonoTouch 4.1.x and 4.9.x)

I'll leave this open until we ship a MonoDevelop 2.6RC3 (or 2.6 final, whichever comes next) with a fix for this latest bug.
Comment 25 Jeffrey Stedfast 2011-08-30 13:57:40 UTC
You'll be happy to learn that I just helped QA the final MonoDevelop 2.6 packages to make sure that the debugger not attaching bug was resolved and I'm pleased to report that it is!

Thanks go out to Michael Hutchinson for backporting his 2.8 Alpha fixes to 2.6.