Author Topic: 4.1.8 Backwards Compatibility Bug?  (Read 2488 times)

Offline kevinp

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
4.1.8 Backwards Compatibility Bug?
« on: June 28, 2015, 08:32:11 AM »
I ran across a couple issues last night while using 4.1.8 and I'm wondering if others are seeing the same thing? 

First, any new sequence created under 4.1.8 does not open properly under previous versions of xLights.  The wave form and music file loads into the sequencing grid, but the grid itself is completely void of any effects showing up in any of the cells.  Viewing the sequence in the layout tab plays correctly.  Not sure if the grid being blank is a result of recent changes with how the internal timing has been updated between versions?

Second, I noticed that I cannot apply saved effect presets any longer.  I can bring up the preset window, highlight an effect I want to reuse and click apply preset just like in the past.  What isn't working now is the grid gets updated with what looks like a single effect mark (and the effect saved is a multi layered effect).  I have attached a screen capture showing the applied effect now, which is highlighted in pink.  Looks like it isn't honoring the original effect length, or multiple layers to the effect.  I went back a few versions to try the presets and I'm getting the same thing.  Something in 4.1.8 has changed the file so I cannot use my presets any longer either.

Using xLights 4.1.8 under OS X.
« Last Edit: June 28, 2015, 09:02:08 AM by kevinp »
Kevin Pankratz
Blaine MN

Offline kevinp

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #1 on: June 28, 2015, 08:57:30 AM »
I did go back a week into archived backups of all of my files and pulled the rgb xml file.  Under previous versions of xLights I could use the effects presets as expected.  The file is 21K in size.  Running 4.1.8 (and immediately closing the program) increased the size of that file to 35K, and I'm back to where I was not being able to use effect presets.
Kevin Pankratz
Blaine MN

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #2 on: June 28, 2015, 11:21:15 AM »
Yeah we aren't going to add code that allows new xLights formats to open in old versions.  To look at the presets issue why don't you attach those before and after files so I can compare them.

Offline kevinp

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #3 on: June 28, 2015, 11:35:01 AM »
Here are the two files for comparison.
Kevin Pankratz
Blaine MN

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #4 on: June 28, 2015, 01:36:30 PM »
Yeah there's a problem with the conversion of the presets.  All the effects in 4.1.8 were switched to use integers representing milliseconds instead of doubles.  So in the presets everywhere that had a time like 58.900000 should become 58900.  The version="0004" tag marks whether it's been updated.  I'll have to debug the conversion but in the meantime I manually edited your file to do the upgrade so this should work.

Offline kevinp

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #5 on: June 28, 2015, 03:17:04 PM »
Thank you Gil.  I'll give this a try.
Kevin Pankratz
Blaine MN

Offline kevinp

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #6 on: June 28, 2015, 03:40:19 PM »
Gil, I replaced the xml file with the one you sent.  Renamed it and started xLights.  I'm now getting an error message upon starting up.  "Unable to load RGB effects file"

After clicking OK I get another error, "XML parsing error: 'not well-formed (invalid token)' at line 18" which seems to correspond to the last effect preset in the file.
Kevin Pankratz
Blaine MN

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #7 on: June 28, 2015, 03:48:22 PM »
Now I would have given you a prize if you told me what was wrong with that line. :)
Just look at the line above it.  I pasted the version on the wrong side of that ending quote mark.
Notepad++ is good for editing XML...it's will show colors that identify the mistake.

Offline kevinp

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #8 on: June 28, 2015, 05:04:33 PM »
Well, after some trial and error, I finally saw what I kept missing based on your clue.  Fixed it and now I'm back up and running.  Thank you!

I guess I'll be deleting previous copies of xLights prior to 4.1.8 since the sequences won't work correctly now after the conversion.
Kevin Pankratz
Blaine MN

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #9 on: June 29, 2015, 06:05:53 PM »
Ok this had me stumped for awhile because the conversion code looks correct.  The presets have a version number like 0002, 0003, and 0004.  I was properly converting the 0002 and 0003 presets into the 0004 format but what I was missing was when you create new presets I forgot to add the version attribute to the preset itself so when you opened the file it thought the effects were version 0002 format instead of version 0003 format and did the wrong conversion.  The reason I tried to code it where every preset has a version is because I was worried people might manually cut and paste presets from older sequences or someone else's sequence and I wanted it to do the right conversion.

Offline kevinp

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #10 on: June 29, 2015, 06:14:03 PM »
That's great that you solved the issue.  I'm assuming everyone using 4.1.8 would have the same issue I was having?  Hopefully it's an easy fix to re-update the files upon opening in a new release and fix the presets.

I haven't had any issues since you manually corrected my xml file, minus the one little oops.  Thank you once again.
Kevin Pankratz
Blaine MN

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: 4.1.8 Backwards Compatibility Bug?
« Reply #11 on: June 29, 2015, 08:46:46 PM »
If the presets got corrupted there's no good way I can fix it.  I put code in there I think will fix them once it rolls to the next preset version.  It doesn't go into the conversion code unless the main effects preset version changes.