Index: trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs
===================================================================
--- trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs	(revision 4513)
+++ trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs	(revision 4515)
@@ -32,4 +32,5 @@
     private Timer fadeTimer;
     private int initialInterval;
+    private PluginManager pluginManager;
 
     internal SplashScreen() {
@@ -40,11 +41,7 @@
       : this() {
       this.initialInterval = initialInterval;
+      this.pluginManager = manager;
 
-      manager.ApplicationStarted += new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarted);
-      manager.ApplicationStarting += new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarting);
-      manager.Initializing += new EventHandler<PluginInfrastructureEventArgs>(manager_Initializing);
-      manager.Initialized += new EventHandler<PluginInfrastructureEventArgs>(manager_Initialized);
-      manager.PluginLoaded += new EventHandler<PluginInfrastructureEventArgs>(manager_PluginLoaded);
-      manager.PluginUnloaded += new EventHandler<PluginInfrastructureEventArgs>(manager_PluginUnloaded);
+      RegisterPluginManagerEventHandlers();
 
       FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
@@ -60,27 +57,60 @@
     }
 
-    void manager_PluginUnloaded(object sender, PluginInfrastructureEventArgs e) {
-      UpdateMessage("Unloaded " + e.Entity);
+    #region events
+    private void RegisterPluginManagerEventHandlers() {
+      pluginManager.ApplicationStarted += new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarted);
+      pluginManager.ApplicationStarting += new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarting);
+      pluginManager.Initializing += new EventHandler<PluginInfrastructureEventArgs>(manager_Initializing);
+      pluginManager.Initialized += new EventHandler<PluginInfrastructureEventArgs>(manager_Initialized);
+      pluginManager.PluginLoaded += new EventHandler<PluginInfrastructureEventArgs>(manager_PluginLoaded);
+      pluginManager.PluginUnloaded += new EventHandler<PluginInfrastructureEventArgs>(manager_PluginUnloaded);
     }
 
-    void manager_PluginLoaded(object sender, PluginInfrastructureEventArgs e) {
-      UpdateMessage("Loaded " + e.Entity);
+    private void DeregisterPluginManagerEventHandlers() {
+      pluginManager.ApplicationStarted -= new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarted);
+      pluginManager.ApplicationStarting -= new EventHandler<PluginInfrastructureEventArgs>(manager_ApplicationStarting);
+      pluginManager.Initializing -= new EventHandler<PluginInfrastructureEventArgs>(manager_Initializing);
+      pluginManager.Initialized -= new EventHandler<PluginInfrastructureEventArgs>(manager_Initialized);
+      pluginManager.PluginLoaded -= new EventHandler<PluginInfrastructureEventArgs>(manager_PluginLoaded);
+      pluginManager.PluginUnloaded -= new EventHandler<PluginInfrastructureEventArgs>(manager_PluginUnloaded);
     }
 
-    void manager_Initialized(object sender, PluginInfrastructureEventArgs e) {
-      UpdateMessage("Initialized");
+    private void manager_PluginUnloaded(object sender, PluginInfrastructureEventArgs e) {
+      SafeUpdateMessage("Unloaded " + e.Entity);
     }
 
-    void manager_Initializing(object sender, PluginInfrastructureEventArgs e) {
-      UpdateMessage("Initializing");
+    private void manager_PluginLoaded(object sender, PluginInfrastructureEventArgs e) {
+      SafeUpdateMessage("Loaded " + e.Entity);
     }
 
-    void manager_ApplicationStarting(object sender, PluginInfrastructureEventArgs e) {
-      UpdateMessage("Starting " + e.Entity);
+    private void manager_Initialized(object sender, PluginInfrastructureEventArgs e) {
+      SafeUpdateMessage("Initialized");
     }
 
-    void manager_ApplicationStarted(object sender, PluginInfrastructureEventArgs e) {
-      UpdateMessage("Started " + e.Entity);
+    private void manager_Initializing(object sender, PluginInfrastructureEventArgs e) {
+      SafeUpdateMessage("Initializing");
     }
+
+    private void manager_ApplicationStarting(object sender, PluginInfrastructureEventArgs e) {
+      SafeUpdateMessage("Starting " + e.Entity);
+    }
+
+    private void manager_ApplicationStarted(object sender, PluginInfrastructureEventArgs e) {
+      SafeUpdateMessage("Started " + e.Entity);
+    }
+    // called from event handlers
+    private void SafeUpdateMessage(string msg) {
+      try {
+        Invoke((Action<string>)UpdateMessage, msg);
+      }
+      catch (ObjectDisposedException) { }
+    }
+
+    // each tick of the timer reduce opacity and restart timer
+    private void fadeTimer_Elapsed(object sender, EventArgs e) {
+      // only called from local timer: no need to invoke here
+      FadeOut();
+    }
+    #endregion
 
     public void Show(string initialText) {
@@ -95,5 +125,5 @@
 
     public void Show(IWin32Window owner, string initialText) {
-      if (InvokeRequired) Invoke((Action<string>)Show, initialText);
+      if (InvokeRequired) Invoke((Action<IWin32Window, string>)Show, owner, initialText);
       else {
         Opacity = 1;
@@ -111,25 +141,8 @@
     }
 
-
-    private void SetInfoText(string text) {
-      if (InvokeRequired) Invoke((Action<string>)SetInfoText, text);
-      else {
-        infoLabel.Text = text;
-      }
-    }
-
     private void UpdateMessage(string msg) {
-      if (InvokeRequired) {
-        Invoke((Action<string>)UpdateMessage, msg);
-      } else {
-        ResetFadeTimer();
-        SetInfoText(msg);
-        Application.DoEvents(); // force immediate update of splash screen control
-      }
-    }
-
-    // each tick of the timer reduce opacity and restart timer
-    private void fadeTimer_Elapsed(object sender, EventArgs e) {
-      FadeOut();
+      ResetFadeTimer();
+      infoLabel.Text = msg;
+      Application.DoEvents(); // force immediate update of splash screen control
     }
 
@@ -147,4 +160,10 @@
       }
     }
+
+    protected override void OnClosing(System.ComponentModel.CancelEventArgs e) {
+      // deregister events when form is closing
+      DeregisterPluginManagerEventHandlers();
+      base.OnClosing(e);
+    }
   }
 }
Index: trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs
===================================================================
--- trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs	(revision 4513)
+++ trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs	(revision 4515)
@@ -176,4 +176,5 @@
 
     private void MainForm_FormClosing(object sender, FormClosingEventArgs e) {
+      splashScreen.Close();
       abortRequested = true;
     }
