Summary: | K3B crashed when I started it multiple times (opening an ISO file) [null QMainWindow::setStatusBar, KMainWindow::statusBar, K3b::MainWindow::slotStatusMsg] | ||
---|---|---|---|
Product: | [Applications] k3b | Reporter: | Unknown <null> |
Component: | general | Assignee: | Michał Małek <michalm> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | andresbajotierra, kontrik, trueg |
Priority: | NOR | ||
Version: | 2.0.1 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.0.2 |
Description
Unknown
2010-10-10 23:34:40 UTC
[Comment from a bug triager] From bug 257439: - What I was doing when the application crashed: K3b crashed when open .iso file from mounted as read-only NTFS disc *** Bug 257439 has been marked as a duplicate of this bug. *** commit c86e7b784236befde86940ba70c9dce21f0a3589 branch 2.0 Author: Michal Malek <michalm@jabster.pl> Date: Mon Jan 3 23:40:09 2011 +0100 Fixed race condition when running multiple k3b instances at the same time BUG: 253794 diff --git a/ChangeLog b/ChangeLog index dc56653..7b8a80b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ Bugfixes: * Crash when showing settings window (238819) * Fixed playlist sort order (249395) * Show K3b also in "System" category in KDE launch menus (250749) + * Crash when multiple instances start at the same time (253794) 2.0.1 ===== diff --git a/src/k3bapplication.cpp b/src/k3bapplication.cpp index 069bca1..82c140d 100644 --- a/src/k3bapplication.cpp +++ b/src/k3bapplication.cpp @@ -63,8 +63,7 @@ K3b::Application::Core* K3b::Application::Core::s_k3bAppCore = 0; K3b::Application::Application() : KUniqueApplication(), - m_mainWindow(0), - m_needToInit(true) + m_mainWindow(0) { // insert library i18n data KGlobal::locale()->insertCatalog( "libk3bdevice" ); @@ -153,19 +152,19 @@ void K3b::Application::init() int K3b::Application::newInstance() { - if( m_needToInit ) { - // init(); - m_needToInit = false; - } - else - processCmdLineArgs(); - + processCmdLineArgs(); return KUniqueApplication::newInstance(); } bool K3b::Application::processCmdLineArgs() { + // There were cases when newInstance() has been called before init() + // (when user run k3b two times at once). It resulted in crash. So we + // check here if m_mainWindow is initalized and if not, we go back. + if( !m_mainWindow ) + return false; + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); bool showTips = true; diff --git a/src/k3bapplication.h b/src/k3bapplication.h index 9249191..9038806 100644 --- a/src/k3bapplication.h +++ b/src/k3bapplication.h @@ -62,8 +62,6 @@ namespace K3b { Core* m_core; //AudioServer* m_audioServer; MainWindow* m_mainWindow; - - bool m_needToInit; }; commit c39f3bd1b700a074b29cdb578674c8e8f2740aee branch master Author: Michal Malek <michalm@jabster.pl> Date: Mon Jan 3 23:40:09 2011 +0100 Fixed race condition when running multiple k3b instances at the same time BUG: 253794 diff --git a/ChangeLog b/ChangeLog index 61499ce..a9f6443 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ Bugfixes: * Crash when showing settings window (238819) * Fixed playlist sort order (249395) * Show K3b also in "System" category in KDE launch menus (250749) + * Crash when multiple instances start at the same time (253794) 2.0.1 ===== diff --git a/src/k3bapplication.cpp b/src/k3bapplication.cpp index 847362b..13707f7 100644 --- a/src/k3bapplication.cpp +++ b/src/k3bapplication.cpp @@ -61,8 +61,7 @@ K3b::Application::Core* K3b::Application::Core::s_k3bAppCore = 0; K3b::Application::Application() : KUniqueApplication(), - m_mainWindow(0), - m_needToInit(true) + m_mainWindow(0) { // insert library i18n data KGlobal::locale()->insertCatalog( "libk3bdevice" ); @@ -151,19 +150,19 @@ void K3b::Application::init() int K3b::Application::newInstance() { - if( m_needToInit ) { - // init(); - m_needToInit = false; - } - else - processCmdLineArgs(); - + processCmdLineArgs(); return KUniqueApplication::newInstance(); } bool K3b::Application::processCmdLineArgs() { + // There were cases when newInstance() has been called before init() + // (when user run k3b two times at once). It resulted in crash. So we + // check here if m_mainWindow is initalized and if not, we go back. + if( !m_mainWindow ) + return false; + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); bool showTips = true; diff --git a/src/k3bapplication.h b/src/k3bapplication.h index 0554494..5cced79 100644 --- a/src/k3bapplication.h +++ b/src/k3bapplication.h @@ -60,8 +60,6 @@ namespace K3b { Core* m_core; //AudioServer* m_audioServer; MainWindow* m_mainWindow; - - bool m_needToInit; }; |