AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.4k stars 290 forks source link

Cannot edit Component's string property in sandbox mode #524

Closed mfep closed 7 years ago

mfep commented 7 years ago

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 was null.

How to reproduce

Workaround

Fix

Attachments

[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
ilexp commented 7 years ago

That's definitely a bug.

Merged your PR, updated dependencies and triggered a new binary release. Check for updates in about 15 minutes. Should be fixed after that.

Thanks! 👍