Details
-
Bug
-
Resolution: Fixed
-
Critical
-
2.7.1, 3.0 M3
-
None
-
PyGments, Jgments, CodeMacro, code, syntax highlight
-
Unknown
-
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:
I suggest migrating to Jgments as an option