Bug 121 - Stetic GTK# designer crashes on Windows
Summary: Stetic GTK# designer crashes on Windows
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: GTK# Designer ()
Version: Trunk
Hardware: PC Windows
: --- major
Target Milestone: 2.8.1
Assignee: Lluis Sanchez
URL:
: 771 1276 1293 ()
Depends on:
Blocks:
 
Reported: 2011-07-30 20:13 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-04-04 16:35 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Mikayla Hutchinson [MSFT] 2011-07-30 20:13:13 UTC
Open CustomCommandWidget in the MD solution using the GUI designer, and you will see the following two messages then a crash:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   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 Stetic.ResizableFixed.ForAll(Boolean include_internals, Callback callback) in c:\Users\Michael\work\monodevelop\main\src\addins\MonoDevelop.GtkCore\libsteticui\WidgetDesignerBackend.cs:line 532
   at Gtk.Container.Forall_cb(IntPtr container, Boolean include_internals, IntPtr cb, IntPtr data)

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Gtk.Widget.gtk_widget_size_request(IntPtr raw, IntPtr requisition)
   at Gtk.Widget.SizeRequest()
   at Stetic.ResizableFixed.OnSizeRequested(Requisition& req) in c:\Users\Michael\work\monodevelop\main\src\addins\MonoDevelop.GtkCore\libsteticui\WidgetDesignerBackend.cs:line 498
   at Gtk.Widget.sizerequested_cb(IntPtr widget, IntPtr requisition)
Comment 1 Mikayla Hutchinson [MSFT] 2011-09-26 10:14:14 UTC
It also crashes if code is regenerated when building in MD.
Comment 2 Mikayla Hutchinson [MSFT] 2011-10-03 16:52:55 UTC
Another issue has been reported with a new GTK# project:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Gtk.Widget.gtk_widget_size_request(IntPtr raw, IntPtr requisition)
at Gtk.Widget.SizeRequest()
at Stetic.Windows.Preview.OnSizeRequested(Requisition& requisition)
at Gtk.Widget.sizerequested_cb(IntPtr widget, IntPtr requisition)
Comment 3 Mikayla Hutchinson [MSFT] 2011-10-05 17:44:36 UTC
*** Bug 1276 has been marked as a duplicate of this bug. ***
Comment 4 Mikayla Hutchinson [MSFT] 2011-10-06 06:34:49 UTC
*** Bug 1293 has been marked as a duplicate of this bug. ***
Comment 5 ziggysquatch 2011-10-06 15:51:11 UTC
Getting the same with the designer on a new GTK# project.
Comment 6 tsebestyen 2011-10-07 06:59:02 UTC
Yesterday I updated my MD installation from 2.6 to 2.8. Since then my MD crashes when I switch to the GUI designer in GTK# projects. With a new GTK# projects it's the same... With the version 2.6 it was OK.
Comment 7 Mikayla Hutchinson [MSFT] 2011-10-07 07:58:06 UTC
The only two commits since 2.6 that seem relevant are:
https://github.com/mono/monodevelop/commit/05169ac73899cfe58ca6252e7614dc20ab8a314c
https://github.com/mono/monodevelop/commit/a7ecf2e24f86575d45f40ceddbb67f93fb28a00f

I reverted them and it seems to work now.
Comment 8 Mikayla Hutchinson [MSFT] 2011-10-07 08:24:44 UTC
Ok, found the problem, it was incorrect use of a calling convention attribute. Fixed in master.
Comment 9 Mikayla Hutchinson [MSFT] 2012-04-04 16:35:10 UTC
*** Bug 771 has been marked as a duplicate of this bug. ***