Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching Thread: Crash when :LAST[x] pass found and [x] is not a valid pass #159

Closed
DRVeyl opened this issue Jul 5, 2020 · 1 comment · Fixed by #160
Closed

Patching Thread: Crash when :LAST[x] pass found and [x] is not a valid pass #159

DRVeyl opened this issue Jul 5, 2020 · 1 comment · Fixed by #160
Assignees
Labels

Comments

@DRVeyl
Copy link

DRVeyl commented Jul 5, 2020

Attached logs provided by a player via Discord. Diagnosed from recent patches in RO, when SCANSat is not installed: @PART[scansat-radar-poseidon-3b-1]:LAST[SCANsat] consistently causes the following MM error, included in player.log:

Uploading Crash Report
[ModuleManager] The patching thread threw an exception: System.Collections.Generic.KeyNotFoundException: Mod 'SCANsat' not found
  at ModuleManager.PatchList.EnsureMod (System.String mod) [0x00051] in <6cc6df54448a4c2b97e086234872a67b>:0 
  at ModuleManager.PatchList..ctor (System.Collections.Generic.IEnumerable`1[T] modList, System.Collections.Generic.IEnumerable`1[T] patches, ModuleManager.Progress.IPatchProgress progress) [0x001fd] in <6cc6df54448a4c2b97e086234872a67b>:0 
  at ModuleManager.MMPatchLoader.Run () [0x0021e] in <6cc6df54448a4c2b97e086234872a67b>:0 
  at ModuleManager.MMPatchRunner+<>c__DisplayClass11_0.<Run>b__1 () [0x00001] in <6cc6df54448a4c2b97e086234872a67b>:0 
  at ModuleManager.Threading.BackgroundTask+<>c__DisplayClass0_0.<Start>g__RunAction|0 () [0x00002] in <6cc6df54448a4c2b97e086234872a67b>:0 

Guarding the patch with :NEEDS[SCANsat] fixes:
@PART[scansat-radar-poseidon-3b-1]:LAST[SCANsat]:NEEDS[SCANsat]

Expected LAST[x] to behave like BEFORE[x] or AFTER[x] and imply NEEDS[x]

ModuleManager_ThreadCrash.zip

@blowfishpro blowfishpro self-assigned this Jul 6, 2020
@blowfishpro blowfishpro added the bug label Jul 6, 2020
@blowfishpro
Copy link
Collaborator

Confirmed and a fix found. However, based on discussion in the original issue (#96) these patches will always run in order (but won't cause MM to consider the mod to exist for other purposes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants