OK, I can't figure out what triggers bug 23, but I found a workaround :)

The crash happens when you open a song with enabled effect(s) AND one of 
the 'effects properties' boxes is already open. Closing those before creating 
the new song prevents the crash.

- J.L.

Index: gui/src/HydrogenApp.h
===================================================================
--- gui/src/HydrogenApp.h	(revision 220)
+++ gui/src/HydrogenApp.h	(working copy)
@@ -87,6 +87,7 @@
 #endif
 		void addEventListener( EventListener* pListener );
 		void removeEventListener( EventListener* pListener );
+		void closeFXProperties();
 
 	public slots:
 		void onEventQueueTimer();
Index: gui/src/HydrogenApp.cpp
===================================================================
--- gui/src/HydrogenApp.cpp	(revision 220)
+++ gui/src/HydrogenApp.cpp	(working copy)
@@ -237,16 +248,19 @@
 }
 
 
-
-void HydrogenApp::setSong(Song* song)
+void HydrogenApp::closeFXProperties()
 {
-
 #ifdef LADSPA_SUPPORT
 	for (uint nFX = 0; nFX < MAX_FX; nFX++) {
-		m_pLadspaFXProperties[nFX]->hide();
+		m_pLadspaFXProperties[nFX]->close();
 	}
 #endif
+}
 
+void HydrogenApp::setSong(Song* song)
+{
+
+
 	Song* oldSong = (Hydrogen::get_instance())->getSong();
 	if (oldSong != NULL) {
 		(Hydrogen::get_instance())->removeSong();
Index: gui/src/MainForm.cpp
===================================================================
--- gui/src/MainForm.cpp	(revision 220)
+++ gui/src/MainForm.cpp	(working copy)
@@ -1168,6 +1167,7 @@
                 engine->sequencer_stop();
 	}
 
+	h2app->closeFXProperties();
 	LocalFileMng mng;
 	Song *pSong = Song::load( sFilename );
 	if ( pSong == NULL ) {
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to