https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
Summary: property claimed to start before zero, at -512! Product: POI Version: 3.5-dev Platform: PC OS/Version: Windows XP Status: NEW Keywords: ErrorMessage Severity: normal Priority: P2 Component: POI Overall AssignedTo: dev@poi.apache.org ReportedBy: doug.mccom...@verizon.net I am getting a strange message when I read the paragraphs of a Word file. Here is the message: property claimed to start before zero, at -512! Resetting it to zero, and hoping for the best Here is my code. It happens on the createion of the new HWPFDocument. final POIFSFileSystem fileSystem = new POIFSFileSystem(new FileInputStream(file)); final HWPFDocument document = new HWPFDocument(fileSystem); The error occurs in org.apache.poi.hwpf.model.PropertyNode in the constructor : protected PropertyNode(int fcStart, int fcEnd, Object buf) { _cpStart = fcStart; _cpEnd = fcEnd; _buf = buf; if(_cpStart < 0) { System.err.println("A property claimed to start before zero, at " + _cpStart + "! Resetting it to zero, and hoping for the best"); _cpStart = 0; } } The -512 originates in a calculation done in org.apache.poi.hwpf.model. CHPFormattedDiskPage, where getStart(x) returns 1536 and fcMin is 2048. public CHPFormattedDiskPage(byte[] documentStream, int offset, int fcMin, TextPieceTable tpt) { super(documentStream, offset); for (int x = 0; x < _crun; x++) { boolean isUnicode = tpt.isUnicodeAtByteOffset( getStart(x) ); _chpxList.add(new CHPX(getStart(x) - fcMin, getEnd(x) - fcMin, getGrpprl(x), isUnicode)); } } I am using these jars, the latest version available to download using Maven2: poi-3.5-beta4.jar poi-scratchpad-3.5-beta4.jar It still seems to work, but I get a lot of these messages. NOTE: This message appears in bug 46220 but that bug does not seem to be related. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org