Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-6164

PyGments: Failed to highlight content when web server is rendering another page in the same time

    Details

    • keywords:
      PyGments, Jgments, CodeMacro, code, syntax highlight
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      There is a problem with code macro: it is not reliable. It is not hard to see this bug. The stack trace is:

      org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight content
      at org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:108)
      at org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:48)
      ...
      Caused by: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      NameError: name 'listener' is not defined

      at org.python.core.PyException.fillInStackTrace(PyException.java:70)
      at java.lang.Throwable.<init>(Throwable.java:181)

      I've run 4 wget requests in parallel and there was just 1 properly rendered page. I guess, PyGments rendering can only happen in 1 thread in time.

      The traces of this issue can be found in different X-Wiki instances on the web, even on XWiki.org:

      http://webcache.googleusercontent.com/search?q=cache:3CuubATVEtgJ:extensions.xwiki.org/xwiki/bin/view/Extension/Date%2BPicker%2BApplication+name+'listener'+is+not+defined+org.python.core&cd=2&hl=ru&ct=clnk&gl=ru&client=safari&source=www.google.ru

      I suggest migrating to Jgments as an option

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              octagram Ivan Levashew
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: