Le dimanche 05 juin 2005 à 01:10 -0700, Yen-Ju Chen a écrit :

> I fix some bugs on Linux (RedHat 7.1, Linux 2.4, GCC 3.0.2)
> and the example under Developer/Examples/LuceneKitExample works fine
> with some very simple test.
> I cannot use UnitKit for testing LuceneKit throughly
> because of the lack of Xwindow on the linux machine I used.
> So bug reports are welcome so that I can fix any other problem.

Hi Yen-Ju,

I have tried to run LuceneKit tests today on Linux (Ubuntu Hoary, Linux
2.6, GCC 3.3.4) and I'm currently stalled on a segmentation fault within
TestBinaryDocument.m (with backtrace, I observe just infinite
Objective-C runtime messages lookup).
I have fixed previosusly a segmentation fault in LCSegmentMerger.m with
the attached patch.

Few tests are failing too, like this one : LCPriorityQueue.m:206:
warning: msgUKTrue.fail

I'm going to try LuceneKit example too.

Quentin.

--
Quentin Mathé
[EMAIL PROTECTED]

Index: Frameworks/LuceneKit/Source/Index/LCSegmentMerger.m
===================================================================
RCS file: /cvs/etoile/Etoile/Frameworks/LuceneKit/Source/Index/LCSegmentMerger.m,v
retrieving revision 1.15
diff -U5 -r1.15 LCSegmentMerger.m
--- Frameworks/LuceneKit/Source/Index/LCSegmentMerger.m	22 May 2005 05:48:29 -0000	1.15
+++ Frameworks/LuceneKit/Source/Index/LCSegmentMerger.m	7 Jun 2005 17:36:40 -0000
@@ -470,15 +470,16 @@
 			NSString *file = [segment stringByAppendingPathExtension: [NSString stringWithFormat: @"f%d", i]];
 			LCIndexOutput *output = [directory createOutput: file];
 			int j;
 			for (j = 0; j < [readers count]; j++) {
 				LCIndexReader *reader = (LCIndexReader *) [readers objectAtIndex: j];
-				int maxDoc = [reader maximalDocument];
+				int maxDoc = 0;
 				NSMutableData *input = [[NSMutableData alloc] init];
 				[reader setNorms: [fi name] bytes: input offset: 0];
 				int k;
 				char *bytes = (char *)[input bytes];
+				maxDoc = [bytes length];
 				for (k = 0; k < maxDoc; k++) {
 					if (![reader isDeleted: k]) {
 						[output writeByte: bytes[k]];
 					}
 				}

Reply via email to