Doesn't handle invalid regex

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Doesn't handle invalid regex

Vladimirs
Log4view crashes when filter with invalid regex created:

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

parsing "(a)|([b)" - Unterminated [] set.

************** Exception Text **************
System.ArgumentException: parsing "(a)|([b)" - Unterminated [] set.
   at System.Text.RegularExpressions.RegexParser.ScanCharClass(Boolean caseInsensitive, Boolean scanOnly)
   at System.Text.RegularExpressions.RegexParser.CountCaptures()
   at System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
   at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, Boolean useCache)
   at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options)
   at Prosa.Log4View.Filter.TextFilter.MatchesExpression(String text)
   at Prosa.Log4View.Filter.TextFilter.MatchesCriteria(LogMessage msg)
   at Prosa.Log4View.Filter.FilterCtrl.gridView1_RowStyle(Object sender, RowStyleEventArgs e)
   at DevExpress.XtraGrid.Views.Grid.GridView.RaiseGetRowStyle(Int32 rowHandle, GridRowCellState state, AppearanceObject appearance, Boolean& highPriority)
   at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.GetRowMixAppearances(GridCellInfo cellInfo, GridRowCellState state, GridRowInfo bi, AppearanceObjectEx column, AppearanceObject focusedCell, AppearanceObjectEx conditionCell)
   at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.GetRowAppearance(GridRowInfo ri, AppearanceObject appearance, GridRowCellState state)
   at DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawRow(GridViewDrawArgs e, GridRowInfo ri)
   at DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawRows(GridViewDrawArgs e)
   at DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawContents(GridViewDrawArgs e)
   at DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.Draw(ViewDrawArgs ee)
   at DevExpress.XtraGrid.Views.Base.BaseView.Draw(GraphicsCache e)
   at DevExpress.XtraGrid.GridControl.OnPaint(PaintEventArgs e)
   at DevExpress.Utils.Drawing.ControlPaintHelper.ProcessWMPaint(Message& m)
   at DevExpress.XtraGrid.GridControl.CheckProcessMsg(Message& m)
   at DevExpress.XtraGrid.GridControl.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Reply | Threaded
Open this post in threaded view
|

Re: Doesn't handle invalid regex

Philipp Lauchner
Administrator
Dear Vladimirs,

We just released a new version 12.5.13 with this error fixed.

Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support