You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2007/05/16 15:00:16 UTC

[jira] Resolved: (XERCESC-1704) XMLBufferMgr provides not enough buffers

     [ https://issues.apache.org/jira/browse/XERCESC-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-1704.
--------------------------------------

    Resolution: Duplicate

Duplicate of XERCESC-866; fix is already available in version 2.7

Alberto

> XMLBufferMgr provides not enough buffers
> ----------------------------------------
>
>                 Key: XERCESC-1704
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1704
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: SAX/SAX2
>    Affects Versions: 2.6.0
>         Environment: Windows XP SP2, Visual Studio .NET
>            Reporter: Anton Nikolaevsky
>         Attachments: instance.xml
>
>
> SAX2XMLReaderImpl::startElement uses member  XMLBufferMgr  fStringBuffers including for storage of namespace prefixes. The fact is XMLBufferMgr::fBufCount is initialized during ctor call with hardcoded value 32 (see xercesc/framework/XMLBuffer.cpp[71] ) and cannot be modified later since the class has not appropriate setter method (it seems getter appeared in 2.7.0 after fix for https://issues.apache.org/jira/browse/XERCESC-1491 ). This leads to exception 'Type:RuntimeException, Message:The buffer manager cannot provide any more buffers' when, for example, we have more than 32 namespace declarations.
> Appropriate RosettaNet sample XML is attached. It counts 64 namespace declarations on the root element.
> I would propose to resolve problem one of following way:
> 1) simplest: increase hardcoded buffers count, say, up to 128.
> 2) provide additional parameter to XMLBufferMgr initializing fBufCount with specified value or 32 by default and make SAX2XMLReaderImpl::fStringBuffers ctor call (see xercesc/parsers/SAX2XMLReaderImpl.cpp[349] ) with overridden buffers count, say, 128.
> 3) increase buffers count during runtime, when more then XMLBufferMgr::fBufCount buffers is requested, including memory for XMLBufferMgr::fBufList reallocation (likewise std::vector does), instead of exception generation.
> I guess the last one is most reliable. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org