#4020 XML with entity and xml schema produces error and breaks jEdit UI

minor bug
XML Plugin (2)

When I open XML file then jEdit writes NullPointerException on STDERR and UI stops refreshing properly.

Steps to reproduce:
1. extract files from testCase.tar.gz to one directory
2. start jEdit
3. open file apiEntities.xml
4. NullPointerException message is written on STDERR
5. put cursor to the last line of apiEntities.xml file
6. press Enter and keep it pressed for a while
7. line numbers in gutter bar stops updated properly after few seconds
8. release Enter key
9. press and keep Up key
10. line numbers in gutter bar are updated but only from to bottom to the current cursor position (so for example you can see that line 7 is followed by line 63)
11. Keep the Up key pressed untill it hits begin of document
12. You can see that document content is not displayed properly (some lines are missing)
13. You can see other anomalies. For example try to click to some docked panel and then click them again to be not displayed (part of plugin window remains visible)

You can see something similar to attached screenshot.

jEdit version number: 5.2.0
platform: Gentoo Linux
Java version: Oracle Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Activity log: see attached activit.log file
Plugins: see attached plugin-list.txt file

5 Attachments


Plugin Bugs: #1870
Plugin Patches: #182
Plugin Patches: #183


  • Eric Le Lay

    Eric Le Lay - 2016-09-12
    • assigned_to: Eric Le Lay
  • Eric Le Lay

    Eric Le Lay - 2016-09-12

    Confirmed! Thanks for reporting.

    1. a NullPointerException in xml.parser.XSDSchemaToCompletion.xsAttributeToElementDecl shouldn't happen
    2. causes an error with null message in ErrorList
    3. which causes exception when painting the editor (shouldn't happen)
  • Eric Le Lay

    Eric Le Lay - 2016-09-13
    • status: open --> pending-fixed
  • Vaclav Votipka

    Vaclav Votipka - 2016-09-13

    Many thanks for quick response.
    I can approve that no errors are reported with the pre-release version. Also GUI works well.

    But when I try to validate the apiEntities.xml from testCase.tar.gz in jEdit than it says that 'Element type "apiEntities" must be declared.'
    The problem seems to be the fact that I'm using XML Schema (for validation) simultaneously with DOCTYPE definition (for entity expansion). It seems that XML Schema is ignored in this case. I'm not sure if it is problem of XML plugin, Xerces plugin or Xerces itself. I want to create separate bug for this but I don't know where the correct place is (jEdit or Xerces).

  • Eric Le Lay

    Eric Le Lay - 2016-09-13

    You can disable DTD validation in XML plugin.
    From XML User's guide:

    DTD Validation can be disabled on a per-buffer basis by inserting
    the following in the first or last 10 lines of the buffer:

    <!-- :xml.validate.ignore-dtd=true: -->

  • Vaclav Votipka

    Vaclav Votipka - 2016-09-13

    Disabling DTD validation works well. I will create separate feature request for possibility to disable it on a global basis.

    This issue is fixed from my point of view. Thanks again.

  • Alan Ezust

    Alan Ezust - 2016-09-13

    Thank you vaclav, for the detailed steps to reproduce.


Log in to post a comment.