xmltools icon indicating copy to clipboard operation
xmltools copied to clipboard

String too long error message - endless loop

Open HansHartmann opened this issue 3 years ago • 2 comments

While entering a new element into animation XML code for a MS Flight Simulator add-on, I accidentally typed a "?" at the wrong place. This caused XML Tools to go into an endless loop, before I could hit the backspace key, opening the window in the attached screenshot over and over again (after clicking OK). XML Tools version in use is 3.1.1.10. <Component ID=?

grafik

HansHartmann avatar Nov 07 '21 12:11 HansHartmann

Can confirm it happens sometimes (ran into it as well with : instead of ?)

image

Having tested it a bit, it doesn't occur in all situations. This is a failing XML:

<?xml version="1.0" encoding="utf-8"?>
<one>
  <two name=
</one>

When placing a : or ? after the = (probably others too) the error appears

Especially painful as it then softlocks NPP and crashes again when you restart. Only way to circumvent is too disable XMLTools by renaming or removing it

Tiefseetauchner avatar Oct 14 '22 12:10 Tiefseetauchner

I have stumbled upon the same issue with: Notepad++ version 8.4.7 XMLTools version 3.1.1.13

I am able to reproduce it with Tiefseetauchers example document:

<?xml version="1.0" encoding="utf-8"?>
<one>
  <two name=
</one>

I have only tried a few characters, but suspect the issue is triggered by any character entered after the "=" which is not whitespace or a single quote or a double quote char (the only characters allowed after the "=" for an XML attribute). As soon as an offending char is entered, a series of "string too long" exception pop-ups appears. When the last one has been confirmed, entering any character will trigger the next series of exceptions and each series seems to be longer than the previous. In more complex XML documents my Notepad++ usually crashes.

One can prevent the same issue from reoccurring on restart of Notepad++, by first opening the file with the XML syntax error in a different editor and removing the offending character after the "=".

passtv avatar Dec 06 '22 14:12 passtv