I'm not sure if editing properties in sandbox mode is supported, but here it is:
In sandbox mode, editing a string property in the Object Editor will crash Dualitor, if the former value was null.
How to reproduce
Create a simple component with a non pre-initialized string property.
[Edit] ERR: NullReferenceException: Object reference not set to an instance of an object.
CallStack:
at AdamsLair.WinForms.PropertyEditing.Templates.StringEditorTemplate.get_SelectedAll()
at AdamsLair.WinForms.PropertyEditing.Templates.StringEditorTemplate.set_Text(String value)
at AdamsLair.WinForms.PropertyEditing.Editors.StringPropertyEditor.OnGetValue()
at AdamsLair.WinForms.PropertyEditing.PropertyEditor.PerformGetValue()
at AdamsLair.WinForms.PropertyEditing.MemberwisePropertyEditor.OnGetValue()
at AdamsLair.WinForms.PropertyEditing.PropertyEditor.PerformGetValue()
at Duality.Editor.Plugins.Base.PropertyEditors.GameObjectOverviewPropertyEditor.OnGetValue() in F:\GameDevelopment\Duality\source\duality\Source\Plugins\EditorBase\PropertyEditors\GameObjectOverviewPropertyEditor.cs:line 67
at AdamsLair.WinForms.PropertyEditing.PropertyEditor.PerformGetValue()
at AdamsLair.WinForms.PropertyEditing.PropertyGrid.UpdateFromObjects(Int32 scheduleMs)
at Duality.Editor.Plugins.ObjectInspector.ObjectInspector.EditorForm_AfterUpdateDualityApp(Object sender, EventArgs e) in F:\GameDevelopment\Duality\source\duality\Source\Plugins\EditorModules\ObjectInspector\Modules\ObjectInspector.cs:line 173
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Duality.Editor.DualityEditorApp.OnUpdatingEngine() in F:\GameDevelopment\Duality\source\duality\Source\Editor\DualityEditor\DualityEditorApp.cs:line 1111
at Duality.Editor.DualityEditorApp.Application_Idle(Object sender, EventArgs e) in F:\GameDevelopment\Duality\source\duality\Source\Editor\DualityEditor\DualityEditorApp.cs:line 1292
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Duality.Editor.Program.Main(String[] args) in F:\GameDevelopment\Duality\source\duality\Source\Editor\DualityEditor\Program.cs:line 125
Summary
I'm not sure if editing properties in sandbox mode is supported, but here it is: In sandbox mode, editing a
string
property in the Object Editor will crash Dualitor, if the former value wasnull
.How to reproduce
string
property.Workaround
Fix
null
check here.Attachments