You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/12/30 05:30:27 UTC
DO NOT REPLY [Bug 46443] New: property claimed to start before zero,
at -512!
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.mccomsey@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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46443] property claimed to start before zero, at
-512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
--- Comment #7 from Nick Burch <ni...@torchbox.com> 2009-04-23 07:15:43 PST ---
Part of the hope is that with an annoying enough error, someone'll be motivated
to get around to fixing the underlying issue...
There really is something screwy going in which needs to be fixed, and hiding
the error is just papering over the cracks :(
--
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 46443] property claimed to start before zero, at -512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|POI Overall |HWPF
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46443] property claimed to start before zero, at
-512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adb@teamware.com
--- Comment #2 from Nick Burch <ni...@torchbox.com> 2009-01-12 02:38:15 PST ---
*** Bug 46511 has been marked as a duplicate of this bug. ***
--
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46443] property claimed to start before zero, at
-512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
--- Comment #3 from Antony Bowesman <ad...@teamware.com> 2009-01-12 02:43:53 PST ---
Sorry for the duplicate. Is there a good reason to leave this in the final
libraries as it can be quite annoying when it occurs frequently. We are using
it for text extraction and get it quite a lot.
--
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46443] property claimed to start before zero, at
-512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Nick Burch <ni...@torchbox.com> 2009-01-06 11:13:52 PST ---
This warning is because our understanding of how the file's structure should
work out, and how it has been found differs.
If you're just reading stuff, you're likely to be ok. However, writing changes
back out might break, as other things are likely to be wrong too. (It generally
seems that ignoring the negative start and assuming it's zero lets most stuff
work, but we're not entirely sure why)
Any help figuring out where one of our assumptions is wrong, so we can handle
this cleanly, are greatly appreciated!
--
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46443] property claimed to start before zero, at
-512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
--- Comment #6 from Antony Bowesman <ad...@teamware.com> 2009-04-22 16:38:45 PST ---
The same applies to the error in SectionTable.java
System.err.println("Your document seemed to be mostly unicode, but the section
definition was in bytes! Trying anyway, but things may well go wrong!");
You also say that read-only case should be fine.
--
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46443] property claimed to start before zero, at
-512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
--- Comment #4 from Nick Burch <ni...@torchbox.com> 2009-01-12 02:50:30 PST ---
See Comment #1. The warning remains because the problem remains
--
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46443] property claimed to start before zero, at
-512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
Antony Bowesman <ad...@teamware.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #5 from Antony Bowesman <ad...@teamware.com> 2009-04-22 16:30:11 PST ---
Nick, I understand your reasoning for the warning, but from a large scale
deployed server side application that is simply extracting text from hundreds
of thousands of word documents for indexing, this message creates a massive
amount of noise and obscures other potentially important errors. You refer to
comment #1 where you say
"If you're just reading stuff, you're likely to be ok"
so why does POI forcing a system.err when it is not aware of the higher level
use case.
At least can't you make the output conditional on some system property, so at
least applications, for which this is not important, can disable it.
--
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46443] property claimed to start before zero, at
-512!
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46443
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEEDINFO
--- Comment #8 from Yegor Kozlov <ye...@dinom.ru> 2011-06-24 10:41:58 UTC ---
Can you attach the problematic document? Without it we can't do much to figure
out what's wrong.
Yegor
--
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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org