Show timing bug (time on track and real time are different)

The issues found when using the Show Manager panel
Post Reply
CsCs
Posts: 3
Joined: Sun Nov 05, 2017 9:08 am
Real Name:

Soory for my English - ti is not very pretty.
I used QLC+ for home light shows. So i found interest bug in show time grid.
When we place some elements on time grid and tracks, real time differents from desied (which i set in object's properties).

Steps to produce bug:
1. Create a new show and at least one track.
2. Place something (scene, chase, audio, etc) on track.
3/ Drag & drop it to 0:0 time. In this moment QLC shows time on track as "0 ms".
4. Lock item on track.
5. Select item and press time button (with clock). We see start time 0:0:0.
6. Start drag locked item. We see tha item don't move on track (because it locked), but QLC shows time about "120 ms".
7. If we again look into items timing (by pressing button with clock) - the start time will be "0:0:0".
8. When we change track zoom and check real start time by try to drag item - we see that time changes! When zoom level set to maximum (zoom regulator moved to left), item's start on track time becomes "40 ms". When zoom set to minimum (zoom regulator moved to right), start time becomes "600 ms"!!

When we play show - QLC starts items (scenes, chases) on a real time that it shows on a track! And if we see start time as "600 ms" - item on show will be played with 600 ms delay. And when we change zoom - timing will change and all show timeline wiil be broken.

I tested it on two versions and different computers:
a) QLC+ 4.10.5b on a Windows XP
b) Downloaded week again QLC+ 4.11.0 on a different comuter win Windows 7.
In all versions this bug is present.

Maybe programmers shall store two different times in object on a track (inside code/class)? First - desired time by user. Second - caclutaled position on a track (with current zoom) in a graphic pixels? And when we change zoom - recalculate position of object in pixles?

Thank you. QLC+ is a great project, but this bug dissapointing me.
I use ArtNet/DMX converter (russian version lays here: http://cs-cs.net/artnet-smartshow-netdmx-ii-rack-case).
Here is the sample of test show. Timing in some parts flows because i used zoom =): https://www.youtube.com/watch?v=R2qqOfajb0k
Attachments
Zoom level
Zoom level
Bad items timing: time on track and in a time set window are different.
Bad items timing: time on track and in a time set window are different.
CsCs
Posts: 3
Joined: Sun Nov 05, 2017 9:08 am
Real Name:

Hi! I have old Windows XP (i wrote before that i teste last version on Win 7 and it has a same bug), so i can't compile sources and debug.
But i am still interest of this bug and what (and were) is mistake that causes it.
What i discover on this moment:
1. Bug lays in UI, maybe in class named "MultiTrackView" that lays in a "\ui\src\showmanager\multitrackview.cpp".
2. Bug gives 40 ms plus of start time for each scale level. This is very interest!
Now my steps of test:
a) Set zoom level to 1 (m_Scale = 1);
b) Place any show item on (ex.) 3 seconds and lock it;
c) Set zoom level to 2 (slide zoom right to one step) (m_Scale = 2);
d) See that start time (we see it in drag-n-drop) becomes "3s080ms"
e) Return zoom level to 1 (m_Scale = 1) again and see that start time becomes "3s040ms".

If thet we will change zoom level to any value, we can calculate error of start time with this formula:
ErrorStartTime = m_StartTime + (40 ms * m_Scale);
m_StartTime - is local variable of class "ShowFunction" that lays in "/engine/src/showfunction.php".

Can anybody debug this and help? Or only i interest use QLC++ to play long offline shows with light & music?
CsCs
Posts: 3
Joined: Sun Nov 05, 2017 9:08 am
Real Name:

And also next part of learning sources.
Real time (time that displays when item is pressed) calculates here:

Code: Select all

void ShowItem::postPaint(QPainter *painter)
{
     [...cut code....]
    if (m_pressed)
    {
        quint32 s_time = 0;
        if (x() > TRACK_WIDTH)
            s_time = (double)(x() - TRACK_WIDTH) * (m_timeScale * 500) /
                     (double)(HALF_SECOND_WIDTH);
        painter->drawText(3, TRACK_HEIGHT - 10, Function::speedToString(s_time));
    }
}
Why this time differents from real start time?
User avatar
mcallegari
Posts: 4710
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Fixed on GIT
Post Reply