[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/kmid
From:       Pedro Lopez-Cabanillas <pedro.lopez.cabanillas () gmail ! com>
Date:       2010-06-27 17:33:34
Message-ID: 20100627173334.A59BAAC8DF () svn ! kde ! org
[Download RAW message or body]

SVN commit 1143411 by pedrol:

Avoid a crash at startup when loading the ALSA backend and the sequencer modules \
                aren't available. This means two changes:
- Ensure that compilation has "-fvisibility=default" instead of the "hidden" \
                attribute, in addition to -fexceptions.
- Catch generic exceptions in the backend constructor, in case that a distro \
overrides the compiler flags.

BUG: 242912

 M  +1 -1      CMakeLists.txt  
 M  +9 -1      alsa/alsabackend.cpp  


--- trunk/extragear/multimedia/kmid/CMakeLists.txt #1143410:1143411
@@ -20,7 +20,7 @@
     pkg_check_modules (ALSA alsa>=1.0)
     if (ALSA_FOUND)
       set ( WITH_ALSA 1 )
-      set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
+      set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} \
-fvisibility=default" )  # Check for DRUMSTICK
       pkg_check_modules(DRUMSTICK-FILE drumstick-file>=0.3)
       pkg_check_modules(DRUMSTICK-ALSA drumstick-alsa>=0.3)
--- trunk/extragear/multimedia/kmid/alsa/alsabackend.cpp #1143410:1143411
@@ -33,6 +33,8 @@
 #include <KLocale>
 #include <QWidget>
 
+using namespace drumstick;
+
 namespace KMid {
 
     class ALSABackend::BackendPrivate {
@@ -71,7 +73,7 @@
             d->m_output = new ALSAMIDIOutput(this);
             d->m_object->initialize(d->m_output);
             d->m_initialized = true;
-        } catch (SequencerError& ex) {
+        } catch (const SequencerError& ex) {
             QString errorstr = i18nc("@info","Fatal error from the ALSA sequencer \
                backend. "
                 "This usually happens when the kernel does not have ALSA support, "
                 "the device node (/dev/snd/seq) does not exist, "
@@ -79,6 +81,12 @@
                 "Please check your ALSA/MIDI configuration. "
                 "Returned error was: %1", ex.qstrError());
             KMessageBox::error(0, errorstr, i18nc("@title:window","ALSA Sequencer \
Backend Error")); +        } catch (...) {
+        	kDebug() << "Fatal error from the ALSA sequencer backend. "
+            "This usually happens when the kernel does not have ALSA support, "
+            "the device node (/dev/snd/seq) does not exist, "
+            "or the kernel module (snd_seq) is not loaded. "
+            "Please check your ALSA/MIDI configuration. ";
         }
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic