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 51448] New: Evaluation Cache gets messed up after 256 sheets
Date Wed, 29 Jun 2011 07:07:23 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51448

             Bug #: 51448
           Summary: Evaluation Cache gets messed up after 256 sheets
           Product: POI
           Version: 3.8-dev
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
        AssignedTo: dev@poi.apache.org
        ReportedBy: antti.koskimaki@joinex.com
    Classification: Unclassified


Created attachment 27226
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27226
PlainCellCache, raise suitable sheet count to 4096

When updating calculations for Workbook having more than 256 sheets, the
evaluation cache at some point throws exception:

 java.lang.IllegalStateException: value changed
    at
org.apache.poi.ss.formula.EvaluationCache.getPlainValueEntry(EvaluationCache.java:144)
    at
org.apache.poi.ss.formula.EvaluationTracker.acceptPlainValueDependency(EvaluationTracker.java:146)
    at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:258)
    at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateReference(WorkbookEvaluator.java:618)
    at
org.apache.poi.ss.formula.SheetRefEvaluator.getEvalForCell(SheetRefEvaluator.java:47)
    at
org.apache.poi.ss.formula.LazyRefEval.getInnerValueEval(LazyRefEval.java:44)


Initial reason is PlainCellCache packing sheet-index to 8 bits, i.e. supporting
only 256 sheets. Excel does not limit sheet number ("is limited by available
memory"), so 256 is far too low limit. Included patch raises the limit to 4096
(12bit), at the same time dropping the workbook count from 256 to 16 (4bit)
which seemed to me more suitable compromise.

Documentation should also point out such "invisible limits" and code should
Assert the situation when such limits are exceeded, instead of just getting
messed up.

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