« Return to Thread: svn r10435 crashing

svn r10435 crashing

by Colin Fletcher :: Rate this Message:

Reply to Author | View in Thread


Hi folks,

I just compiled Rosegarden trunk r10435 (on Ubuntu 8.04) to have a play
around, but I think I found a bug.

It SEGVs fairly repeatably on start-up for me in
Rosegarden::JackDriver::createSubmasterOutputs(int pairs), because pairs
gets passed a value of -1 from JackDriver::SetAudioPorts.

Anyway, the following fixes it for me. I don't know if it's the correct
fix, but it at least lets Rosegarden start up. It's looking great, by
the way: keep up the good work!

Index: src/sound/JackDriver.cpp
===================================================================
--- src/sound/JackDriver.cpp (revision 10435)
+++ src/sound/JackDriver.cpp (working copy)
@@ -548,7 +548,7 @@
          return false;

      int pairsNow = m_outputSubmasters.size() / 2;
-    if (pairs == pairsNow)
+    if (pairs <= pairsNow)
          return true;

      for (int i = pairsNow; i < pairs; ++i) {


There's similar code in JackDriver::createFaderOutputs and
JackDriver::createRecordInputs too: I don't know if there's any chance
that those functions might ever be passed a negative number too, but if
there is, this might be needed:

Index: src/sound/JackDriver.cpp
===================================================================
--- src/sound/JackDriver.cpp (revision 10435)
+++ src/sound/JackDriver.cpp (working copy)
@@ -492,7 +492,7 @@

      int pairs = audioPairs + synthPairs;
      int pairsNow = m_outputInstruments.size() / 2;
-    if (pairs == pairsNow)
+    if (pairs <= pairsNow)
          return true;

      for (int i = pairsNow; i < pairs; ++i) {
@@ -594,7 +594,7 @@
          return false;

      int pairsNow = m_inputPorts.size() / 2;
-    if (pairs == pairsNow)
+    if (pairs <= pairsNow)
          return true;

      for (int i = pairsNow; i < pairs; ++i) {



Colin Fletcher.



------------------------------------------------------------------------------
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@... - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

 « Return to Thread: svn r10435 crashing