Error opening a session

Hi all,

in Ardour6, if I close a session and open another recent one, it gives me these errors:


ERROR: JACK: Cannot callback the server in notification thread!
Cannot initialize session/engine: Port registration failed.
---ERROR: unable to create port 'MIDI Clock in': failed constructor

Instead, if I turn off Ardour and restart it by opening the same session first, then it opens it correctly.

This is the first time this has happened, it has always worked, but I have no idea what could have happened.
How can I solve?

[I use Ardour 6.9.0 “After Bach” (rev 6.9) Intel 64-bit - debug on Ubuntu 18.04]

Thank you,

a.