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 47624] File Error Data May Have been Lost error while opening commented workbook(excel file)
Date Thu, 18 Mar 2010 07:43:37 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47624

--- Comment #1 from nothize <nothize@gmail.com> 2010-03-18 07:43:34 UTC ---
I've experienced this problem too.

After some tracing with the 3.6 stable release source, the problem seems to be
rely in...

Sheet.java: public int aggregateDrawingRecords(DrawingManager2 drawingManager,
boolean createIfMissing).

1491:1499

        EscherAggregate r = EscherAggregate.createAggregate( records, loc,
drawingManager );
        int startloc = loc;
        while ( loc + 1 < records.size()
                && records.get( loc ) instanceof DrawingRecord
                && records.get( loc + 1 ) instanceof ObjRecord )
        {
            loc += 2;
        }


where a practical DrawingRecord and ObjRecord pair loop looks like the
following inside EscherAggregate:

        while ( loc + 1 < records.size()
                && sid( records, loc ) == DrawingRecord.sid
                && isObjectRecord( records, loc + 1 ) )

.

Thus the Sheet's loop for calculating loc will be too early terminated since
there could be non-ObjRecord but TextObjRecord that should be taken into
consideration too.

I'll try to patch it locally and observe how it goes. The latest development
branch seems to refactored alot and renamed Sheet.java to InternalSheet.java,
though the code snippet around this issue is still similar.

-- 
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


Mime
View raw message