Hi,

I opened the code, the NPE occurs here:

      if (bytes != null) {
        assert bytesRef != null;
        bytesRef.decrementAndGet(); // <-- LINE 102, NPE occurs here
        bytes = null;
        bytesRef = null;
      } else {
        assert bytesRef == null;
      }

This is completely impossible - can you enable assertions in your running JVM 
to be sure ("-ea:org.apache.lucene..." JVM parameter)? It cannot be a threading 
issue, because all this code is synchronized.

As you reported another issue with your JVM has segmentation faults, could it 
be that you have a buggy JVM. Are you using the official Oracle ones, or is 
this a modified one, e.g. by RedHat? If it is OpenJDK, it is better to use Java 
7, as the Java 6 ones may not behave identical to Oracle's official JDKs and 
may be more buggy.

Can you also post your full JVM version (java -version) and where you got it 
from?

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: Martin Sachs [mailto:martin.sa...@artnology.com]
> Sent: Monday, November 12, 2012 9:43 AM
> To: java-user@lucene.apache.org
> Subject: Re: NPE while decrement ref count
> 
> oh yes i missed the version:
> 
> I'm using lucene 3.6.1
> 
> Martin
> 
> Am 12.11.2012 09:40, schrieb Uwe Schindler:
> > Which Lucene version?
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: u...@thetaphi.de
> >
> >
> >> -----Original Message-----
> >> From: Martin Sachs [mailto:martin.sa...@artnology.com]
> >> Sent: Monday, November 12, 2012 9:18 AM
> >> To: java-user@lucene.apache.org
> >> Subject: NPE while decrement ref count
> >>
> >> Hi ,
> >>
> >> i'm hanging with a NPE Problem. This occurs only on production
> >> environment from day to day.
> >>
> >> Do anyone know some thing about this ?
> >>
> >> java.lang.NullPointerException
> >>         at
> >>
> org.apache.lucene.index.SegmentNorms.decRef(SegmentNorms.java:102)
> >>         at
> >>
> org.apache.lucene.index.SegmentReader.doClose(SegmentReader.java:394)
> >>         at
> org.apache.lucene.index.IndexReader.decRef(IndexReader.java:222)
> >>         at
> >> org.apache.lucene.index.DirectoryReader.doClose(DirectoryReader.java:
> >> 904
> >> )
> >>         at
> >> org.apache.lucene.index.IndexReader.decRef(IndexReader.java:222)
> >>
> >>
> >> Martin
> >>
> >> --
> >> ** Dipl. Inform. Martin Sachs
> >> ** Senior Software-Developer / Software-Architect T  +49 (30) 443 50
> >> 99 - 33 F  +49 (30) 443 50 99 - 99 E  martin.sa...@artnology.com
> >>  Google+: martin.sachs.artnol...@gmail.com
> >>    skype: m____s
> >>
> >> ** artnology GmbH
> >> A  Milastraße 4 / D-10437 Berlin
> >> T  +49 (30) 443 50 99 - 0
> >> F  +49 (30) 443 50 99 - 99
> >> E  i...@artnology.com
> >> I  http://www.artnology.com
> >>
> >> Geschäftsführer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
> >> Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 UST-Id.
> >> DE
> >> 217652550
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> > For additional commands, e-mail: java-user-h...@lucene.apache.org
> >
> >
> 
> 
> --
> ** Dipl. Inform. Martin Sachs
> ** Senior Software-Developer / Software-Architect T  +49 (30) 443 50 99 - 33
> F  +49 (30) 443 50 99 - 99 E  martin.sa...@artnology.com
>  Google+: martin.sachs.artnol...@gmail.com
>    skype: m____s
> 
> ** artnology GmbH
> A  Milastraße 4 / D-10437 Berlin
> T  +49 (30) 443 50 99 - 0
> F  +49 (30) 443 50 99 - 99
> E  i...@artnology.com
> I  http://www.artnology.com
> 
> Geschäftsführer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
> Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 UST-Id. DE
> 217652550
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to