[ 
https://issues.apache.org/jira/browse/LUCENE-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-1144:
---------------------------------------

    Attachment: LUCENE-1144.patch

Indeed, it looks likely that you hit OOM, then DocumentsWriter is
trying to abort, but hits the NPE while aborting.  Can you try the
attached patch to see if it lets you see the original OOM exception?


> NPE crash in case of out of memory
> ----------------------------------
>
>                 Key: LUCENE-1144
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1144
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.3
>            Reporter: Daniel Naber
>         Attachments: LUCENE-1144.patch, LuceneCrash.java
>
>
> The attached class makes Lucene crash with an NPE when starting it with 
> -Xmx10M, although there's probably an OutOfMemory problem. The stacktrace:
> Exception in thread "main" java.lang.NullPointerException
>       at java.util.Arrays.fill(Unknown Source)
>       at 
> org.apache.lucene.index.DocumentsWriter$ByteBlockPool.reset(DocumentsWriter.java:2873)
>       at 
> org.apache.lucene.index.DocumentsWriter$ThreadState.resetPostings(DocumentsWriter.java:637)
>       at 
> org.apache.lucene.index.DocumentsWriter.resetPostingsData(DocumentsWriter.java:458)
>       at 
> org.apache.lucene.index.DocumentsWriter.abort(DocumentsWriter.java:423)
>       at 
> org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:2433)
>       at 
> org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:2397)
>       at 
> org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1445)
>       at 
> org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1424)
>       at LuceneCrash.myrun(LuceneCrash.java:32)
>       at LuceneCrash.main(LuceneCrash.java:19)
> The documents are quite big (some hundred KB each), I cannot attach them but 
> I can send them via private mail if needed. The crash happens the first time 
> reset() is called, after indexing 10 documents. I assume the bug is just that 
> the error is misleading, there maybe should be an OOM error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to