Bug 10400 - Resizing a widget results in the designer throwing an error
Summary: Resizing a widget results in the designer throwing an error
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Designer ()
Version: 4.0
Hardware: Macintosh Mac OS
: High normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
: 10993 ()
Depends on:
Blocks:
 
Reported: 2013-02-18 18:53 UTC by Paul Johnson
Modified: 2013-03-26 08:52 UTC (History)
2 users (show)

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


Attachments
Video of bug in action (681.02 KB, application/x-shockwave-flash)
2013-03-22 19:29 UTC, Paul Johnson
Details


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:
VERIFIED FIXED

Description Paul Johnson 2013-02-18 18:53:21 UTC
I have a horizontal linear layout into which I place two buttons. I resize one of the buttons by clicking on one of the edges and dragging. The designer throws this error

System.ArgumentException: Widget is not a child of the canvas
  at Xwt.Canvas.RemoveChild (Xwt.Widget widget) [0x0004c] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/monodevelop/main/external/xwt/Xwt/Xwt/Canvas.cs:161 
  at (wrapper remoting-invoke-with-check) Xwt.Canvas:RemoveChild (Xwt.Widget)
  at Xamarin.Designer.PropertyEditing.PropertyTableRow.UpdateEditor (Xwt.Widget newEditor) [0x0002d] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/Xamarin.Designer/Xamarin.Designer.PropertyEditing/PropertyTable.cs:487 
  at Xamarin.Designer.PropertyEditing.PropertyTable.RefreshRow (Xamarin.Designer.PropertyEditing.PropertyTableRow row) [0x00016] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/Xamarin.Designer/Xamarin.Designer.PropertyEditing/PropertyTable.cs:107 
  at Xamarin.Designer.PropertyEditing.PropertyTable.RefreshRow (System.String propertyName) [0x00013] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/Xamarin.Designer/Xamarin.Designer.PropertyEditing/PropertyTable.cs:91 
  at (wrapper remoting-invoke-with-check) Xamarin.Designer.PropertyEditing.PropertyTable:RefreshRow (string)
  at Xamarin.Designer.DesignerPropertyPanel.HandlePropertyChanged (System.Object sender, Xamarin.Designer.ItemPropertyChangedEventArgs e) [0x00054] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/Xamarin.Designer/Xamarin.Designer/DesignerPropertyPanel.cs:223 
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_ItemPropertyChangedEventArgs (object,Xamarin.Designer.ItemPropertyChangedEventArgs)
  at Xamarin.Designer.DesignerSession.OnPropertyChanged (Xamarin.Designer.DesignerItem item, System.String propName) [0x00021] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/Xamarin.Designer/Xamarin.Designer/DesignerSession.cs:81 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.NotifyPropertyChanged (Xamarin.AndroidDesigner.AndroidDesignerItem item, System.String propName) [0x00000] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:1808 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.EndUpdateItem (System.String parentId, System.String itemId, System.Xml.Linq.XElement itemXml, Boolean internalUpdate, Boolean propagateChanges) [0x000c2] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:2358 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.EndUpdateItem (System.String parentId, System.String itemId, System.Xml.Linq.XElement itemXml) [0x00000] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:2329 
  at (wrapper remoting-invoke-with-check) Xamarin.AndroidDesigner.AndroidDesignerSession:EndUpdateItem (string,string,System.Xml.Linq.XElement)
  at Xamarin.AndroidDesigner.AndroidDesignerItem.SetProperty (System.String name, System.String val) [0x0004b] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerItem.cs:455 
  at Xamarin.AndroidDesigner.VisualItems.ResizeHandle.UpdateProperties (Double dx, Double dy, Boolean commitChanges) [0x00028] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner.VisualItems/ResizeHandle.cs:125 
  at Xamarin.Designer.VisualItems.DraggableHandle.OnButtonReleased (Xwt.ButtonEventArgs args) [0x00030] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/Xamarin.Designer/Xamarin.Designer.VisualItems/DraggableHandle.cs:106 
  at Xamarin.Designer.DesignerSurface.OnButtonReleased (Xwt.ButtonEventArgs args) [0x000c3] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/md-addins/Xamarin.Designer/Xamarin.Designer/DesignerSurface.cs:417 
  at Xwt.Widget+WidgetBackendHost.Xwt.Backends.IWidgetEventSink.OnButtonReleased (Xwt.ButtonEventArgs args) [0x00000] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/monodevelop/main/external/xwt/Xwt/Xwt/Widget.cs:231 
  at Xwt.GtkBackend.WidgetBackend+<HandleButtonReleaseEvent>c__AnonStorey9.<>m__C () [0x00000] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/monodevelop/main/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs:814 
  at Xwt.Engine.Toolkit.Invoke (System.Action a) [0x00005] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/de3690f9/source/monodevelop/main/external/xwt/Xwt/Xwt.Engine/Toolkit.cs:41
Comment 1 Paul Johnson 2013-02-18 18:58:19 UTC
This error is also thrown if I try to add a margin by dragging on a widget. There is no problem if I alter the XML source or add values using the properties window
Comment 2 Lluis Sanchez 2013-03-12 13:22:46 UTC
Can you consistently reproduce this crash? maybe you can make a short screencast? that would be helpful.
Comment 3 Lluis Sanchez 2013-03-12 13:23:12 UTC
*** Bug 10993 has been marked as a duplicate of this bug. ***
Comment 4 Paul Johnson 2013-03-12 13:48:07 UTC
I can reproduce the crash and will do a screencast - need Jing to stop messing me about first though :(
Comment 5 Paul Johnson 2013-03-22 19:28:11 UTC
Apologies for the delay…

File attached showing what is going on
Comment 6 Paul Johnson 2013-03-22 19:29:25 UTC
Created attachment 3684 [details]
Video of bug in action

This is using the most recent Xamarin Studio and latest alpha of monodroid (XS updated 22nd March, Monodroid 21st March)
Comment 7 Lluis Sanchez 2013-03-25 06:49:58 UTC
Finally found the issue. The fix will be included in upcoming releases.
Comment 8 Paul Johnson 2013-03-25 07:05:12 UTC
Out of interest, what was it?
Comment 9 Lluis Sanchez 2013-03-25 07:26:37 UTC
Some cached data was not being properly cleaned up in the property pad when changing the selection. I couldn't reproduce it initially because it depends on which widgets you select and which property pad panel you have visible.
Comment 10 Atin 2013-03-26 08:52:16 UTC
Today we have checked this issue with following builds

Xamarin Studio 4.0.3.13
Xamarin.Android 4.6.02000

And After adding linear layout(horizontal) when we place buttons on that, we are successfully able to resize button.

Changing the status to Verified