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

NullReferenceException in ThreadLocal when Lucene.Net compiled for .Net 2.0

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Lucene.Net 2.9.4g
    • Fix Version/s: Lucene.Net 3.0.3
    • Component/s: Lucene.Net Core
    • Labels:
      None
    • Environment:

      .Net 2.0

      Description

      A NullReferenceException occurs in Lucene.Net.Util.ThreadLocal. This class is only included when Lucene is compiled for .Net 2.0.

      The cause is that the threadstatic "slots" variable is lazily-initialized, but there is no null-check in the dispose.

        Attachments

        1. CloseableThreadLocal.cs.patch
          0.4 kB
          Andrew Sampson

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              malesh Andrew Sampson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: