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

System.ArgumentNullException: Value cannot be null #192

Open
emilys314 opened this issue Dec 10, 2023 · 0 comments
Open

System.ArgumentNullException: Value cannot be null #192

emilys314 opened this issue Dec 10, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@emilys314
Copy link

Describe the bug
System.ArgumentNullException: Value cannot be null on any .psc file at the very start and the entire extension stops functioning.

To Reproduce

  1. Latest version of SkyrimSE 1.6.1130.0 and the creation kit.
  2. Open any file added to the ppj (not the creation kit source scripts)
  3. If there are no compiler errors, then this error appears and breaks the intellisense, autocomplete, definitions, etc.
[skyrimse]: Exception: One or more errors occurred.
(System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
   at DarkId.Papyrus.Server.TextDocumentScriptTextProvider.<GetText>d__15.MoveNext() in C:\repo\src\DarkId.Papyrus.Server\TextDocumentScriptTextProvider.cs:line 66
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at DarkId.Papyrus.Common.TaskExtensions.WaitForResult[T](Task`1 task) in C:\repo\src\DarkId.Papyrus.Common\TaskExtensions.cs:line 12
   at DarkId.Papyrus.LanguageService.Program.FlagsFile.<.ctor>b__15_1() in C:\repo\src\DarkId.Papyrus.LanguageService\Program\FlagsFile.cs:line 41
   at DarkId.Papyrus.Common.CachedValue`1.RefreshIfInvalidated() in C:\repo\src\DarkId.Papyrus.Common\CachedValue.cs:line 51
   at DarkId.Papyrus.Common.CachedValue`1.get_Value() in C:\repo\src\DarkId.Papyrus.Common\CachedValue.cs:line 28
   at DarkId.Papyrus.Common.TokenEqualityCachedValue`2.get_Value() in C:\repo\src\DarkId.Papyrus.Common\TokenEqualityCachedValue.cs:line 32
   at DarkId.Papyrus.LanguageService.Program.FlagsFile.<.ctor>b__15_4(DiagnosticResult`1 _) in C:\repo\src\DarkId.Papyrus.LanguageService\Program\FlagsFile.cs:line 66
   at DarkId.Papyrus.Common.TokenEqualityCachedValue`2.<>c__DisplayClass2_0.<.ctor>b__0(TValue value) in C:\repo\src\DarkId.Papyrus.Common\TokenEqualityCachedValue.cs:line 18
   at DarkId.Papyrus.Common.CachedValue`1.RefreshIfInvalidated() in C:\repo\src\DarkId.Papyrus.Common\CachedValue.cs:line 47
   at DarkId.Papyrus.Common.CachedValue`1.get_Value() in C:\repo\src\DarkId.Papyrus.Common\CachedValue.cs:line 28
   at DarkId.Papyrus.Common.TokenEqualityCachedValue`2.get_Value() in C:\repo\src\DarkId.Papyrus.Common\TokenEqualityCachedValue.cs:line 32
   at DarkId.Papyrus.LanguageService.Program.FlagsFile.get_NativeFlagsDict() in C:\repo\src\DarkId.Papyrus.LanguageService\Program\FlagsFile.cs:line 26
   at DarkId.Papyrus.LanguageService.Program.ScriptCompiler..ctor(ScriptFile targetScript, ILogger logger) in C:\repo\src\DarkId.Papyrus.LanguageService\Program\ScriptCompiler.cs:line 206
   at DarkId.Papyrus.LanguageService.Program.ScriptFile.<.ctor>b__34_2() in C:\repo\src\DarkId.Papyrus.LanguageService\Program\ScriptFile.cs:line 111
   at DarkId.Papyrus.Common.CachedValue`1.RefreshIfInvalidated() in C:\repo\src\DarkId.Papyrus.Common\CachedValue.cs:line 51
   at DarkId.Papyrus.Common.CachedValue`1.get_Value() in C:\repo\src\DarkId.Papyrus.Common\CachedValue.cs:line 28
   at DarkId.Papyrus.Common.TokenEqualityCachedValue`2.get_Value() in C:\repo\src\DarkId.Papyrus.Common\TokenEqualityCachedValue.cs:line 32
   at DarkId.Papyrus.LanguageService.Program.ScriptFile.UseCompiler[T](Func`3 action, CompilerErrorEventHandler errorHandler) in C:\repo\src\DarkId.Papyrus.LanguageService\Program\ScriptFile.cs:line 234
   at DarkId.Papyrus.LanguageService.Program.ScriptFile.<.ctor>b__34_12(List`1 diagnostics) in C:\repo\src\DarkId.Papyrus.LanguageService\Program\ScriptFile.cs:line 126
   at DarkId.Papyrus.LanguageService.Program.DiagnosticResult`1.TryWithDiagnostics(Func`2 valueFunc, List`1 diagnostics) in C:\repo\src\DarkId.Papyrus.LanguageService\Program\DiagnosticResult.cs:line 20
---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
   at DarkId.Papyrus.Server.TextDocumentScriptTextProvider.<GetText>d__15.MoveNext() in C:\repo\src\DarkId.Papyrus.Server\TextDocumentScriptTextProvider.cs:line 66<---
)
@emilys314 emilys314 added the bug Something isn't working label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants