[Mapguide-trac] [mapguide-trac] #2539: NullReferenceException when copying text from Generic XML editor

MapGuide Open Source trac_mapguide at osgeo.org
Tue Feb 24 07:09:03 PST 2015


#2539: NullReferenceException when copying text from Generic XML editor
-----------------------+----------------------------------------------------
   Reporter:  jng      |       Owner:  jng        
       Type:  defect   |      Status:  new        
   Priority:  low      |   Milestone:  Maestro-6.0
  Component:  Maestro  |     Version:             
   Severity:  trivial  |    Keywords:             
External_id:           |  
-----------------------+----------------------------------------------------
 If you try to copy selected text from the Generic XML editor, it will NRE
 with the following stack trace:

 {{{
 System.NullReferenceException: Object reference not set to an instance of
 an object.
    at ICSharpCode.TextEditor.Util.RtfWriter.BuildFontTable(IDocument doc,
 StringBuilder rtf) in d:\Workspace\maestro-
 trunk\Thirdparty\SharpDevelop\ICSharpCode.TextEditor\Src\Util\RtfWriter.cs:line
 55
    at ICSharpCode.TextEditor.Util.RtfWriter.GenerateRtf(TextArea textArea)
 in d:\Workspace\maestro-
 trunk\Thirdparty\SharpDevelop\ICSharpCode.TextEditor\Src\Util\RtfWriter.cs:line
 33
    at
 ICSharpCode.TextEditor.TextAreaClipboardHandler.CopyTextToClipboard(String
 stringToCopy, Boolean asLine) in d:\Workspace\maestro-
 trunk\Thirdparty\SharpDevelop\ICSharpCode.TextEditor\Src\Gui\TextAreaClipboardHandler.cs:line
 103
    at
 ICSharpCode.TextEditor.TextAreaClipboardHandler.CopyTextToClipboard(String
 stringToCopy) in d:\Workspace\maestro-
 trunk\Thirdparty\SharpDevelop\ICSharpCode.TextEditor\Src\Gui\TextAreaClipboardHandler.cs:line
 142
    at ICSharpCode.TextEditor.TextAreaClipboardHandler.Copy(Object sender,
 EventArgs e) in d:\Workspace\maestro-
 trunk\Thirdparty\SharpDevelop\ICSharpCode.TextEditor\Src\Gui\TextAreaClipboardHandler.cs:line
 178
    at
 Maestro.Editors.Generic.XmlEditorCtrl.copyToolStripMenuItem_Click(Object
 sender, EventArgs e) in d:\Workspace\maestro-
 trunk\Maestro.Editors\Generic\XmlEditorCtrl.cs:line 401
    at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs
 e)
    at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
    at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
 ToolStripItemEventType met)
    at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
 ToolStripItemEventType met)
    at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
    at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
 button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ToolStrip.WndProc(Message& m)
    at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
 m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
 IntPtr wparam, IntPtr lparam)
 }}}

 The copy operation will succeed, but having this NRE thrown is obviously
 undesirable.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/2539>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list