Is it MonoDevelop's bug? - ide

I use Debian Squeeze and MonoDevelop 2.4 for my program and I have some problems with it. When I trying to save my project's changes, I have next message dialog of MonoDevelop:
System.NullReferenceException: Object reference not set to an instance of an object
at MonoDevelop.GtkCore.GuiBuilder.CodeBinder.IsValidClass (MonoDevelop.Projects.Dom.Parser.ProjectDom ctx, IType cls, Stetic.Component obj) [0x00000] in :0
at MonoDevelop.GtkCore.GuiBuilder.CodeBinder.GetClass (Boolean getUserClass) [0x00000] in :0
at MonoDevelop.GtkCore.GuiBuilder.CodeBinder.GetClass () [0x00000] in :0
at MonoDevelop.GtkCore.GuiBuilder.CodeBinder.UpdateBindings (System.String fileName) [0x00000] in :0
at MonoDevelop.GtkCore.GuiBuilder.GuiBuilderView.Save (System.String fileName) [0x00000] in :0
at MonoDevelop.Ide.Gui.Document.Save () [0x00000] in :0
at MonoDevelop.Ide.Gui.Workbench.SaveAll () [0x00000] in :0
at MonoDevelop.Ide.Commands.SaveAllHandler.Run () [0x00000] in :0
at MonoDevelop.Components.Commands.CommandHandler.Run (System.Object dataItem) [0x00000] in :0
at MonoDevelop.Components.Commands.CommandHandler.InternalRun (System.Object dataItem) [0x00000] in :0
at MonoDevelop.Components.Commands.CommandManager.DefaultDispatchCommand (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info, System.Object dataItem, System.Object target, CommandSource source) [0x00000] in :0
at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x00000] in :0
When I trying to add some event for my project's form, I have the same. What does it mean and how can I fix this problem?

You should try to use latest Mono and latest MonoDevelop,
http://pkg-mono.alioth.debian.org/ (3.0.6)
http://monodevelop.com/Download (4.0.8)
MonoDevelop 2.4.* was two years ago,
http://monodevelop.com/Download/MonoDevelop_2.4.2_Released?highlight=2.4+release+notes

Related

Getting "Can't find custom atter constructor image" from a .dll after upgrading to Unity5

I've just upgraded to Unity5 and a small .dll I've made started to give the following error:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
Missing method .ctor in assembly [myproj... .dll], type System.Runtime.Versioning.TargetFrameworkAttribute
The class System.Runtime.Versioning.TargetFrameworkAttribute could not be loaded, used in Logger
Can't find custom attr constructor image: [myproj... .dll]
mtoken: 0x0a00000e
​
The .dll worked perfectly before updating to Unity 5, and I did recompile the .dll with the unity5 version UnityEngine.dll (needed by my library), but that didn't help. Any ideas how to fix this?

Error building Xamarin iOS project

After switching to the unified API, while I try to build an iOS application using Xamarin.iOS, I'm getting an error:
error : Error building target _DetectSigningIdentity: Unknown char
Anyone has an idea how to solve it or understands what causes this error?
This is the detailed trace:
error : Error building target _DetectSigningIdentity: Unknown char
Error building target _DetectSigningIdentity: System.FormatException: Unknown char
at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in :0
at System.Single.Parse (System.String s, IFormatProvider provider) [0x00000] in :0
at Microsoft.Build.BuildEngine.ConditionFactorExpression.NumberEvaluate (Microsoft.Build.BuildEngine.Project context) [0x00000] in :0
at Microsoft.Build.BuildEngine.ConditionRelationalExpression.BoolEvaluate (Microsoft.Build.BuildEngine.Project context) [0x00000] in :0
at Microsoft.Build.BuildEngine.ConditionAndExpression.BoolEvaluate (Microsoft.Build.BuildEngine.Project context) [0x00000] in :0
at Microsoft.Build.BuildEngine.ConditionParser.ParseAndEvaluate (System.String condition, Microsoft.Build.BuildEngine.Project context) [0x00000] in :0
at Microsoft.Build.BuildEngine.TaskBatchingImpl.Execute (IBuildTask buildTask, TaskExecutionMode taskExecutionMode) [0x00000] in :0
at Microsoft.Build.BuildEngine.TaskBatchingImpl.Build (IBuildTask buildTask, TaskExecutionMode taskExecutionMode, System.Boolean& executeOnErrors) [0x00000] in :0
at Microsoft.Build.BuildEngine.TargetBatchingImpl.RunTargetWithBucket (System.Collections.Generic.Dictionary`2 bucket, Microsoft.Build.BuildEngine.Target target, System.Boolean& executeOnErrors) [0x00000] in :0
at Microsoft.Build.BuildEngine.TargetBatchingImpl.Run (Microsoft.Build.BuildEngine.Target target, System.Boolean& executeOnErrors) [0x00000] in :0
at Microsoft.Build.BuildEngine.TargetBatchingImpl.Build (Microsoft.Build.BuildEngine.Target target, System.Boolean& executeOnErrors) [0x00000] in :0
at Microsoft.Build.BuildEngine.Target.DoBuild (System.Boolean& executeOnErrors) [0x00000] in :0

Getting exceptions like object used after being disposed, NullReference while upload to Amazon.S3

I have a code which reads file in stream and uploads it to amazon S3. I used Amazon .net SDK for Monotouch and Mono for Android which internally where Amazon SDK AssemblyVersion("1.5.2.1")
which is working fine.
But sometimes following exceptions are thrown while upload:
Message = The object was used after being disposed.;
StackTrace = at System.Net.WebConnection.BeginWrite (System.Net.HttpWebRequest request, System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback cb, System.Object state) [0x00000] in <filename unknown>:0
at System.Net.WebConnectionStream.BeginWrite (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback cb, System.Object state) [0x00000] in <filename unknown>:0
Message = Object reference not set to an instance of an object;
StackTrace = at System.ServiceModel.Dispatcher.BaseMessagesFormatter.DeserializeReply (System.ServiceModel.Channels.Message message, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Description.OperationDescription od, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0
I've NOT set file stream = null or dispose for file stream being uploaded any where in code.
Found similar problem explained here
the line where I get exception, it tries to upload the given stream to s3.
More detailed explanation http://forums.xamarin.com/discussion/27098/getting-exceptions-like-object-used-after-being-disposed-nullreference-while-upload-to-amazon-s3
Some more stack traces:
--
UploadUsingHighLevelAPI; Message = Object reference not set to an instance of an object;
StackTrace = at System.Xml.XmlInputStream.Initialize (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Xml.XmlInputStream..ctor (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Xml.XmlStreamReader..ctor (System.IO.Stream input) [0x00000] in <filename unknown>:0
at System.Xml.XmlTextReader..ctor (System.IO.Stream input) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.transform (System.String responseBody, System.String actionName, System.Type t) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.processRequestError (System.String actionName, System.Net.HttpWebRequest request, System.Net.WebException we, System.Net.HttpWebResponse errorResponse, System.String requestAddr, System.Net.WebHeaderCollection& respHdrs, System.Type t, System.Exception& cause) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.handleHttpWebErrorResponse (Amazon.S3.Model.S3Request userRequest, System.Net.WebException we, System.Net.HttpWebRequest request, System.Net.HttpWebResponse httpResponse, System.Exception& cause, System.Net.HttpStatusCode& statusCode) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.getResponseCallback[PutObjectResponse] (IAsyncResult result) [0x00000] in <filename unknown>:0
--
UploadUsingHighLevelAPI; Message = Error: SendFailure (Error writing headers);
StackTrace = at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.GetRequestStream () [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.getRequestStreamCallback[PutObjectResponse] (IAsyncResult result) [0x00000] in <filename unknown>:0

How does one set the filename in Monodevelop?

I have recently installed MonoDevelop V3.0.3.2 on Linux Mint 15 MATE 64-bit.
I installed MonoDevelop through the Software Manager
I attempted to create a new project per http://monodevelop.com/Documentation/Creating_A_Simple_Solution
Unfortunately I receive an error on attempting to build that the filename has not been set. Details of error received are as follows.
System.InvalidOperationException: File name has not been set
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
at System.Diagnostics.Process.Start () [0x00000] in <filename unknown>:0
at MonoDevelop.Core.Execution.ProcessWrapper.Start () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) MonoDevelop.Core.Execution.ProcessWrapper:Start ()
at MonoDevelop.Platform.GnomePlatform.StartConsoleProcess (System.String command, System.String arguments, System.String workingDirectory, IDictionary`2 environmentVariables, System.String title, Boolean pauseWhenFinished) [0x00000] in <filename unknown>:0
at MonoDevelop.Core.Execution.ProcessService.StartConsoleProcess (System.String command, System.String arguments, System.String workingDirectory, IDictionary`2 environmentVariables, IConsole console, System.EventHandler exited) [0x00000] in <filename unknown>:0
at MonoDevelop.Debugger.Soft.SoftDebuggerEngine+<CreateDebuggerStartInfo>c__AnonStorey1.<>m__6 (System.Diagnostics.ProcessStartInfo info) [0x00000] in <filename unknown>:0
at Mono.Debugger.Soft.VirtualMachineManager.BeginLaunch (System.Diagnostics.ProcessStartInfo info, System.AsyncCallback callback, Mono.Debugger.Soft.LaunchOptions options) [0x00000] in <filename unknown>:0
at Mono.Debugging.Soft.SoftDebuggerSession.StartLaunching (Mono.Debugging.Soft.SoftDebuggerStartInfo dsi) [0x00000] in <filename unknown>:0 at Mono.Debugging.Soft.SoftDebuggerSession.OnRun (Mono.Debugging.Client.DebuggerStartInfo startInfo) [0x00000] in <filename unknown>:0
at Mono.Debugging.Client.DebuggerSession+<Run>c__AnonStorey6.<>m__3 () [0x00000] in <filename unknown>:0
How does one set the filename in Monodevelop?
EDIT: The Build of the project is working , Problem is occurring when attempting to run the application in the IDE
I had the same issue. I found out that if you install xterm, and restart monodevelop the error will be resolved. Apparently xterm is a dependency. Just go to terminal and "sudo apt-get install xterm".

Embedded mono + app.config

I have embedded mono in a c++ program and loaded a dll which requires an app.config. I am getting this kind of error, does someone have an idea on how to ship *.config with an embedded mono ?
The stack trace :
System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.ArgumentException: The 'ExeConfigFilename' argument cannot be null.
at System.Configuration.ExeConfigurationHost.CheckFileMap (ConfigurationUserLevel level, System.Configuration.ExeConfigurationFileMap map) [0x00000] in <filename unknown>:0
at System.Configuration.ExeConfigurationHost.InitForConfiguration (System.String& locationSubPath, System.String& configPath, System.String& locationConfigPath, IInternalConfigRoot root, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
at System.C[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in <filename unknown>:0
at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0 onfiguration.InternalConfigurationSystem.InitForConfiguration (System.String& locationConfigPath, System.String& parentConfigPath, System.String& parentLocationConfigPath) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in <filename unknown>:0
at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object
Self answer : you can't (as of 2013-04-30). To enable this behaviour, I had to change mono's framework sources mono/mcs/class/corlib/system/appdomain.cs :
public AppDomainSetup SetupInformation {
get {
return SetupInformationNoCopy; // newline
// AppDomainSetup setup = getSetup (); //old
// return new AppDomainSetup (setup); //old
}
}