dragnilar / Databvase

A (sorta) lightweight query tool for MS Sql Server that makes usage of DevExpress to provide a rich user interface
3 stars 1 forks source link

Clicking Cancel On Text Editor Font Styles From Ribbon Throws Exception In Query Text Editor #1

Closed dragnilar closed 6 years ago

dragnilar commented 6 years ago
  1. Open a query pane and then close it.
  2. Click "Text Editor Font Styles" on the ribbon
  3. Text Editor Font config window appears
  4. Click Cancel
    Result:
    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 Databvase_Winforms.Controls.QueryTextEditor.QueryTextEditor.RegisterSyntaxHighlightingService(Boolean forceExecute) in C:\Users\swhite\source\repos\Databvase-master\Databvase-Winforms\Controls\QueryTextEditor\QueryTextEditor.cs:line 55
    at Databvase_Winforms.Controls.QueryTextEditor.QueryTextEditor.ApplyFontChange() in C:\Users\swhite\source\repos\Databvase-master\Databvase-Winforms\Controls\QueryTextEditor\QueryTextEditor.cs:line 134
    at Databvase_Winforms.Controls.QueryTextEditor.QueryTextEditor.ApplySettingsUpdate(SettingsUpdatedMessage message) in C:\Users\swhite\source\repos\Databvase-master\Databvase-Winforms\Controls\QueryTextEditor\QueryTextEditor.cs:line 127
dragnilar commented 6 years ago

Caused by not null checking the document in the query text editor. This may be a sign of a disposing issue since this seems to be intermittent. Added a TODO to come back to this later.