Regression - data loss when duplicating Scenes

The issues found when using the Function Manager panel
Post Reply
mdmayfield
Posts: 71
Joined: Wed Jun 15, 2016 8:51 am
Real Name: Matt Mayfield

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
Attachments
DuplicateBug.qxw
(4.04 KiB) Downloaded 122 times
Last edited by mdmayfield on Thu May 18, 2017 4:00 pm, edited 1 time in total.
mdmayfield
Posts: 71
Joined: Wed Jun 15, 2016 8:51 am
Real Name: Matt Mayfield

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*.
mdmayfield
Posts: 71
Joined: Wed Jun 15, 2016 8:51 am
Real Name: Matt Mayfield

Reverting commit 83761c35db73d120e7a1e58040808c7055f37998 does prevent this issue from happening, so the cause is identified as a bug in the "preserve fixture order" routine.
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

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)
mdmayfield
Posts: 71
Joined: Wed Jun 15, 2016 8:51 am
Real Name: Matt Mayfield

I will give it a go!
mdmayfield
Posts: 71
Joined: Wed Jun 15, 2016 8:51 am
Real Name: Matt Mayfield

Yes, that appears to fix it! I issued a pull request #971.
User avatar
mcallegari
Posts: 4711
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Merged, thanks a lot !
Post Reply