Yves Guillemot writes:
1 - open an RG file with four segments (on tracks 1 to 4) which
lengths are
close to the composition duration
2 - open the segment on track 4 in notation editor
3 - Increase composition duration (Edit -> Change Composition
Duration)
4 - On segments canvas, extent to the right the length of the
segments on
the tracks 1 to 4 in that order
5 - When extending the segment on track 4 : crash !
. . . . . . .
rosegarden: getStartOfQuantizedSlice returned 142080 from
142080
rosegarden: bar 37, startBarOfStaff 0, newTimeSig false
rosegarden: NotationHLayout::scanStaff: bar 37, from 142080, to
145920 (end
156480); from is at 142080, to is at 145920
rosegarden: element is a rest
rosegarden: note type 5, dots 0, multiplier 2.8, gap 39.2
rosegarden: element is a rest
rosegarden: note type 5, dots 0, multiplier 2.8, gap 39.2
rosegarden: getStartOfQuantizedSlice returned 145920 from
145920
rosegarden: bar 38, startBarOfStaff 0, newTimeSig false
rosegarden: NotationHLayout::scanStaff: bar 38, from 145920, to
149760 (end
156480); from is at 145920, to is at 149760
rosegarden: element is a rest
rosegarden: note type 5, dots 0, multiplier 2.8, gap 39.2
rosegarden: element is a rest
rosegarden: note type 5, dots 0, multiplier 2.8, gap 39.2
rosegarden: getStartOfQuantizedSlice returned 149760 from
149760
rosegarden: bar 39, startBarOfStaff 0, newTimeSig false
rosegarden: NotationHLayout::scanStaff: bar 39, from 149760, to
153600 (end
156480); from is at 149760, to is at 153600
rosegarden: element is a rest
rosegarden: note type 5, dots 0, multiplier 2.8, gap 39.2
rosegarden: element is a rest
rosegarden: note type 5, dots 0, multiplier 2.8, gap 39.2
rosegarden: getStartOfQuantizedSlice returned 153600 from
153600
rosegarden: bar 40, startBarOfStaff 0, newTimeSig false
rosegarden: NotationHLayout::scanStaff: bar 40, from 153600, to
157440 (end
156480); from is at 153600, to is at -1
rosegarden: element is a rest
rosegarden: note type 5, dots 0, multiplier 2.8, gap 39.2
rosegarden: element is a rest
rosegarden: note type 4, dots 0, multiplier 1.6, gap 19.2
rosegarden: RosegardenProgressDialog::processEvents:
modalVisible is false
Event::get(): Error dump follows:
Event type : rest
Absolute Time : 65280
Duration : 3840
Sub-ordering : 10
Persistent properties :
Event storage size : 36
WARNING: Rosegarden::Exception: "No data found for property
notetype" at
../base/Event.h:412
[File is attached. Just loading the file, opening a notation
editor on segment 4 and then resizing it to and beyond the
composition duration should be enough to cause the crash.]
Example RG file
Logged In: YES
user_id=13489
Dammit, I can't reproduce it now. Weird.
Logged In: YES
user_id=769617
I can still reproduce it, using 0.9.9cvs (17 july), with
some special RG files : doodle-q.rg (RG testfile) and
testyg4.rg
(I would like to attach here testyg4.rg, but I don't know
how to proceed. Please, ask me if you need the file and I
will send it to you)
The bug seems related to events set outside segment bounds
(segment on track 4) :
- doodle-q.rg : note on bar 48
- testyg4.rg : unnormalized rests on bar 36 and after
(All the notes in testyg4.rg have been removed while
searching for the problem cause).
In these 2 files, the extra events which are supposed to
cause the crash can be removed.
Once these events removed, there is no more crash, even if
the events are reinserted in the files.
Diff between original RG file and RG file with extra
events removed then reinserted shows some lines like :
<event type="rest" duration="3840" subordering="10"></event>
replaced by lines like :
<event type="rest" duration="3840" subordering="10"><nproperty name="notetype" int="6"/><nproperty name="notedots" int="0"/></event>
Conclusion :
- This bug seems only related to some old RG files
- A file triggering the bug can be corrected (by removing
the events outside segments bounds)
- This bug is probably not a high priority one
Logged In: YES
user_id=624187
Confirmed here with CVS of Aug/2. Stack follows:
16 kill()
15 pthread_kill()
14 raise()
13 raise()
12 abort()
11 cxa_call_unexpected()
10 std::terminate()
9 cxa_throw()
8 Rosegarden::PropertyDefn<() at Event.h:445
7 NotationVLayout::scanStaff() at notationvlayout.cpp:137
6 NotationView::applyLayout() at notationview.cpp:2524
5 NotationView::refreshSegment() at notationview.cpp:3185
4 EditViewBase::paintEvent() at editviewbase.cpp:415
3 EditView::paintEvent() at editview.cpp:132
2 NotationView::paintEvent() at notationview.cpp:2486
1 QWidget::event()
Debug output follows:
rosegarden: SequenceManager::segmentModified() : size
changed = true
rosegarden: ***
rosegarden:
NotationView::refreshSegment(0x89825e0,134880,142080)
rosegarden: NotationHLayout::scanStaff: full scan false,
times 132480->144000, bars 46->50, staff name "Basse",
width 101
rosegarden: ottava shift at start:0, ottavaEnd 126720
Event::get(): Error dump follows:
Event type : rest
Absolute Time : 118080
Duration : 2880
Sub-ordering : 10
Persistent properties :
Event storage size : 36
WARNING: Rosegarden::Exception: "No data found for
property notetype" at ../base/Event.h:445
You can assign it to me, or ask for some more
investigations.
Logged In: YES
user_id=624187
This is a short procedure to reproduce the crash:
Start with a new, empty document.
1. Pick the Draw tool. Draw a segment with a size of 2
bars
2. Pick the Resize tool. Resize (stretch) the segment to 1
bar length
3. Open the segment in Notation Editor
4. Composition -> Change Composition Duration...-> Start
Bar = 0; End Bar = 3;
5. Pick the Resize tool. Resize the segment, expanding it
to 3 bars.
Crash
The problem comes from step 2). One rest event is hidden,
because stretching a segment doesn't erase any extra
events beyond its end. When you expand the segment again,
these events rise, causing unexpected behaviors. I'm still
investigating why 4) is needed to get a crash.
Logged In: YES
user_id=624187
Fixed now in CVS. Please test.
Logged In: YES
user_id=769617
I can no more reproduce the crash using doodle-q.rg
neither the "short procedure".
Nevertheless I still get a crash with testyg4.rg.
(http://perso.wanadoo.fr/sevy.tom/rosegarden/test/testyg4.rg)
Crash
Oddly, the crash don't occur if, before step 3, the
composition duration had been increased beyond bar 30.
Logged In: YES
user_id=624187
Confirmed the crash with the new test file (testyg4.rg),
hopefully fixed now in the CVS.
Please retest, thanks.
Logged In: YES
user_id=769617
No more crash : the bug is fixed.
Thanks !