Bug 11832 - Crash in designer when undoing
Summary: Crash in designer when undoing
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 4.8.x
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
: 14486 ()
Depends on:
Blocks:
 
Reported: 2013-04-17 15:19 UTC by Chris Hamons
Modified: 2014-01-21 07:02 UTC (History)
5 users (show)

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


Attachments
Project (15.06 KB, application/zip)
2013-04-17 15:20 UTC, Chris Hamons
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 Chris Hamons 2013-04-17 15:19:38 UTC
Unable to find a good steps to reproduce, I attached my project anyway.  

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.AndroidDesigner.AndroidDesignerSession+UndoInsertChild.OnUndo (Xamarin.AndroidDesigner.AndroidDesignerSession session) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/UndoAction.cs:123 
  at Xamarin.AndroidDesigner.AndroidDesignerSession+UndoAction.Undo (Xamarin.AndroidDesigner.AndroidDesignerSession session) [0x0002c] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/UndoAction.cs:53 
  at Xamarin.AndroidDesigner.AndroidDesignerSession+UndoActionGroup.OnUndo (Xamarin.AndroidDesigner.AndroidDesignerSession session) [0x00019] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/UndoAction.cs:104 
  at Xamarin.AndroidDesigner.AndroidDesignerSession+UndoAction.Undo (Xamarin.AndroidDesigner.AndroidDesignerSession session) [0x0002c] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/UndoAction.cs:53 
  at Xamarin.AndroidDesigner.AndroidDesignerSession.Undo () [0x00024] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/AndroidDesignerSession.cs:2475 
  at (wrapper remoting-invoke-with-check) Xamarin.AndroidDesigner.AndroidDesignerSession:Undo ()
  at Xamarin.AndroidDesigner.DesignerWidget.Undo () [0x00000] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/DesignerWidget.cs:290 
  at (wrapper remoting-invoke-with-check) Xamarin.AndroidDesigner.DesignerWidget:Undo ()
  at MonoDevelop.MonoDroid.Gui.AndroidDesignerView.Undo () [0x00000] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/md-addins/MonoDevelop.MonoDroid/MonoDevelop.MonoDroid/Gui/AndroidDesignerView.cs:348 
  at MonoDevelop.Ide.Gui.ViewCommandHandlers.OnUndo () [0x0000d] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs:109 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Reflection/MonoMethod.cs:230 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Reflection/MonoMethod.cs:238 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Reflection/MethodBase.cs:114 
  at MonoDevelop.Components.Commands.CommandHandlerInfo.Run (System.Object cmdTarget, MonoDevelop.Components.Commands.Command cmd) [0x00029] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1922 
  at MonoDevelop.Components.Commands.CommandManager+<DispatchCommand>c__AnonStorey73.<>m__C7 () [0x0003d] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1045 
  at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x0029e] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1062
Comment 1 Chris Hamons 2013-04-17 15:20:06 UTC
Created attachment 3825 [details]
Project
Comment 2 Miguel de Icaza [MSFT] 2013-07-26 14:14:22 UTC
Lluis, any updates on this one?
Comment 3 Lluis Sanchez 2013-10-24 12:47:28 UTC
*** Bug 14486 has been marked as a duplicate of this bug. ***
Comment 4 Lluis Sanchez 2013-10-24 12:48:12 UTC
The bug has been fixed and the fix will be included in upcoming releases.
Comment 5 Lluis Sanchez 2013-10-25 05:30:18 UTC
Fixed. The fix will be included in Xamarin Studio 4.1.13 and Xamarin.Android 4.10.1.
Comment 6 Saurabh 2014-01-21 07:02:35 UTC
We have checked this issue with latest master builds:

XS 4.2.3 (build 146) 
Git revision: 76e7c7f6ca0e59052f2bb29f8179313510977377
Xamarin addins: cc120a6f639fa6649aa4d23a0f0e7c5701134047

mono-android-4.13.0-36(Master for Mac)

Now, after making a number of changes we attempted to Undo and Redo by pressing ctrl+z and ctrl-shift-z respectively a number of times, but now XS does not crash. 

Screencast: http://screencast.com/t/dEgWhzUdk

Hence, closing this issue.