svn r10435 crashing

View: New views
3 Messages — Rating Filter:   Alert me  

svn r10435 crashing

by Colin Fletcher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Re: svn r10435 crashing

by cannam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jun 26, 2009 at 12:37 PM, Colin Fletcher<colinf@...> wrote:
>
> 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.

Hm, thanks for bringing that to our attention.  It suggests some
deeper troubles here.

I've committed a different fix, because pairs < pairsNow (but >= 0) is
actually supposed to be legitimate for this function.  But it will
need some further investigation (I've left in a warning).


Chris

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

Re: svn r10435 crashing

by Colin Fletcher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chris Cannam wrote:

> I've committed a different fix, because pairs < pairsNow (but >= 0) is
> actually supposed to be legitimate for this function.  But it will
> need some further investigation (I've left in a warning).

Thank you for that: I didn't spot the code that removes excess
subMasterOutputs. Anyway, your fix indeed works for me, and I see the
warning too.



Colin.

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