You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Ken Katzgrau (JIRA)" <ji...@apache.org> on 2008/07/10 19:02:31 UTC
[jira] Created: (LUCENENET-125) Lucene 2.3.1(a?) - Unhandled
System.NullReferenceException In
Lucene.Net.Index.DocumentsWriter.CompareText
Lucene 2.3.1(a?) - Unhandled System.NullReferenceException In Lucene.Net.Index.DocumentsWriter.CompareText
-----------------------------------------------------------------------------------------------------------
Key: LUCENENET-125
URL: https://issues.apache.org/jira/browse/LUCENENET-125
Project: Lucene.Net
Issue Type: Bug
Environment: Microsoft Visual Studio 2005, XP Pro
Reporter: Ken Katzgrau
When creating a test index of a 1,000,000 documents, I encountered a null reference exception originating from the document writer approximately every 80,000 documents. The code producing this error is:
class Program
{
static void Main(string[] args)
{
IndexWriter iw = new IndexWriter(@"C:\TestIndex", new WhitespaceAnalyzer(), true);
Document d;
Field f;
for (int i = 0; i < 100000; i++)
{
if (i % 10000 == 0) Console.WriteLine("Doc: " + i);
d = new Document();
f = new Field("Field1", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
d.Add(f);
f = new Field("Field2", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
d.Add(f);
iw.AddDocument(d); *Exception occurs here
}
Console.WriteLine(iw.DocCount());
Console.ReadKey();
iw.Close(); *If the exception is caught, the IndexWriter iw becomes null
}
}
The exception is:
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Lucene.Net"
StackTrace:
at Lucene.Net.Index.DocumentsWriter.CompareText(Char[] text1, Int32 pos1, Char[] text2, Int32 pos2)
at Lucene.Net.Index.DocumentsWriter.AppendPostings(FieldData[] fields, TermInfosWriter termsOut, IndexOutput freqOut, IndexOutput proxOut)
at Lucene.Net.Index.DocumentsWriter.WriteSegment()
at Lucene.Net.Index.DocumentsWriter.Flush(Boolean closeDocStore)
at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores)
at Lucene.Net.Index.IndexWriter.Flush(Boolean triggerMerge, Boolean flushDocStores)
at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer)
at Lucene.Net.Index.IndexWriter.AddDocument(Document doc)
-- Line Removed --
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
RE: [jira] Created: (LUCENENET-125) Lucene 2.3.1(a?) - Unhandled System.NullReferenceException In Lucene.Net.Index.DocumentsWriter.CompareText
Posted by Digy <di...@gmail.com>.
I think this is the same bug as in http://issues.apache.org/jira/browse/LUCENENET-117 .
Can you try the patch?
DIGY
-----Original Message-----
From: Ken Katzgrau (JIRA) [mailto:jira@apache.org]
Sent: Thursday, July 10, 2008 8:03 PM
To: lucene-net-dev@incubator.apache.org
Subject: [jira] Created: (LUCENENET-125) Lucene 2.3.1(a?) - Unhandled System.NullReferenceException In Lucene.Net.Index.DocumentsWriter.CompareText
Lucene 2.3.1(a?) - Unhandled System.NullReferenceException In Lucene.Net.Index.DocumentsWriter.CompareText
-----------------------------------------------------------------------------------------------------------
Key: LUCENENET-125
URL: https://issues.apache.org/jira/browse/LUCENENET-125
Project: Lucene.Net
Issue Type: Bug
Environment: Microsoft Visual Studio 2005, XP Pro
Reporter: Ken Katzgrau
When creating a test index of a 1,000,000 documents, I encountered a null reference exception originating from the document writer approximately every 80,000 documents. The code producing this error is:
class Program
{
static void Main(string[] args)
{
IndexWriter iw = new IndexWriter(@"C:\TestIndex", new WhitespaceAnalyzer(), true);
Document d;
Field f;
for (int i = 0; i < 100000; i++)
{
if (i % 10000 == 0) Console.WriteLine("Doc: " + i);
d = new Document();
f = new Field("Field1", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
d.Add(f);
f = new Field("Field2", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
d.Add(f);
iw.AddDocument(d); *Exception occurs here
}
Console.WriteLine(iw.DocCount());
Console.ReadKey();
iw.Close(); *If the exception is caught, the IndexWriter iw becomes null
}
}
The exception is:
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Lucene.Net"
StackTrace:
at Lucene.Net.Index.DocumentsWriter.CompareText(Char[] text1, Int32 pos1, Char[] text2, Int32 pos2)
at Lucene.Net.Index.DocumentsWriter.AppendPostings(FieldData[] fields, TermInfosWriter termsOut, IndexOutput freqOut, IndexOutput proxOut)
at Lucene.Net.Index.DocumentsWriter.WriteSegment()
at Lucene.Net.Index.DocumentsWriter.Flush(Boolean closeDocStore)
at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores)
at Lucene.Net.Index.IndexWriter.Flush(Boolean triggerMerge, Boolean flushDocStores)
at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer)
at Lucene.Net.Index.IndexWriter.AddDocument(Document doc)
-- Line Removed --
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (LUCENENET-125) Lucene 2.3.1(a?) - Unhandled
System.NullReferenceException In
Lucene.Net.Index.DocumentsWriter.CompareText
Posted by "Ken Katzgrau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ken Katzgrau closed LUCENENET-125.
----------------------------------
Resolution: Duplicate
Issue noted in LUCENENET-117.
> Lucene 2.3.1(a?) - Unhandled System.NullReferenceException In Lucene.Net.Index.DocumentsWriter.CompareText
> -----------------------------------------------------------------------------------------------------------
>
> Key: LUCENENET-125
> URL: https://issues.apache.org/jira/browse/LUCENENET-125
> Project: Lucene.Net
> Issue Type: Bug
> Environment: Microsoft Visual Studio 2005, XP Pro
> Reporter: Ken Katzgrau
>
> When creating a test index of a 1,000,000 documents, I encountered a null reference exception originating from the document writer approximately every 80,000 documents. The code producing this error is:
> class Program
> {
> static void Main(string[] args)
> {
> IndexWriter iw = new IndexWriter(@"C:\TestIndex", new WhitespaceAnalyzer(), true);
> Document d;
> Field f;
> for (int i = 0; i < 100000; i++)
> {
> if (i % 10000 == 0) Console.WriteLine("Doc: " + i);
> d = new Document();
> f = new Field("Field1", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
> d.Add(f);
> f = new Field("Field2", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
> d.Add(f);
> iw.AddDocument(d); *Exception occurs here
> }
> Console.WriteLine(iw.DocCount());
> Console.ReadKey();
> iw.Close(); *If the exception is caught, the IndexWriter iw becomes null
> }
> }
> The exception is:
> System.NullReferenceException was unhandled
> Message="Object reference not set to an instance of an object."
> Source="Lucene.Net"
> StackTrace:
> at Lucene.Net.Index.DocumentsWriter.CompareText(Char[] text1, Int32 pos1, Char[] text2, Int32 pos2)
> at Lucene.Net.Index.DocumentsWriter.AppendPostings(FieldData[] fields, TermInfosWriter termsOut, IndexOutput freqOut, IndexOutput proxOut)
> at Lucene.Net.Index.DocumentsWriter.WriteSegment()
> at Lucene.Net.Index.DocumentsWriter.Flush(Boolean closeDocStore)
> at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores)
> at Lucene.Net.Index.IndexWriter.Flush(Boolean triggerMerge, Boolean flushDocStores)
> at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer)
> at Lucene.Net.Index.IndexWriter.AddDocument(Document doc)
> -- Line Removed --
> at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-125) Lucene 2.3.1(a?) - Unhandled
System.NullReferenceException In
Lucene.Net.Index.DocumentsWriter.CompareText
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612978#action_12612978 ]
Digy commented on LUCENENET-125:
--------------------------------
http://issues.apache.org/jira/browse/LUCENENET-117
> Lucene 2.3.1(a?) - Unhandled System.NullReferenceException In Lucene.Net.Index.DocumentsWriter.CompareText
> -----------------------------------------------------------------------------------------------------------
>
> Key: LUCENENET-125
> URL: https://issues.apache.org/jira/browse/LUCENENET-125
> Project: Lucene.Net
> Issue Type: Bug
> Environment: Microsoft Visual Studio 2005, XP Pro
> Reporter: Ken Katzgrau
>
> When creating a test index of a 1,000,000 documents, I encountered a null reference exception originating from the document writer approximately every 80,000 documents. The code producing this error is:
> class Program
> {
> static void Main(string[] args)
> {
> IndexWriter iw = new IndexWriter(@"C:\TestIndex", new WhitespaceAnalyzer(), true);
> Document d;
> Field f;
> for (int i = 0; i < 100000; i++)
> {
> if (i % 10000 == 0) Console.WriteLine("Doc: " + i);
> d = new Document();
> f = new Field("Field1", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
> d.Add(f);
> f = new Field("Field2", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
> d.Add(f);
> iw.AddDocument(d); *Exception occurs here
> }
> Console.WriteLine(iw.DocCount());
> Console.ReadKey();
> iw.Close(); *If the exception is caught, the IndexWriter iw becomes null
> }
> }
> The exception is:
> System.NullReferenceException was unhandled
> Message="Object reference not set to an instance of an object."
> Source="Lucene.Net"
> StackTrace:
> at Lucene.Net.Index.DocumentsWriter.CompareText(Char[] text1, Int32 pos1, Char[] text2, Int32 pos2)
> at Lucene.Net.Index.DocumentsWriter.AppendPostings(FieldData[] fields, TermInfosWriter termsOut, IndexOutput freqOut, IndexOutput proxOut)
> at Lucene.Net.Index.DocumentsWriter.WriteSegment()
> at Lucene.Net.Index.DocumentsWriter.Flush(Boolean closeDocStore)
> at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores)
> at Lucene.Net.Index.IndexWriter.Flush(Boolean triggerMerge, Boolean flushDocStores)
> at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer)
> at Lucene.Net.Index.IndexWriter.AddDocument(Document doc)
> -- Line Removed --
> at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-125) Lucene 2.3.1(a?) - Unhandled
System.NullReferenceException In
Lucene.Net.Index.DocumentsWriter.CompareText
Posted by "George Aroush (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614148#action_12614148 ]
George Aroush commented on LUCENENET-125:
-----------------------------------------
Hi Ken,
DIGY commented that this is the same as LUCENENET-117, can you please veirfy and then comment / close this issue?
Thanks.
-- George
> Lucene 2.3.1(a?) - Unhandled System.NullReferenceException In Lucene.Net.Index.DocumentsWriter.CompareText
> -----------------------------------------------------------------------------------------------------------
>
> Key: LUCENENET-125
> URL: https://issues.apache.org/jira/browse/LUCENENET-125
> Project: Lucene.Net
> Issue Type: Bug
> Environment: Microsoft Visual Studio 2005, XP Pro
> Reporter: Ken Katzgrau
>
> When creating a test index of a 1,000,000 documents, I encountered a null reference exception originating from the document writer approximately every 80,000 documents. The code producing this error is:
> class Program
> {
> static void Main(string[] args)
> {
> IndexWriter iw = new IndexWriter(@"C:\TestIndex", new WhitespaceAnalyzer(), true);
> Document d;
> Field f;
> for (int i = 0; i < 100000; i++)
> {
> if (i % 10000 == 0) Console.WriteLine("Doc: " + i);
> d = new Document();
> f = new Field("Field1", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
> d.Add(f);
> f = new Field("Field2", "Content " + i, Field.Store.YES, Field.Index.UN_TOKENIZED);
> d.Add(f);
> iw.AddDocument(d); *Exception occurs here
> }
> Console.WriteLine(iw.DocCount());
> Console.ReadKey();
> iw.Close(); *If the exception is caught, the IndexWriter iw becomes null
> }
> }
> The exception is:
> System.NullReferenceException was unhandled
> Message="Object reference not set to an instance of an object."
> Source="Lucene.Net"
> StackTrace:
> at Lucene.Net.Index.DocumentsWriter.CompareText(Char[] text1, Int32 pos1, Char[] text2, Int32 pos2)
> at Lucene.Net.Index.DocumentsWriter.AppendPostings(FieldData[] fields, TermInfosWriter termsOut, IndexOutput freqOut, IndexOutput proxOut)
> at Lucene.Net.Index.DocumentsWriter.WriteSegment()
> at Lucene.Net.Index.DocumentsWriter.Flush(Boolean closeDocStore)
> at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores)
> at Lucene.Net.Index.IndexWriter.Flush(Boolean triggerMerge, Boolean flushDocStores)
> at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer)
> at Lucene.Net.Index.IndexWriter.AddDocument(Document doc)
> -- Line Removed --
> at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.