Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-978

Unable to execute scripts with more than 64 KiB bytecode

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: Scripting
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: PC

      Description

      Nowadays the 64k limit prevents many SVGs from being used with Batik. At least there should be some option to disable the optimization without needing to patch Batik:

      — RhinoInterpreter-.java 2011-02-19 06:24:37.000000000 +0100
      +++ RhinoInterpreter.java 2011-02-19 06:26:46.236580870 +0100
      @@ -593,12 +593,10 @@ public class RhinoInterpreter implements
      protected Context makeContext() {
      Context cx = super.makeContext();
      cx.setWrapFactory(wrapFactory);
      cx.setSecurityController(securityController);
      cx.setClassShutter(classShutter);

      • if (rhinoClassLoader == null) { - cx.setOptimizationLevel(-1); - }

        + cx.setOptimizationLevel(-1);
        return cx;
        }
        }
        }

      A workaround is to put parts of the script somewhere else in the XML tree and eval() it (then it won't be compiled).

      I'd also suggest to put this issue into the FAQ.

        Attachments

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              cujyaz@googlemail.com cujyaz
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: