- Home /
Monodevelop fatal error on execution
Running Windows 8.1 64bit, Various versions of Unity (preferably 4.6 or later but not 5), Monodevelop version 4.0.1
Fatal error I receive on startup is as follows:
System.IO.IOException: The file exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
at System.IO.Path.GetTempFileName()
at MonoDevelop.Components.CairoExtensions.LoadImage(Assembly assembly, String resource) in c:\buildslave\monodevelop\build\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Components\CairoExtensions.cs:line 544
at MonoDevelop.Components.MainToolbar.LazyImage.get_Img() in c:\buildslave\monodevelop\build\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Components.MainToolbar\RoundButton.cs:line 45
at MonoDevelop.Components.MainToolbar.LazyImage.op_Implicit(LazyImage lazy) in c:\buildslave\monodevelop\build\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Components.MainToolbar\RoundButton.cs:line 57
at MonoDevelop.Components.MainToolbar.RoundButton.GetIcon() in c:\buildslave\monodevelop\build\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Components.MainToolbar\RoundButton.cs:line 159
at MonoDevelop.Components.MainToolbar.RoundButton.OnExposeEvent(EventExpose evnt) in c:\buildslave\monodevelop\build\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Components.MainToolbar\RoundButton.cs:line 181
at Gtk.Widget.exposeevent_cb(IntPtr widget, IntPtr evnt)
Solutions I have already tried:
Reinstalled and installed unity versions ( 4.3.? through 4.6.? )
Replaced existing glibsharpglue-2.dll with a supposed fix version, which had no effect
Cleaned my C:\Windows\%temp% folder which was a suggested solution in another forum, but had no effect
Installed suggested "new" .NET framework 4.0 and GTK# ( Do not remember which GTK# version I downloaded )
I have checked if Monodevelop is running in the background and at no point is it running when I have not explicitly clicked on the application.
Nothing has had any effect. I usually do not even get the Fatal message; the most often string of events when I attempt to launch Monodevelop is -- splash logo with loading bar, loading bar reaches about two thirds the way to completion, window opens up in project view, and finally window closes.
For me to get the error what-so-ever I had to clean my %temp%, restart my computer and before I do anything else attempt to open Monodevelop it will give me the error for a duration of 60 seconds before ultimately closing itself. If I attempt to open Monodevelop again I will NOT receive the error.
I need unity and monodevelop to work for my college course, and there is no way around that. Any feedback/suggestions/help would be greatly appreciated.
Thank you if you made it through my lengthy question.
Answer by Baste · Mar 18, 2015 at 02:19 PM
Reading through the docs, the error you're seeing is caused by this line of code:
var tmp = System.IO.Path.GetTempFileName ();
on line 539 in this part of MonoDevelop. Note that the code there is slightly different from what you're seeing in Unity, as Unity has it's own branch of MonoDevelop, but I'm assuming that this specific method isn't changed too much.
The IO error is caused, as you can see on the docs for System.IO.Path.GetTempFileName, if either
"it is used to create more than 65535 files without deleting previous temporary files."
or
"if no unique temporary file name is available"
The recommended fix is to "delete all unneeded temporary files".
The temporary files are stored wherever Path.GetTempPath points at. For me, it's the same as %temp%, but it might be that for you there's a disconnect between the two. It should have been full of files before you deleted it the first time (I had 30k files when I checked it now, thanks for reminding me!). I'd open Unity, and put this in a script to figure out where it's pointing at, and deleting everything in that folder:
void Start() {
Debug.Log(System.IO.Path.GetTempPath());
}
The error message "The file exists" is somewhat worrying, as it doesn't reflect any of the listed reasons for an IO error being thrown. It might be that there's a(nother) bug in the Mono Unity's using that's causing the IO system to try to create a file that's already there when you're asking for a temp file.
Honestly, the best fix for anything MonoDevelop-related is to ditch MonoDevelop, as it's a horrible, messy piece of shit software. I keep seing people getting weird start up errors, it's impossible to get it to format the code nicely, the refactoring tools are just not up to par with anything else out there.
Visual Studio Community Edition is free, and works nicely with Unity if you have VS Tools for Unity installed. If you're not on Windows, you might look around for some other, non MD tool.
Thank you. I am going to attempt to check the path where unity/mono is trying to store temp files. If that doesn't work I will give up on this endeavor and just settle with visual studio.
Your answer
Follow this Question
Related Questions
NullReferanceException When Enemy touches Player 2 Answers
Script open help? 1 Answer
Problem with downloaded scripts 0 Answers
weighted inventory system 1 Answer
Flashlight not working after build 0 Answers