From 1ac01d9a271dec29709afda268f225e979c8caba Mon Sep 17 00:00:00 2001 From: aren-cllc Date: Wed, 8 Feb 2017 16:17:28 +0100 Subject: [PATCH 1/3] This should help debug the tutorial hang issue Please don't merge this yet, as VS may have messed something up again. I will comment once I checked if everything works. --- ShiftOS.WinForms/Oobe.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs index 98aaebd..dbec174 100644 --- a/ShiftOS.WinForms/Oobe.cs +++ b/ShiftOS.WinForms/Oobe.cs @@ -210,11 +210,12 @@ namespace ShiftOS.WinForms SaveSystem.SaveGame(); Thread.Sleep(3000); - this.Invoke(new Action(() => - { + try { TutorialManager.StartTutorial(); - })); - TutorialManager.StartTutorial(); + } catch (Exeption e) { + TextType("An error has occoured while starting the tutorial"); + TextType(e.ToString()); + } this.Close(); } catch(Exception e) @@ -368,7 +369,9 @@ namespace ShiftOS.WinForms Shiftorium.Silent = false; foreach(var frm in AppearanceManager.OpenForms) { - frm.Close(); + (frm as Form).Invoke(new Action(() => { + frm.Close(); + })); } TerminalBackend.CommandProcessed += (cmd, args) => From 4164394fc298ad1f53eab90182257e8740c74bc2 Mon Sep 17 00:00:00 2001 From: aren-cllc Date: Wed, 8 Feb 2017 16:22:19 +0100 Subject: [PATCH 2/3] Update Oobe.cs --- ShiftOS.WinForms/Oobe.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs index dbec174..bce19e2 100644 --- a/ShiftOS.WinForms/Oobe.cs +++ b/ShiftOS.WinForms/Oobe.cs @@ -212,7 +212,7 @@ namespace ShiftOS.WinForms Thread.Sleep(3000); try { TutorialManager.StartTutorial(); - } catch (Exeption e) { + } catch (Exception e) { TextType("An error has occoured while starting the tutorial"); TextType(e.ToString()); } From 42cfccfdbe5473bac0701cf805756b41bbd4f288 Mon Sep 17 00:00:00 2001 From: aren-cllc Date: Wed, 8 Feb 2017 16:34:45 +0100 Subject: [PATCH 3/3] Comment out stuff for debugging purposes --- ShiftOS.WinForms/Oobe.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs index bce19e2..8eef34a 100644 --- a/ShiftOS.WinForms/Oobe.cs +++ b/ShiftOS.WinForms/Oobe.cs @@ -216,7 +216,7 @@ namespace ShiftOS.WinForms TextType("An error has occoured while starting the tutorial"); TextType(e.ToString()); } - this.Close(); + //this.Close(); // This has been commented out because the form closes when the error appears. Uncomment this if no more errors appear } catch(Exception e) {