Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

MonoDevelop keeps on crashing

Discussion in 'Editor & General Support' started by AnomalusUndrdog, Sep 29, 2010.

  1. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,543
    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.
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    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?
     
  3. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    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.
     
    LaserWzzrd likes this.
  4. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,543
    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.
     
    LaserWzzrd likes this.
  5. jwatte

    jwatte

    Joined:
    Sep 14, 2009
    Posts:
    6
    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.
     
  6. desmasic

    desmasic

    Joined:
    Dec 6, 2007
    Posts:
    82
    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.
     
  7. Anim

    Anim

    Joined:
    Aug 11, 2008
    Posts:
    289
    Have you done Assets->Sync MonoDevelop Project from within Unity?
     
  8. Slarti

    Slarti

    Joined:
    Nov 8, 2009
    Posts:
    22
    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
     
    LaserWzzrd likes this.
  9. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    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).
     
  10. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,543
    Ok, I sent a bug report to Unity about this.
     
    LaserWzzrd likes this.
  11. Slarti

    Slarti

    Joined:
    Nov 8, 2009
    Posts:
    22
    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
     
    Last edited: Oct 23, 2010
  12. Lynyrd

    Lynyrd

    Joined:
    Nov 10, 2012
    Posts:
    1
    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.
     
  13. tsev04

    tsev04

    Joined:
    Feb 24, 2013
    Posts:
    5
    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.
     
  14. mateiasu

    mateiasu

    Joined:
    Mar 11, 2013
    Posts:
    25
    I'd installed another version of Gtk# what made MonoDevelop crash at uncertain points, thanks to this post I realize that. :D
     
    Last edited: Mar 16, 2013
  15. bdev

    bdev

    Joined:
    Jan 4, 2011
    Posts:
    656
    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?
     
  16. welby

    welby

    Joined:
    Mar 22, 2011
    Posts:
    549
    My Mono doesn't crash,..but it does have this annoying thing,...when auto filling.

    $monoBleh_zps19bafaa3.jpg


    this is with unity4 at work,...with unity3 at home,..no probs.

    /shrug
     
  17. bdev

    bdev

    Joined:
    Jan 4, 2011
    Posts:
    656
    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.
    Code (csharp):
    1. Unhandled Exception:
    2. Unhandled Exception: System.AccessViolationException: Attempted to read or write
    3.  protected memory. This is often an indication that other memory is corrupt.
    4.    at Pango.Attribute.pango_attribute_destroy(IntPtr raw)
    5.    at Pango.Attribute.Dispose()
    6.    at Pango.Attribute.Finalize()
    7. System.AccessViolationException: Attempted to read or write protected memory. Th
    8. is is often an indication that other memory is corrupt.
    9.    at Pango.Layout.pango_layout_get_pixel_size(IntPtr raw, Int32 width, Int32
    10. height)
    11.    at Pango.Layout.GetPixelSize(Int32 width, Int32 height)
    12.    at MonoDevelop.Ide.CodeCompletion.ListWidget.<>c__DisplayClassc.<OnExposeEven
    13. t>b__b(Category curCategory, Int32 item, Int32 ypos) in c:\BuildAgent\work\f0724
    14. 6b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.CodeComple
    15. tion\ListWidget.cs:line 395
    16.    at MonoDevelop.Ide.CodeCompletion.ListWidget.Iterate(Boolean startAtPage, Int
    17. 32 ypos, CategoryAction catAction, ItemAction action) in c:\BuildAgent\work\f07
    18. 246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.CodeComp
    19. letion\ListWidget.cs:line 661
    20.    at MonoDevelop.Ide.CodeCompletion.ListWidget.OnExposeEvent(EventExpose args)
    21. in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide
    22. \MonoDevelop.Ide.CodeCompletion\ListWidget.cs:line 360
    23.    at Gtk.Widget.exposeevent_cb(IntPtr widget, IntPtr evnt)
    24.    at Gtk.Application.gtk_main()
    25.    at Gtk.Application.Run()
    26.    at MonoDevelop.Ide.IdeApp.Run() in c:\BuildAgent\work\f07246b5212f7be4\monode
    27. velop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\Ide.cs:line 425
    28.    at MonoDevelop.Ide.IdeStartup.Run(String[] args) in c:\BuildAgent\work\f07246
    29. b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\IdeStartup.
    30. cs:line 292
    31.    at MonoDevelop.Ide.IdeStartup.Main(String[] args) in c:\BuildAgent\work\f0724
    32. 6b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\IdeStartup
    33. .cs:line 551
    34.    at MonoDevelop.Startup.MonoDevelopMain.Main(String[] args) in c:\BuildAgent\w
    35. ork\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Startup\MonoDevelop.S
    36. 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.
     
  18. mateiasu

    mateiasu

    Joined:
    Mar 11, 2013
    Posts:
    25

    Indeed nice code hinting. More like code guessing :D
     
  19. Oddity

    Oddity

    Joined:
    May 12, 2013
    Posts:
    1
    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:
    Code (csharp):
    1. @echo off
    2. set GTK_BASEPATH=C:\Program Files (x86)\Unity\MonoDevelop\lib\
    3. 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.
     
    Last edited: May 16, 2013
  20. AlexBoyd

    AlexBoyd

    Joined:
    May 16, 2013
    Posts:
    1
    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)
     
  21. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    528
    monodevelope is always crashing when i try to open a second script
     
    taranggodhari likes this.