poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52032] New: [PATCH] HWPF - mysterious ArrayIndexOutofBoundsException with no stack trace
Date Fri, 14 Oct 2011 18:58:33 GMT

             Bug #: 52032
           Summary: [PATCH] HWPF - mysterious
                    ArrayIndexOutofBoundsException with no stack trace
           Product: POI
           Version: 3.8-dev
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: HWPF
        AssignedTo: dev@poi.apache.org
        ReportedBy: rpi_alum@yahoo.com
    Classification: Unclassified

Created attachment 27776
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27776
Patch of files to get AIOOB stack trace out

I have a collection of files that when being processed via Tika will encounter
a RuntimeException stemming from a ArrayIndexOutofBoundsException with no stack
trace or Cause information.  The root AIOOB issue was fixed for many of these
files in the daily build after the 3.8-b4 release, but was re-introduced by the
HWPF rework done in revision 1178083. (The files are successful with revision

The files that produce this error are confirmed as valid with the MS's
bffvalidator utility.  Due to the sensitive nature of their contents, I'm not
able to include them as examples.  I may be able to get a coworker to help me
hex-edit out the sensitive info so that I can include them at a later point to
help fix the root issue causing the AIOOB.

In the meantime , I was able to pinpoint the location where the mysterious
AIOOB exception was spawning from.  It is originating out of ListLevel() when
performing a LittleEndian.getShort().

The patch I've included does two things:
  * Logs a warning message when the buffers bounds are about to be over blown.
  * Catches and rethrows the AIOOB exception from the getShort() call as a
RuntimeException,  so that additional stack trace information is available. (At
least it is now visible in Tika)

The patch should help highlight future documents that encounter this problem
and at least make it easier with tracking down and making the fix to get them
to work in the future.

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

View raw message