MonoDevelop would just crash even though I’m just looking at code and not doing anything to it. I’m using Windows 7 and I even set its compatibility mode to run on Windows XP SP3 but it still crashes.
Does this happen while Unity is in play mode or only after you have done some debugging or anything similar? Or does it just seem to happen at random?
I thought it was just me, it is random on my machine, I have a Toshiba laptop using Windows 7 also. I have had it crash when I click on save, I have had it crash while updating code, even loading from Unity when double clicking on code and it launches then crashes after launch, it is very random, no pattern so I switched back to visual studio and just assumed it was something on my machine.
It happens even though I’m not in play mode. In fact, if I just leave it open and not do anything, it will crash eventually.
Is it possible to set up MonoDevelop development to build straight to whatever Unity uses to edit? That way, we could use the open source to fix the bugs we run into, when we run into them.
also MonoDevelop opening a new instance everytime i double click on a script,
is there a setting so that it only open 1 instance at a time.
Have you done Assets->Sync MonoDevelop Project from within Unity?
same thing here. MonoDevelop crashes almost every time I run my project, sometimes inbetween, after I switched to another window. also using Windows 7, 64 bit
I’ve looked in the bugs database and I’m not sure this specific issue has ever been raised, unless anyone knows better. Please can you file a bug report for it just to be sure (menu: Help > Report A Bug).
Ok, I sent a bug report to Unity about this.
Hi
found a quick solution for everyone having crash problems with monodevelop.
I disabled all debugging addins and since then have not experienced a single crash!
Edit: k, right after posting this I had 2 crashes - but the overall count has decreased a lot
cheers
Re-installed gtk# and selected to repair the install. Mono has worked fine after this action. I am assuming that Windows Updates may cause some conflicts on some machines.
I realize this is an old thread, but I tried a variant of this that seemed to have solved the problem as well. I just uninstalled gtk# entirely from my system, then reinstalled Unity. Looks like there could be some compatibility issues with gtk# on certain systems.
I’d installed another version of Gtk# what made MonoDevelop crash at uncertain points, thanks to this post I realize that.
Uninstalling Gtk# then reinstalling unity made it much much more stable.
But now i can’t launch xamarin studio 4.0… Anyone know of a way to be able to install gtk# and have unity’s monodevelop ignore it?
My Mono doesn’t crash,…but it does have this annoying thing,…when auto filling.
this is with unity4 at work,…with unity3 at home,…no probs.
/shrug
if anyone cares about this who maintains the monodevelop that comes with unity i’ve launched md while binding the console output and this is always what happens prior to crash.
Unhandled Exception:
Unhandled Exception: System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory is corrupt.
at Pango.Attribute.pango_attribute_destroy(IntPtr raw)
at Pango.Attribute.Dispose()
at Pango.Attribute.Finalize()
System.AccessViolationException: Attempted to read or write protected memory. Th
is is often an indication that other memory is corrupt.
at Pango.Layout.pango_layout_get_pixel_size(IntPtr raw, Int32 width, Int32
height)
at Pango.Layout.GetPixelSize(Int32 width, Int32 height)
at MonoDevelop.Ide.CodeCompletion.ListWidget.<>c__DisplayClassc.<OnExposeEven
t>b__b(Category curCategory, Int32 item, Int32 ypos) in c:\BuildAgent\work\f0724
6b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.CodeComple
tion\ListWidget.cs:line 395
at MonoDevelop.Ide.CodeCompletion.ListWidget.Iterate(Boolean startAtPage, Int
32 ypos, CategoryAction catAction, ItemAction action) in c:\BuildAgent\work\f07
246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.CodeComp
letion\ListWidget.cs:line 661
at MonoDevelop.Ide.CodeCompletion.ListWidget.OnExposeEvent(EventExpose args)
in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide
\MonoDevelop.Ide.CodeCompletion\ListWidget.cs:line 360
at Gtk.Widget.exposeevent_cb(IntPtr widget, IntPtr evnt)
at Gtk.Application.gtk_main()
at Gtk.Application.Run()
at MonoDevelop.Ide.IdeApp.Run() in c:\BuildAgent\work\f07246b5212f7be4\monode
velop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\Ide.cs:line 425
at MonoDevelop.Ide.IdeStartup.Run(String[] args) in c:\BuildAgent\work\f07246
b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\IdeStartup.
cs:line 292
at MonoDevelop.Ide.IdeStartup.Main(String[] args) in c:\BuildAgent\work\f0724
6b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\IdeStartup
.cs:line 551
at MonoDevelop.Startup.MonoDevelopMain.Main(String[] args) in c:\BuildAgent\w
ork\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Startup\MonoDevelop.S
tartup\MonoDevelopMain.cs:line 16
Generally happens after 200 keys or so.
I don’t know how reproducable it is… but try installing the latest gtksharp .net, and xamarin studio. i wouldnt be surprised if you ran into the exact same issue.
Indeed nice code hinting. More like code guessing
There is an environment variable “GTK_BASEPATH”; find under
You can edit Environment Variables: Control Panel > Advance System Settings > Advanced (Tab) > Environment Variables
After I installed Xamarin, GTK_BASEPATH was set to "C:\Program Files (x86)\GtkSharp\2.12"
Which I’m pretty sure monodevelop will use instead of the version it comes with (as of Unity 4.1.2f1) in “C:\Program Files (x86)\Unity\MonoDevelop\lib\gtk-sharp-2.0”
So you you could probably delete the environment variable or swap it between "C:\Program Files (x86)\Unity\MonoDevelop\lib" and "C:\Program Files (x86)\GtkSharp\2.12" for unity and Xamarin respectivly.
I’m Also pretty sure that launching Unity With a batch script like:
@echo off
set GTK_BASEPATH=C:\Program Files (x86)\Unity\MonoDevelop\lib\
cmd /k "C:\Program Files (x86)\Unity\Editor\Unity.exe"
Should solve the problem. As this will temporarily change the environment variable for the processes launched by the batch script.
I’ve been having the exact same issues where calls into GTK from within monodevelop would often throw system access violation exception. Following Oddity’s advice I noticed that my GTK_BASEPath variable was also set to "C:\Program Files (x86)\GtkSharp\2.12", however fixing that didn’t resolve the issue on my end.
I’ve got a repro case where whenever I do a large search via find in all files, I can get the lock up with this stack trace every time:
System.AccessViolationException Stack: at
Gtk.Application.gtk_main() at
Gtk.Application.Run() at
MonoDevelop.Ide.IdeApp.Run() at
MonoDevelop.Ide.IdeStartup.Run(System.String[ ]) at
MonoDevelop.Ide.IdeStartup.Main(System.String[ ]) at
MonoDevelop.Startup.MonoDevelopMain.Main(System.String[ ])
No solution found so far. I’ve already tried reinstalling and using newer version of GTK, reinstalling mono develop, reinstalling monodevelop and unity and doing a registry cleanup with CCcleaner in the process, running a few passes of memtest without error, and running a full check on my hard drives via raid for errors. For reference this is using Unity Version 3.5.7f6 (795a449bc926)