diff -Nru rosegarden-11.11.42/debian/changelog rosegarden-11.11.42/debian/changelog --- rosegarden-11.11.42/debian/changelog 2012-01-08 15:23:28.000000000 +0000 +++ rosegarden-11.11.42/debian/changelog 2012-09-10 12:37:33.000000000 +0000 @@ -1,3 +1,12 @@ +rosegarden (1:11.11.42-1ubuntu1.1) precise-proposed; urgency=low + + * Avoid hanging on when importing/recording MIDI. (LP: #1019400) + In some situations a MIDI event could be unsplittable, so add a check + to make sure the notation duration is truncated to the event duration + to prevent entering an endless loop. + + -- Alessio Treglia Mon, 10 Sep 2012 14:07:36 +0200 + rosegarden (1:11.11.42-1ubuntu1) precise; urgency=low * Merge from Debian testing (LP: #913421). Remaining changes: diff -Nru rosegarden-11.11.42/debian/patches/endlessloop_upstreambug_3466912.patch rosegarden-11.11.42/debian/patches/endlessloop_upstreambug_3466912.patch --- rosegarden-11.11.42/debian/patches/endlessloop_upstreambug_3466912.patch 1970-01-01 00:00:00.000000000 +0000 +++ rosegarden-11.11.42/debian/patches/endlessloop_upstreambug_3466912.patch 2012-09-10 12:07:26.000000000 +0000 @@ -0,0 +1,38 @@ +Description: Prevent endless loop when the event notation duration + is longer than the event duration. +Origin: + http://rosegarden.svn.sf.net/viewvc/rosegarden/trunk/rosegarden/src/base/SegmentNotationHelper.cpp?view=patch&r1=12743&r2=12742&pathrev=12743 +Bug-Ubuntu: https://launchpad.net/bugs/1019400 +Bug: http://sf.net/tracker/?func=detail&aid=3466912&group_id=4932&atid=104932 +--- + src/base/SegmentNotationHelper.cpp | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +--- rosegarden-11.11.42.orig/src/base/SegmentNotationHelper.cpp ++++ rosegarden-11.11.42/src/base/SegmentNotationHelper.cpp +@@ -709,6 +709,25 @@ SegmentNotationHelper::makeThisNoteViabl + if (!splits.first || !splits.second) { + cerr << "WARNING: SegmentNotationHelper::makeNoteViable(): No valid split for event of duration " << e->getDuration() << " at " << e->getAbsoluteTime() << " (split duration " << *dli << "), ignoring remainder\n"; + cerr << "WARNING: This is probably a bug; fix required" << std::endl; ++ ++ // Bug #3466912 ++ // There's a situation where an event might be unsplittable, and ++ // it could cause an endless loop because its notation duration ++ // is longer than the event duration. The following check will ++ // make sure the notation duration is truncated to the event ++ // duration thus preventing the endless loop. ++ ++ // If the event and notation times are the same. ++ if (e->getAbsoluteTime() == e->getNotationAbsoluteTime()) { ++ // Create a new event with the notation abs time and duration ++ // set to the event abs time and duration. ++ Event *e1 = new Event(*e, ++ e->getAbsoluteTime(), e->getDuration(), // event ++ e->getSubOrdering(), ++ e->getAbsoluteTime(), e->getDuration()); // notation ++ toInsert.push_back(e1); ++ break; ++ } + toInsert.push_back(e); + e = 0; + break; diff -Nru rosegarden-11.11.42/debian/patches/series rosegarden-11.11.42/debian/patches/series --- rosegarden-11.11.42/debian/patches/series 2011-12-24 09:15:46.000000000 +0000 +++ rosegarden-11.11.42/debian/patches/series 2012-09-10 12:00:19.000000000 +0000 @@ -2,3 +2,4 @@ linker-binutils-gold.patch fix-mime-types.patch fix-desktop-file.patch +endlessloop_upstreambug_3466912.patch