Messed up QXW file with many Command Items

The issues found when using the Function Manager panel
Post Reply
benste
Posts: 37
Joined: Mon Dec 12, 2016 6:36 pm
Real Name:

Hi there,
it seems that in my safefile pressing the save button in QLC+ almost always adds a <Command> tag to all script functions.
I only noticed because i added the qxw to my VCS for the other project, but is the QXW supposed to look like this?

Code: Select all

  <Function ID="113" Type="Script" Name="Lied 1 Teil2">
   <Speed FadeIn="0" FadeOut="0" Duration="0"/>
   <Direction>Forward</Direction>
   <RunOrder>Loop</RunOrder>
   <Command>%2F%2Fsetfixture%3A162%20ch%3A0%20val%3A255%20%2F%2F%20Loopback%20Stop%20all%20functions</Command>
   <Command>%2F%2Fwait%3A2ms</Command>
   <Command>%2F%2Fsetfixture%3A162%20ch%3A0%20val%3A0%20%2F%2F%20Loopback%20Stop%20all%20functions</Command>
   <Command></Command>
   <Command>startfunction%3A83%20%2F%2F%20Decke%20Chaser%20gruem</Command>
   <Command>startfunction%3A114%20%2F%2F%20Saeule%20Ping%20Pong%202</Command>
   <Command></Command>
   <Command>startfunction%3A111%20%2F%2F%20Saeule%2050%25</Command>
   <Command>startfunction%3A110%20%2F%2F%20Saeule%20blau</Command>
   <Command></Command>
   <Command>wait%3A10h01s</Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
   <Command></Command>
  </Function>
Could this be some index for an Array which kind of has issues with its bounds?
janosvitok
Posts: 1266
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Good catch!

Confirmed on latest git.
The problem is that LoadXml calls appendData that adds all commands together with LF appended after each command (including the last).

When writing data back to XML, the string is split again, keeping empty parts (so that empty commands are kept). This however also creates the last empty command.
janosvitok
Posts: 1266
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Post Reply