Skip to content

Commit 3aa5d5f

Browse files
committed
Automatic merge of T1.6-139-g6b62c2a7d and 13 pull requests
- Pull request #1082 at 8538170: Allow variable water level in glass gauge - Pull request #1156 at f46d5f2: Fix incorrectly disabled options in train operations window - Pull request #1091 at 492795a: Automatic speed control - Pull request #1122 at 73c47b4: Wagon Size and Centering Controls - Pull request #1124 at e241a0d: Built-in PBL2 brake controller - Pull request #1128 at d116396: Particle Emitter Overhaul - Pull request #1157 at 39cd994: Dynamic brake authorization by TCS - Pull request #1159 at 48c9a63: Skip OR warnings about TSRE-specific token Ruler - Pull request #1163 at 2f9e292: Fix: Crash when using Camera 8 and F9. - Pull request #1164 at 1ad9889: Fix: F9 crashes with a front coupled single steam locomotive by Csantucci. - Pull request #1166 at 51e7f7a: Simplify loading of internal and game textures - Pull request #1167 at 115325f: Fix: RunActivity slow to terminate because of long sleep in Host Process - Pull request #1168 at 6e2942f: Fix exception when exiting with MapForm or SoundDebugForm open.
15 parents e875008 + 6b62c2a + 8538170 + f46d5f2 + 492795a + 73c47b4 + e241a0d + d116396 + 39cd994 + 48c9a63 + 2f9e292 + 1ad9889 + 51e7f7a + 115325f + 6e2942f commit 3aa5d5f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Source/RunActivity/Viewer3D/Processes/GameStateViewer3D.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ internal override void Dispose()
131131
MPManager.Client.Stop();
132132
if (Program.Simulator != null)
133133
Program.Simulator.Stop();
134-
if (Program.MapForm != null)
135-
Program.MapForm.Dispose();
136-
if (Program.SoundDebugForm != null)
137-
Program.SoundDebugForm.Dispose();
134+
// MapForm and SoundDebugForm run in the Renderer thread and need to be disposed there
138135
base.Dispose();
139136
}
140137

Source/RunActivity/Viewer3D/Processes/RenderProcess.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ internal void EndDraw()
359359
internal void Stop()
360360
{
361361
Game.WatchdogProcess.Unregister(WatchdogToken);
362+
363+
// these run in the Renderer thread, and thus cannot be disposed in GameStateViewer3D
364+
if (Program.MapForm != null)
365+
Program.MapForm.Dispose();
366+
if (Program.SoundDebugForm != null)
367+
Program.SoundDebugForm.Dispose();
362368
}
363369

364370
static void SwapFrames(ref RenderFrame frame1, ref RenderFrame frame2)

0 commit comments

Comments
 (0)