#45 Jack: "subgraph starting at bristol timed out" on exit


Whenever bristol actually exits there is a jack error messages on its graph. The cause is the shutdown procedure used by bristol.

It does not happen when an arbitrary emulator is stopped, only the last one however since Jack is more than likely to be managing more than just bristol this problem needs to be removed.

The cause is the shutdown procedure:

The MIDI thread received an event from the GUI to terminate an emulator
The MIDI thread flags the audio thread to do the work (it cannot be done from the midi thread since the structures are not really owned by it).
The audio thread is only called by jack, and when the last emulator exits then the whole application needs to start cleanup.
The cleanup code is rather long and drawn out which causes jack timeouts as it occurs in the same audio thread.

The fix will be something like this:

MIDI thread requests exit of an emulator
Audio thread cleans up the the single emulator. If it was the last it will unregister Jack (deactivate the handle).
The MIDI thread will wait until audio does the emulator clean up, then it will do the rest of the cleanup.


  • Nick Copeland

    Nick Copeland - 2009-05-25

    Submitted code so that the audiothread will clean up the emulators and then simply return empty buffers when the emulator list is empty. The MIDI thread then deregisters/deactivates the handles gracefully preventing the subgraph timeout. Only then the different threads and the app are requested to exit.

  • Nick Copeland

    Nick Copeland - 2009-05-25
    • status: open --> pending-fixed
  • Nick Copeland

    Nick Copeland - 2009-05-26
    • status: pending-fixed --> closed-fixed
  • Nick Copeland

    Nick Copeland - 2009-05-26

    Fix was uploaded with 0.40.3


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks