Menu

#19 crash on deleting first track after splitting

open
None
5
2007-02-26
2007-02-26
romgen
No

1. add some image
2. drag/drop it to bottom into timeline
3. split it
4. select the first one
5. delete it --> crash

There is some missing boundary check in "SceneComposite.cpp" line 487 (iPlaybackFirst could be negative):
if(m_iPlaybackFirst < 0)
m_iPlaybackFirst = 0;

The whole function:
void SceneComposer::updatePlaybackBoundries()
{
m_iPlaybackFirst = 0;
m_iPlaybackLast = -1;

if (frames() > 0) {
// If we're primarily interested in certain clips:
if (m_visibleClips.count() > 0) {
m_iPlaybackFirst = frames();

foreach (const Clip* clip, m_visibleClips) {
if (clip->start() < m_iPlaybackFirst)
m_iPlaybackFirst = clip->start();
if(m_iPlaybackFirst < 0)
m_iPlaybackFirst = 0;
if (clip->end() >= m_iPlaybackLast)
m_iPlaybackLast = clip->end() - 1;
}
}
else
m_iPlaybackLast = frames() - 1;
}
}

greetings and good work!

Discussion

  • romgen

    romgen - 2007-02-26
    • assigned_to: nobody --> whiteh12
     
  • romgen

    romgen - 2007-03-13

    Logged In: YES
    user_id=1146827
    Originator: YES

    Hello!

    My patch/fix is NOT fixing the real problem. I am investigating more.

     

Log in to post a comment.