Fix another crash at exit.

During ARDOUR_UI::finish(), after destroying various instances:
close_all_dialogs() -> ArdourDialog::on_response() -> GUIIdle()

The event loop recurses and may execute a previously scheduled
Editor::idle_visual_changer()
This commit is contained in:
Robin Gareus 2017-07-03 14:03:10 +02:00
parent e9ee454ced
commit d9767b10ac
3 changed files with 16 additions and 1 deletions

View File

@ -67,6 +67,17 @@ ArdourDialog::on_response (int response_id)
Gtk::Dialog::on_response (response_id);
}
void
ArdourDialog::close_self ()
{
/* Don't call Idle, don't pop splash.
* This is used at exit and session-close and invoked
* via close_all_dialogs.
*/
hide ();
Gtk::Dialog::on_response (RESPONSE_CANCEL);
}
void
ArdourDialog::pop_splash ()
{
@ -138,7 +149,7 @@ ArdourDialog::init ()
set_transient_for (*parent);
}
ARDOUR_UI::CloseAllDialogs.connect (sigc::bind (sigc::mem_fun (*this, &ArdourDialog::response), RESPONSE_CANCEL));
ARDOUR_UI::CloseAllDialogs.connect (sigc::mem_fun (*this, &ArdourDialog::close_self)); /* send a RESPONSE_CANCEL to self */
proxy = new WM::ProxyTemporary (get_title(), this);
WM::Manager::instance().register_window (proxy);

View File

@ -51,6 +51,7 @@ public:
protected:
void pop_splash ();
void close_self ();
private:
WM::ProxyTemporary* proxy;

View File

@ -53,6 +53,9 @@ Editor::set_video_timeline_height (const int h)
void
Editor::update_video_timeline (bool flush)
{
// catch GUIIdle -> Editor::idle_visual_changer during quit/close
assert (ARDOUR_UI::instance()->video_timeline);
if (flush) {
ARDOUR_UI::instance()->video_timeline->flush_local_cache();
}