Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.ArgumentException when using the 'messages grouping' tab with a log file that contains custom columns #225

Closed
Numpsy opened this issue Jul 10, 2020 · 1 comment
Assignees
Labels
bug Something isn't working In progress

Comments

@Numpsy
Copy link

Numpsy commented Jul 10, 2020

Describe the bug

I was using the 4.2.3.0 viewer release to view a test Serilog/Clef file and look at the custom columns added by the custom columns feature, and when I tried to use the Messages Grouping tab/feature, I got a message box popup containing

---------------------------
Error
---------------------------
Error: System.ArgumentException: Column 'CustomProperty2' does not belong to table .
   at System.Data.DataRow.GetDataColumn(String columnName)
   at System.Data.DataRow.set_Item(String columnName, Object value)
   at Analogy.Utils.CreateRow(DataTable table, AnalogyLogMessage message, String dataSource, Boolean checkAdditionalInformation) in C:\git\Analogy.LogViewer\Analogy\Utils.cs:line 306
   at Analogy.UCLogs.gridViewGrouping_FocusedRowChanged(Object sender, FocusedRowChangedEventArgs e) in C:\git\Analogy.LogViewer\Analogy\UserControls\UCLogs.cs:line 1995
   at DevExpress.XtraGrid.Views.Base.ColumnView.RaiseFocusedRowChanged(Int32 prevFocused, Int32 focusedRowHandle)
   at DevExpress.XtraGrid.Views.Grid.GridView.RaiseFocusedRowChanged(Int32 prevFocused, Int32 focusedRowHandle)
   at DevExpress.XtraGrid.Views.Base.ColumnView.DoChangeFocusedRowInternal(Int32 newRowHandle, Boolean updateCurrentRow)
   at DevExpress.XtraGrid.Views.Grid.GridView.OnCurrentControllerRowChanged(CurrentRowEventArgs e)
   at DevExpress.Data.BaseGridController.OnCurrentControllerRowChanged()
   at DevExpress.Data.BaseGridController.ResetCurrentPosition()
   at DevExpress.Data.CurrencyDataController.OnDataSourceChanged()
   at DevExpress.Data.CurrencyDataController.SetDataSource(BindingContext context, Object dataSource, String dataMember)
   at DevExpress.XtraGrid.Views.Base.BaseView.SetDataSource(BindingContext context, Object dataSource, String dataMember)
   at DevExpress.XtraGrid.Views.Grid.GridView.SetDataSource(BindingContext context, Object dataSource, String dataMember)
   at DevExpress.XtraGrid.GridControl.ActivateDataSource()
   at DevExpress.XtraGrid.GridControl.set_DataSource(Object value)
   at Analogy.UCLogs.ApplyGrouping() in C:\git\Analogy.LogViewer\Analogy\UserControls\UCLogs.cs:line 1790
   at Analogy.UCLogs.sBtnLength_Click(Object sender, EventArgs e) in C:\git\Analogy.LogViewer\Analogy\UserControls\UCLogs.cs:line 1775
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at DevExpress.XtraEditors.BaseButton.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)
   at DevExpress.XtraEditors.BaseControl.WndProc(Message& msg)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---------------------------
OK   
---------------------------

To Reproduce
Have a Serilog/Clef file containing the JSON from the issue at Analogy-LogViewer/Analogy.LogViewer.Serilog#44

Open that file with the Serilog parser

Switch the view to the 'messages grouping' tab

enter a number in the 'group by text length' box and click 'set length'

Result: A message box about an exception pops up.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):
Windows 10 64-bit

@LiorBanai
Copy link
Member

Oops, I missed that part of the code when adding the new feature.

@LiorBanai LiorBanai self-assigned this Jul 10, 2020
@LiorBanai LiorBanai added bug Something isn't working In progress labels Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working In progress
Projects
None yet
Development

No branches or pull requests

2 participants