lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Glick (Created) (JIRA)" <>
Subject [jira] [Created] (LUCENE-3567) NPE from SegmentTermDocs.<init> from SegmentReader.termDocs
Date Mon, 07 Nov 2011 17:52:51 GMT
NPE from SegmentTermDocs.<init> from SegmentReader.termDocs

                 Key: LUCENE-3567
             Project: Lucene - Java
          Issue Type: Bug
          Components: core/index
    Affects Versions: 3.0.3
         Environment: various OS and JRE combos:
            Reporter: Jesse Glick

Occasionally NetBeans IDE users receive an NPE from Lucene 3.0.3 inside Maven Indexer (currently
4.1.2) code:

	at org.apache.lucene.index.SegmentTermDocs.<init>(
	at org.apache.lucene.index.SegmentReader.termDocs(
	at org.apache.lucene.index.IndexReader.termDocs(
	at org.apache.lucene.index.SegmentReader.termDocs(
	at org.apache.maven.index.DefaultIndexerEngine.getOldDocument(

Working backwards, {{parent.core.getTermsReader()}} is null, which means {{SegmentReaders.CoreReaders.decRef}}
was called, which means {{SegmentReader.doClose}} was called, which means {{IndexReader.doClose}}
was called, which I suppose means something called {{IndexReader.decRef}} prematurely. But
plenty of things can call {{IndexReader.decRef}} and it is not clear how to track down the
root cause.

Note that {{SegmentReader.termDocs}} first calls {{ensureOpen()}}, which is presumably supposed
to ensure that {{decRef}} had not been called too many times; perhaps this assertion did not

Downstream bug, for reference:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message