add popup message and error log for AU crash reports
authorRobin Gareus <robin@gareus.org>
Wed, 12 Nov 2014 03:57:03 +0000 (04:57 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 12 Nov 2014 12:35:15 +0000 (13:35 +0100)
gtk2_ardour/ardour_ui.cc
libs/ardour/audio_unit.cc

index 2e9d8b3247c43be92d7a2db071ddcff2a70c02fe..03ca13745f0892021fe866d8df48a92e5bcd8887 100644 (file)
@@ -88,6 +88,9 @@
 #ifdef WINDOWS_VST_SUPPORT
 #include <fst.h>
 #endif
+#ifdef AUDIOUNIT_SUPPORT
+#include "ardour/audio_unit.h"
+#endif
 
 #include "timecode/time.h"
 
@@ -483,6 +486,14 @@ ARDOUR_UI::post_engine ()
 {
        /* Things to be done once (and once ONLY) after we have a backend running in the AudioEngine
         */
+#ifdef AUDIOUNIT_SUPPORT
+       std::string au_msg;
+       if (AUPluginInfo::au_get_crashlog(au_msg)) {
+               popup_error(_("Audio Unit Plugin Scan Failed. Automatic AU scanning has been disabled. Please see the log window for further details."));
+               error << _("Audio Unit Plugin Scan Failed:") << endmsg;
+               info << au_msg << endmsg;
+       }
+#endif
 
        ARDOUR::init_post_engine ();
        
index aa98ebb4c8e8951b5636fcb165d8320c96355314..3024c55f437c776df4c226929fc681d4b503fae0 100644 (file)
@@ -2238,6 +2238,7 @@ AUPluginInfo::au_get_crashlog (std::string &msg)
        }
        std::ifstream ifs(fn.c_str());
        msg.assign ((std::istreambuf_iterator<char>(ifs)), (std::istreambuf_iterator<char>()));
+       au_remove_crashlog ();
        return true;
 }