https://issues.apache.org/bugzilla/show_bug.cgi?id=47271

           Summary: StyleSheet.createChp stack overflow - parent style
                    description is itself
           Product: POI
           Version: 3.5-dev
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: HWPF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


I have a document that gets stuck in createChp().  Debugging it reveals that in
createChp() the baseIndex is the same as the input param, istd and the
parentCHP is null, hence it loops approx 1021 times before it gives stack
overflow.

Is the solution 

       if(baseIndex != NIL_STYLE)
       {
           parentCHP = _styleDescriptions[baseIndex].getCHP();
           if(parentCHP == null && baseIndex != istd)
           {
               createChp(baseIndex);
               parentCHP = _styleDescriptions[baseIndex].getCHP();
           }
       }

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to