View Issue Details

IDProjectCategoryView StatusLast Update
0000018Medieval EngineersBugpublic2020-07-14 22:27
Reportergwindalmir Assigned Togwindalmir  
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformWindowsOS10 1903OS Version10.0.18362
Product Version0.7.2 
Target Version0.7.3.33D4BBFixed in Version0.7.3.33D4BB 
Summary0000018: Canceling mod download causes worker thread to hang
Description

Per deepflame in discord: https://discordapp.com/channels/125011928711036928/313704145695670273/701398326414934087

Anything involving mods, blueprints, and the downloading and display thereof

In MyWorkshop.cs, in UpdateMod(), resetEvent.WaitOne() gets stuck; the reset event is never set.
Cancelling the download and clicking join again will leave this worker thread permanently stuck.
Restarting the game will probably leave ME.exe permanently stuck too.

Server side relevant: No
Client side relevant: Yes - This fixes the download mods in the server browser getting stuck, and it makes the dialog no longer say downloading 3 of 2 mods.

Steps To Reproduce

Clear out mod cache in steamapps
Load ME
Load world with large mods that require some download time
When it says "Download mod 1 of...", press Cancel
Try to load the world again
Notice it never progresses to "Download mod.." again.

Additional Information

This will also cause ME to hang on exit.

TagsWorkshop

Activities

gwindalmir

2020-04-30 03:10

administrator   #~0000004

Upon closer inspection, it looks like it might be related to the fact the game calls the Steam API in multiple threads.
SE's workshop code is nearly identical, and it doesn't have this problem. The key difference is that SE commented out the parallel code and replaced it with a standard foreach loop.

Issue History

Date Modified Username Field Change
2020-04-30 02:50 gwindalmir New Issue
2020-04-30 02:50 gwindalmir Tag Attached: Workshop
2020-04-30 02:50 gwindalmir Description Updated
2020-04-30 03:10 gwindalmir Note Added: 0000004
2020-04-30 06:19 gwindalmir Status new => resolved
2020-04-30 06:19 gwindalmir Resolution open => fixed
2020-04-30 06:19 gwindalmir Fixed in Version => 0.7.3.33D4BB
2020-04-30 06:19 gwindalmir Target Version => 0.7.3.33D4BB
2020-04-30 06:30 gwindalmir Assigned To => gwindalmir
2020-06-04 00:59 gwindalmir Status resolved => closed
2020-06-07 21:58 gwindalmir Status closed => resolved