[Monodevelop-devel] Running MD on .NET

Michael Hutchinson m.j.hutchinson at gmail.com
Fri Feb 6 04:29:00 EST 2009


I've tried running MD on .NET my combining the dependencies (MonoDoc
in particular was helpful) from Jonathan Pobst's MD zip with dlls
extracted from my trunk RPMs.

I've successfully run MD on .NET 3.5SP1 on XP32 and Vista64 without
any actual crashes, but a lot of things don't work.

There are a few caveats to getting it running:

a) On 64-bits, the MD binary has to be flagged as a 32-bit binary
using Corflags.exe
b) The WindowsPlatformService has to be build against the MD binaries
c) The path in the MonoDevelop.exe.addins has to be altered to  use \
directory separators.
d) Mono.Posix.dll 1.0 has to be installed to the GAC, because MD needs
both 2.0 and 1.0. 2.0 and PosixHelper (as per jpobsts' zip) can go
alongside MD.
e) The GnomePlatformService has to be removed

I've catalogued the errors I came across so far:


1) At startup, and when trying to load projects:

ERROR [2009-02-06 03:06:42Z]: Add-in error (MonoDevelop.Projects):
System.InvalidOperationException: Duplicate property 'name' in class 'MonoDevelo
p.Projects.UnknownSolutionItem
   at MonoDevelop.Core.Serialization.ClassDataType.AddProperty(ItemProperty
prop, String insertBefore)
   at MonoDevelop.Core.Serialization.ClassDataType.AddProperty(Object
member, String name, Type memberType)
   at MonoDevelop.Core.Serialization.ClassDataType.Initialize()
   at MonoDevelop.Core.Serialization.DataContext.GetConfigurationDataType(Type
type)
   at MonoDevelop.Core.Serialization.ClassDataType.Initialize()
   at MonoDevelop.Core.Serialization.DataContext.GetConfigurationDataType(Type
type)
   at MonoDevelop.Core.Serialization.DataContext.IncludeType(Type type)
   at MonoDevelop.Projects.ProjectService.OnSerializableExtensionChanged(Objects,
ExtensionNodeEventArgs args)
   at Mono.Addins.ExtensionNode.add_ExtensionNodeChanged(ExtensionNodeEventHandler
value)
System.TypeLoadException: Could not load type 'Gdk.ExtensionMode,gdk-sharp'
   at Stetic.Registry.GetType(String typeName, Boolean throwOnError)
   at Stetic.EnumDescriptor..ctor(XmlElement elem)
   at Stetic.WidgetLibrary.Load(XmlDocument objects)
   at Stetic.AssemblyWidgetLibrary.Load()
   at Stetic.Registry.RegisterWidgetLibrary(WidgetLibrary library)
System.TypeLoadException: Could not load type 'Gdk.ExtensionMode,gdk-sharp'
   at Stetic.Registry.GetType(String typeName, Boolean throwOnError)
   at Stetic.EnumDescriptor..ctor(XmlElement elem)
   at Stetic.WidgetLibrary.Load(XmlDocument objects)
   at Stetic.AssemblyWidgetLibrary.Load()
   at Stetic.Registry.RegisterWidgetLibrary(WidgetLibrary library)
Marshaling delete_event signal

2) When closing MD, with no documents open. Prevents cleanly closing MD:

ERROR [2009-02-06 03:12:41Z]: Unhandled exception in GLib event handler.
System.Reflection.TargetInvocationException: Exception has been thrown by the ta
rget of an invocation. ---> System.TypeLoadException: Could not load type 'Gdk.E
xtensionMode,gdk-sharp'
   at Stetic.Registry.GetType(String typeName, Boolean throwOnError)
   at Stetic.EnumDescriptor..ctor(XmlElement elem)
   at Stetic.WidgetLibrary.Load(XmlDocument objects)
   at Stetic.AssemblyWidgetLibrary.Load()
   at Stetic.Registry.RegisterWidgetLibrary(WidgetLibrary library)
   at Stetic.Registry.Initialize(WidgetLibrary coreLibrary)
   at Stetic.ApplicationBackend..ctor(Application app)
   at Stetic.LocalApplication..ctor()
   at Stetic.ApplicationFactory.CreateApplication(IsolationMode mode)
   at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderService.get_SteticApp()
   at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderService.OnActiveDocumentChanged(Object
s, EventArgs args)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at MonoDevelop.Ide.Gui.Workbench.OnDocumentChanged(Object s, EventArgs a)
   at MonoDevelop.Ide.Gui.DefaultWorkbench.OnActiveWindowChanged(Object
sender,EventArgs e)
   at MonoDevelop.Ide.Gui.DefaultWorkbench.CloseAllViews()
   at MonoDevelop.Ide.Gui.DefaultWorkbench.Close()
   at MonoDevelop.Ide.Gui.DefaultWorkbench.OnClosing(Object o,
DeleteEventArgs e)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target,
Object[] arguments, SignatureStruct& sig, MethodAttributes
methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target,
Object[] arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)
   at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)
   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr
return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr
invocation_hint, IntPtr marshal
_data)


3) Dragging pads around:

WARNING [2009-02-06 03:12:41Z]: Gtk-Warning: GtkContainerClass::remove not imple
mented for `__gtksharp_22_MonoDevelop_Components_Docking_DockContainer'
Stack trace:
   at Gtk.Container.CallbackInvoker.Invoke(Widget w)
   at MonoDevelop.Components.Docking.DockContainer.ForAll(Boolean
include_internals, Callback callback)
   at Gtk.Container.Forall_cb(IntPtr container, Boolean
include_internals, IntPtr cb, IntPtr data)
   at Gtk.Container.gtksharp_container_base_forall(IntPtr handle,
Boolean include_internals, IntPtr cb, IntPtr data)
   at Gtk.Container.ForAll(Boolean include_internals, Callback callback)
   at MonoDevelop.Components.Docking.DockFrame.ForAll(Boolean
include_internals, Callback callback)
   at Gtk.Container.Forall_cb(IntPtr container, Boolean
include_internals, IntPtr cb, IntPtr data)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at MonoDevelop.Ide.Gui.IdeStartup.Run(String[] args)
   at MonoDevelop.Startup.SharpDevelopMain.Main(String[] args)


4) A message box warning of of an "Invalid path" when saving
preference of default path for new projects.


5) MD shows nonexistent language * if "New file" dialog when no .NET
language addins are present.


6) "Illegal Project Name" when creating a solution, presumably due to C:\ etc


7) GTK# error prevents opening the text editor:


System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.   at
Gtk.TargetList.gtksharp_target_list_to_entry_array(IntPtr list,
TargetEntry[] entries)   at Gtk.TargetList.op_Explicit(TargetList
list)   at Mono.TextEditor.TextEditor..ctor(Document doc,
ITextEditorOptions options, EditMode initialMode)   at
Mono.TextEditor.TextEditor..ctor()   at
MonoDevelop.SourceEditor.ExtensibleTextEditor..ctor(SourceEditorView
view)   at
MonoDevelop.SourceEditor.SourceEditorWidget..ctor(SourceEditorView
view)   at MonoDevelop.SourceEditor.SourceEditorView..ctor()   at
MonoDevelop.SourceEditor.SourceEditorDisplayBinding.MonoDevelop.Ide.Codons.IDisplayBinding.CreateContentForMimeType(String
mimeType, Stream content)   at
MonoDevelop.Ide.Gui.Workbench.NewDocument(String defaultName, String
mimeType, Stream content)   at
MonoDevelop.Ide.Templates.FileTemplate.CreateFile(FileDescriptionTemplate
newfile,
SolutionItem policyParent, Project project, String directory, String
language, String name)   at
MonoDevelop.Ide.Templates.FileTemplate.Create(SolutionItem
policyParent, Project project,
String directory, String language, String name)   at
MonoDevelop.Ide.Gui.Dialogs.NewFileDialog.OpenEvent(Object sender,
EventArgs e)

(I only have this on vista64/.net32 the editors open fine on my XP32 machine).


8) Addin error at startup:


ERROR [2009-02-06 03:30:26Z]: Add-in error (MonoDevelop.NUnit):
System.InvalidOperationException: Type
'MonoDevelop.NUnit.NUnitAssemblyGroupFileFormat, MonoDevelop.NUnit'
not found in add-in 'MonoDevelop.NUnit,1.9.2'
   at Mono.Addins.RuntimeAddin.GetType(String typeName, Boolean throwIfNotFound)

   at Mono.Addins.TypeExtensionNode.get_Type()
   at Mono.Addins.TypeExtensionNode.CreateInstance()
   at Mono.Addins.InstanceExtensionNode.GetInstance()
   at Mono.Addins.ExtensionNodeEventArgs.get_ExtensionObject()
   at MonoDevelop.Projects.ProjectService.OnFormatExtensionChanged(Object
s, ExtensionNodeEventArgs args)
   at Mono.Addins.ExtensionNode.add_ExtensionNodeChanged(ExtensionNodeEventHandler
value)


9) Failed GTK+ assertions in the open file dialog:

ERROR [2009-02-06 03:35:13Z]: GLib-Critical: g_convert: assertion `str != NULL'
failed
Stack trace:
   at Gtk.FileChooserDialog.get_Filename()
   at MonoDevelop.Ide.Gui.Dialogs.FileSelectorDialog.FillViewers()
   at MonoDevelop.Ide.Gui.Dialogs.FileSelectorDialog.OnSelectionChanged()
   at Gtk.FileChooserDialog.selectionchanged_cb(IntPtr chooser)
   at Gtk.Dialog.gtk_dialog_run(IntPtr raw)
   at Gtk.Dialog.Run()
   at MonoDevelop.Ide.Commands.OpenFileHandler.Run()
   at MonoDevelop.Components.Commands.CommandHandler.Run(Object dataItem)
   at MonoDevelop.Components.Commands.ActionCommand.DispatchCommand(Object dataI
tem)
   at MonoDevelop.Components.Commands.CommandManager.DispatchCommand(Object comm
andId, Object dataItem, Object initialTarget)
   at MonoDevelop.Components.Commands.CommandToolButton.OnClicked()
   at Gtk.ToolButton.clicked_cb(IntPtr tool_item)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at MonoDevelop.Ide.Gui.IdeStartup.Run(String[] args)
   at MonoDevelop.Startup.SharpDevelopMain.Main(String[] args)


10) Tabs on bottom of docks are painted upside-down.


11) Theme changes of base colour propagate to the children of the
dacks, but not the base areas that the docks draw.


12) MD doesn't use native widget styles unless the windows theme is
changed while MD is running.


13) I don't have the traces right now, and I can't repro in vista64
because of (7) but the .NET VM was complaining about violated type
constraints in the history service. I wonder if gmcs is generating
invalid IL?


14) Also can't repro right now due to (7), but the text editor was
behaving very strangely, deleting random text, with some generics
errors about the Delete Action<T>.


15) At startup, an error scanning an unmanaged dll:
ERROR: There was an error while scanning assembly:
C:\Users\Michael\Desktop\MonoDevelop\bin\MonoPosixHelper.dll (The
module was expected to contain an assembly manifest. (Exception from
HRESULT: 0x80131018))


15) Querying the assembly code completion DB causes everything to fall
apart horribly (offset errors on pidbs, remoting failed to start,
MonoDoc panicking etc), so C# and ASP.NET completion are out of the
question right now. However, I did get HTML completion working despite
(14).


16) Addin error:
ERROR [2009-02-06 04:01:50Z]: Add-in error (MonoDevelop.NUnit):
System.InvalidOperationException: Type
'MonoDevelop.NUnit.NUnitAssemblyGroupFileFormat, MonoDevelop.NUnit'
not found in add-in 'MonoDevelop.NUnit,1.9.2'
   at Mono.Addins.RuntimeAddin.GetType(String typeName, Boolean throwIfNotFound)
   at Mono.Addins.TypeExtensionNode.get_Type()
   at Mono.Addins.TypeExtensionNode.CreateInstance()
   at Mono.Addins.InstanceExtensionNode.GetInstance()
   at Mono.Addins.ExtensionNodeEventArgs.get_ExtensionObject()
   at MonoDevelop.Projects.ProjectService.OnFormatExtensionChanged(Object
s, ExtensionNodeEventArgs args)
   at Mono.Addins.ExtensionNode.add_ExtensionNodeChanged(ExtensionNodeEventHandler
value)


17) Closing default policies window after changing settings:

ERROR [2009-02-06 04:04:04Z]: Error writing default policies file
'C:\Users\Michael\AppData\Roaming\MonoDevelop\.#DefaultPolicies.xml'
System.NullReferenceException: Object reference not set to an instance
of an object.
   at MonoDevelop.Projects.Policies.PolicySet.SaveToFile(StreamWriter writer)
   at MonoDevelop.Projects.Policies.PolicyService.<SaveDefaultPolicies>m__11(StreamWriter
writer)
   at MonoDevelop.Projects.Policies.PolicyService.ParanoidSave(String
fileName,String friendlyName, Action`1 write)

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-devel-list mailing list