Custom Ardour build hangs at start when registering ports

I’m building Ardour here with MSVC so I’m not technically using the release code (I build from the nightly code) but I also see this message with some sessions. Another common problem here is sessions hanging just after displaying the message “Finished adding tracks/busses”.

When I run the code in my debugger there’s no one place where the hang occurs but the most common places are this code in Session::post_engine_init()

  	PBD::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
  	ProcessorChangeBlocker pcb (this);
  	std::shared_ptr<RouteList const> r = routes.reader ();
  	for (auto const& i : *r) {
  		i->configure_processors (0); // <--- HANGS HERE
  	}

or this code in Session::hookup_io()

  try {
  	std::shared_ptr<Auditioner> a (new Auditioner (*this));
  	if (a->init()) { // <--- HANGS HERE
  		throw failed_constructor ();
  	}
  	auditioner = a;
  }

Maybe the devs might be able to see something that’s common to them?

@John_E , that code is unrelated to the case at hand. The error the user has happens much earlier.

“Failed to register audio/midi ports” is from the back-end. Search for the error message and find PortRegistrationError in portaudio_backend.cc

We’ve seen issues here if the device name includes umlauts or accents. @tnaugle is investigating a related issue where driver detection on Windows can hang.

As for the issue you posted, I suspect this is due to your custom build.

It seems to happen with sessions where the .ardour file contains these lines:-

<Protocol name="PreSonus FaderPort" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort16" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort2" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort8" active="0" session-state="0"/>

What I can’t figure out is why some sessions contain those lines but others don’t :confounded:

Hi Robin, I had an urgent appointment yesterday so I had to give you the shortform version. What’s happening here is that some sessions contain a section looking like this (which works):-

  <ControlProtocols>
    <Protocol name="PreSonus FaderPort" active="no"/>
    <Protocol name="Generic MIDI" active="no"/>
    <Protocol name="Mackie" feedback="no" bank="0" ipmidi-base="21928" device-profile="User" device-name="Mackie Control Universal Pro" active="yes">
      <Configurations>
        <Configuration name="Mackie Control Universal Pro">
          <Surfaces>
            <Surface name="Mackie Control Universal Pro">
              <Port>
                <Input>
                  <Port name="mackie control in" direction="input"/>
                </Input>
                <Output>
                  <Port name="mackie control out" direction="output"/>
                </Output>
              </Port>
            </Surface>
          </Surfaces>
        </Configuration>
      </Configurations>
    </Protocol>
    <Protocol name="Open Sound Control (OSC)" active="no"/>
  </ControlProtocols>

whereas in the ones that won’t load, it looks like this:-


  <ControlProtocols>
    <Protocol name="Ableton Push 2" active="0" session-state="0"/>
    <Protocol name="ContourDesign" active="0" session-state="0"/>
    <Protocol name="Generic MIDI" active="0" session-state="0"/>
    <Protocol name="Mackie" feedback="0" bank="0" ipmidi-base="21928" device-profile="User" device-name="Mackie Control Universal Pro" active="1">
      <Configurations>
        <Configuration name="Mackie Control Universal Pro">
          <Surfaces>
            <Surface name="Mackie Control Universal Pro">
              <Port>
                <Input>
                  <Port name="mackie control in" type="midi" direction="Input"/>
                </Input>
                <Output>
                  <Port name="mackie control out" type="midi" direction="Output"/>
                </Output>
              </Port>
            </Surface>
          </Surfaces>
        </Configuration>
      </Configurations>
    </Protocol>
    <Protocol name="Novation Launch Control XL" active="0" session-state="0"/>
    <Protocol name="Novation LaunchKey 4" active="0" session-state="0"/>
    <Protocol name="Novation LaunchPad Mini" active="0" session-state="0"/>
    <Protocol name="Novation LaunchPad Pro" active="0" session-state="0"/>
    <Protocol name="Novation LaunchPad X" active="0" session-state="0"/>
    <Protocol name="Open Sound Control (OSC)" active="0" session-state="0"/>
    <Protocol name="PreSonus FaderPort" active="0" session-state="0"/>
    <Protocol name="PreSonus FaderPort16" active="0" session-state="0"/>
    <Protocol name="PreSonus FaderPort2" active="0" session-state="0"/>
    <Protocol name="PreSonus FaderPort8" active="0" session-state="0"/>
    <Protocol name="SSL 360: UF8 UF1" active="0" session-state="0"/>
    <Protocol name="Softube Console1" active="0" session-state="0"/>
    <Protocol name="Steinberg CC121" active="0" session-state="0"/>
    <Protocol name="Tascam US-2400" active="0" session-state="0"/>
    <Protocol name="WebSockets Server (Experimental)" active="0" session-state="0"/>
  </ControlProtocols>

I’m not saying that that’s necessarily causing the problem but it’s the only obvious difference I can see. And I’m not really sure why they’d be different anyway??

If you make a copy/backup of that file and edit it to remove those lines, does it work?

Good suggestion. Due to a different problem I’ve had to revert the code for a while and build from some previous code (so the problem’s gone away for the moment). But thanks anyway and I’ll keep that in mind in case it returns.

1 Like