Skip to content

BE_XSLT_ApplyInMemory: Memory allocation failed : reaching arbitrary MAX_URI_LENGTH limit #271

@mrwatson-de

Description

@mrwatson-de

Hi Nick, hope this helps:

Describe the bug
fmCheckMate uses (has been using) the BE_XSLT_ApplyInMemory function to perform XSLT operations on fmxmlsnippet clipboard XML. Since around the time Claris swapped the xml engine I've been seeing this error when transforming larger clipboard contents.

I have only just realised that the problem seems to be with the BE Plugin and not Claris.

To Reproduce

  1. Which functions you called: BE_XSLT_ApplyInMemory
  2. What were the parameter values you used: large XML, small XSLT
  3. What the output was:

An error indicating there was a problem parsing the initial XML since the parsr is expecting a URi and the XML is too long:

Memory allocation failed : reaching arbitrary MAX_URI_LENGTH limit

<fmxmlsnippet type="FMObjectList">
  <CustomFunction id="887" functionArity="1" visible="True" parameters="pHexString" name="_0x">
    <Calculation><![CDATA[/* _0x( pHexString )

        : (LOTS of XML describing CFs)

2023-11-09 RW: CF für Param 4 von G_TX_XML_Tag Version 4.0
*/

3]]parser error : xmlSAX2StartDocument
<fmxmlsnippet type="FMObjectList">
^
```

In total there are 10211 characters of the original XML before the "]]parser error".

5. Other potential debug information.
**Expected behavior**

I tested the xml + xslt using xsltproc, which performed the xslt no problem.


The same transform also works using:
MBS ( "XML.ApplyStylesheet" ; xmlText ; xsltText )

This suggests **BE_XSLT_ApplyInMemory may be passing the raw XML text into a libxml URI/file-loading path instead of a parse-from-memory path once the XML exceeds some length.**

**Desktop:**
 - OS and version : MacOS 15.7.3
 - FileMaker Version: Pro 22.0.5
 - Plugin Version from BE_VersionAutoUpdate: 05000002

**Additional context**
 - If you're using any of the curl functions ( HTTP, SMTP, FTP, etc ) include the output of the BE_CurlTrace function, after the function call.
 - Or the output of the BE_DebugInformation for newer plugin versions

```
{
 "Curl Information" : {
  "Curl Options" : {
  },
  "Custom HTTP Headers" : {
  },
  "Custom SMTP Headers" : {
  },
  "HTTP Proxy Information" : {
   "Password" : "",
   "Port" : "",
   "Server" : "",
   "Username" : ""
  },
  "HTTP Response Code" : 0,
  "HTTP Response Headers" : "",
  "SMTP Attachments" : {
  },
  "Trace" : ""
 },
 "Date" : "Thu May 21 14:47:12 2026",
 "FileMaker Information" : {
  "Application" : 1,
  "File ID" : 9,
  "Session ID" : 1,
  "Version" : "Pro 22.0.5"
 },
 "Last DDL Error" : 0,
 "Last Error" : 0,
 "Plugin Information" : {
  "Auto Update Version" : "05000002",
  "Pro Version" : "No",
  "Version" : "5.0.0"
 },
 "Script Steps" : {
 },
 "Text Encoding" : "UTF-8"
}
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions