# HG changeset patch # User Chris Cannam # Date 1196443869 0 # Node ID a3011df6ddade47196ae35abd29da2a04809768b # Parent 474ddd0f4bb44760a913d32b1accdfd7fa96e43f * Skip ID3 block when reading MP3 files (so long as ID3 support is included) * Show progress when retrieving audio file from playlist * Avoid -- but do not actually fix -- segmentation fault on exit. I am totally stumped at the moment about why both the PA and JACK audio targets should crash when properly shut down. For the moment, we just don't shut them down... * Fix incorrect behaviour (introduced on Friday as part of a different fix) when replacing main model in situation where no current main model exists diff -r 474ddd0f4bb4 -r a3011df6ddad main/MainWindow.cpp --- a/main/MainWindow.cpp Thu Nov 29 10:50:13 2007 +0000 +++ b/main/MainWindow.cpp Fri Nov 30 17:31:09 2007 +0000 @@ -24,6 +24,7 @@ #include "data/model/SparseOneDimensionalModel.h" #include "data/model/NoteModel.h" #include "data/model/Labeller.h" +#include "data/osc/OSCQueue.h" #include "framework/Document.h" #include "view/ViewManager.h" #include "base/Preferences.h" diff -r 474ddd0f4bb4 -r a3011df6ddad main/main.cpp --- a/main/main.cpp Thu Nov 29 10:50:13 2007 +0000 +++ b/main/main.cpp Fri Nov 30 17:31:09 2007 +0000 @@ -266,8 +266,8 @@ qRegisterMetaType("size_t"); qRegisterMetaType("PropertyContainer::PropertyName"); - MainWindow gui(audioOutput, oscSupport); - application.setMainWindow(&gui); + MainWindow *gui = new MainWindow(audioOutput, oscSupport); + application.setMainWindow(gui); QDesktopWidget *desktop = QApplication::desktop(); QRect available = desktop->availableGeometry(); @@ -280,18 +280,18 @@ QSettings settings; settings.beginGroup("MainWindow"); QSize size = settings.value("size", QSize(width, height)).toSize(); - gui.resize(size); + gui->resize(size); if (settings.contains("position")) { - gui.move(settings.value("position").toPoint()); + gui->move(settings.value("position").toPoint()); } settings.endGroup(); - gui.show(); + gui->show(); // The MainWindow class seems to have trouble dealing with this if // it tries to adapt to this preference before the constructor is // complete. As a lazy hack, apply it explicitly from here - gui.preferenceChanged("Property Box Layout"); + gui->preferenceChanged("Property Box Layout"); bool haveSession = false; bool haveMainModel = false; @@ -308,7 +308,7 @@ if (path.endsWith("sv")) { if (!haveSession) { - status = gui.openSessionFile(path); + status = gui->openSessionFile(path); if (status == MainWindow::FileOpenSucceeded) { haveSession = true; haveMainModel = true; @@ -320,24 +320,24 @@ } if (status != MainWindow::FileOpenSucceeded) { if (!haveMainModel) { - status = gui.open(path, MainWindow::ReplaceMainModel); + status = gui->open(path, MainWindow::ReplaceMainModel); if (status == MainWindow::FileOpenSucceeded) { haveMainModel = true; } } else { if (haveSession && !havePriorCommandLineModel) { - status = gui.open(path, MainWindow::AskUser); + status = gui->open(path, MainWindow::AskUser); if (status == MainWindow::FileOpenSucceeded) { havePriorCommandLineModel = true; } } else { - status = gui.open(path, MainWindow::CreateAdditionalModel); + status = gui->open(path, MainWindow::CreateAdditionalModel); } } } if (status == MainWindow::FileOpenFailed) { QMessageBox::critical - (&gui, QMessageBox::tr("Failed to open file"), + (gui, QMessageBox::tr("Failed to open file"), QMessageBox::tr("File or URL \"%1\" could not be opened").arg(path)); } } @@ -359,10 +359,11 @@ } */ int rv = application.exec(); -// std::cerr << "application.exec() returned " << rv << std::endl; + std::cerr << "application.exec() returned " << rv << std::endl; cleanupMutex.lock(); TempDirectory::getInstance()->cleanup(); + application.releaseMainWindow(); #ifdef HAVE_FFTW3F @@ -375,5 +376,7 @@ } #endif + delete gui; + return rv; }