Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-554

Crash using the search function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Incomplete
    • Lucene.Net 3.0.3
    • None
    • .NET API, Lucene.Net Core
    • .NET 4.5.3

    Description

      I can repeat the crash with with the following code:

      Document.Add(new NumericField("TimeStamp", Field.Store.YES, true).SetLongValue(Data.TimeStamp.ToBinary()));
      

      And I have the following query:

      var Sort = new Sort(new SortField("TimeStamp", SortField.LONG, true));
              var ParsedQuery = ParseQuery(_Parser, SearchQuery);
              var Filter = new QueryWrapperFilter(ParsedQuery);
              var Hits = _Searcher.Search(ParsedQuery, Filter, Skip + Limit, Sort);
      

      But it crashes when executing the search method with the following:

      A first chance exception of type 'Lucene.Net.QueryParsers.QueryParser.LookaheadSuccess' occurred in Lucene.Net.dll
      
      
      A first chance exception of type 'System.IO.IOException' occurred in Lucene.Net.dll
      A first chance exception of type 'System.IO.IOException' occurred in Lucene.Net.dll
      A first chance exception of type 'System.AccessViolationException' occurred in HDIndexing.dll
      Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
      

      The weird thing is that when executing this code:

      var Hits = _Searcher.Search(ParsedQuery, null, Skip + Limit, Sort.RELEVANCE);
      var SortSetting = Sort.RELEVANCE;
      var Hits0 = _Searcher.Search(ParsedQuery, null, Skip + Limit, SortSetting);
      

      The first call doesn't crash, but the second one does.
      When looking at the disassembly, the crash happens when calling the search method (http://imgur.com/MFmAwzC).

      I made a video illustrating the problem: http://imgur.com/NGyFRdS

      Attachments

        Activity

          People

            Unassigned Unassigned
            thomasd3 Thomas D
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: