Lucene.Net
  1. Lucene.Net
  2. LUCENENET-477

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major 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.

        Activity

        Christopher Currens made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s Lucene.Net 3.0.3 [ 12316215 ]
        Resolution Fixed [ 1 ]
        Hide
        Christopher Currens added a comment -

        Thanks for the patch. It's been applied to trunk for version 3.0.3.

        Show
        Christopher Currens added a comment - Thanks for the patch. It's been applied to trunk for version 3.0.3.
        Andrew Sampson made changes -
        Field Original Value New Value
        Attachment CloseableThreadLocal.cs.patch [ 12519412 ]
        Hide
        Andrew Sampson added a comment -

        fixes nullReferenceException in ThreadLocal class under .net 2

        Show
        Andrew Sampson added a comment - fixes nullReferenceException in ThreadLocal class under .net 2
        Andrew Sampson created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development