Page 1 of 1

Regression - data loss when duplicating Scenes

Posted: Thu May 18, 2017 3:37 pm
by mdmayfield
I've identified a painful regression/bug.

- This issue is *not* observed in QLC+ 4.10.5b stable.
- This issue *is* observed in latest GIT build.
- Reproducible on Mac OS X 10.11 and on Debian Linux w/XFCE.
- I suspect that commit 83761c35db73d120e7a1e58040808c7055f37998 introduced this bug, but have not tested cherry-picking with Git to omit it yet. -- EDIT: yes, this commit is the cause. Reverting it prevents the issue

To reproduce:

1. Open attached project
2. Go to Function Manager and duplicate the one Scene
- Observe that the new duplicate Scene contains all eight fixtures, same as the original
3. Save the project
4. Re-open the project
5. Go to Function Manager and call up the duplicate Scene
- Observe that the new duplicate Scene is empty - it contains 0 fixtures!
- Note that in XML none of the fixture settings were saved

Thanks,

Matt

Re: Regression - data loss when duplicating Scenes

Posted: Thu May 18, 2017 3:44 pm
by mdmayfield
Another interesting aspect - to illustrate:

1. Open sample project
2. Duplicate the one Scene
3. Manually change one of the values in one of the fixtures in the duplicate Scene
4. Save and re-open
5. Observe that the duplicated Scene contains *only the fixture that was touched manually*.

Re: Regression - data loss when duplicating Scenes

Posted: Thu May 18, 2017 3:58 pm
by mdmayfield
Reverting commit 83761c35db73d120e7a1e58040808c7055f37998 does prevent this issue from happening, so the cause is identified as a bug in the "preserve fixture order" routine.

Re: Regression - data loss when duplicating Scenes

Posted: Thu May 18, 2017 4:07 pm
by janosvitok
You are right!

The problem is that in bool Scene::copyFrom(const Function* function) (line 87) m_fixtures is not copied.
Can you try? (I can't compile right now)

Re: Regression - data loss when duplicating Scenes

Posted: Thu May 18, 2017 4:17 pm
by mdmayfield
I will give it a go!

Re: Regression - data loss when duplicating Scenes

Posted: Thu May 18, 2017 4:30 pm
by mdmayfield
Yes, that appears to fix it! I issued a pull request #971.

Re: Regression - data loss when duplicating Scenes

Posted: Thu May 18, 2017 5:38 pm
by mcallegari
Merged, thanks a lot !