[
https://issues.apache.org/jira/browse/LUCENE-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560839#action_12560839
]
Michael McCandless commented on LUCENE-1144:
--------------------------------------------
Super, thanks Daniel!
I will commit to trunk & 2.3. This is a low risk fix. Keep testing!!
> 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]