JetBrains / JetBrains/resharper-unity

Assertions/errors about IsMapping()

Open
#2,454 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

Hi, we're running the Rider Package 3.0.31 (latest) against Unity 2022.3.21 and are getting these errors, does anyone know how we might clear these please?

Assertion failed on expression: 'IsMapping()'
Tried to get mapping information from scalar node

Both happen at

```
Assertion failed on expression: 'IsMapping()'
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Packages.Rider.Editor.Util.FileSystemUtil:GetFinalPathName (string) (at ./Library/PackageCache/com.unity.ide.rider@3.0.27/Rider/Editor/Util/FileSystemUtil.cs:20)
Packages.Rider.Editor.RiderScriptEditor:GetEditorRealPath (string) (at ./Library/PackageCache/com.unity.ide.rider@3.0.27/Rider/Editor/RiderScriptEditor.cs:79)
Packages.Rider.Editor.RiderScriptEditor:TryGetInstallationForPath (string,Unity.CodeEditor.CodeEditor/Installation&) (at ./Library/PackageCache/com.unity.ide.rider@3.0.27/Rider/Editor/RiderScriptEditor.cs:376)
Unity.CodeEditor.CodeEditor:GetCodeEditorForPath (string) (at /Users/bokken/build/output/unity/unity/Editor/Mono/CodeEditor/CodeEditor.cs:140)
Unity.CodeEditor.CodeEditor:ComputeCurrentEditor (string) (at /Users/bokken/build/output/unity/unity/Editor/Mono/CodeEditor/CodeEditor.cs:205)
Unity.CodeEditor.CodeEditor:SetCodeEditor (string) (at /Users/bokken/build/output/unity/unity/Editor/Mono/CodeEditor/CodeEditor.cs:181)
Unity.CodeEditor.CodeEditor:Register (Unity.CodeEditor.IExternalCodeEditor) (at /Users/bokken/build/output/unity/unity/Editor/Mono/CodeEditor/CodeEditor.cs:215)
Packages.Rider.Editor.RiderScriptEditor:.cctor () (at ./Library/PackageCache/com.unity.ide.rider@3.0.27/Rider/Editor/RiderScriptEditor.cs:33)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes (System.Type[])
```

We're running multiple flavors of Rider (2022.1.2, 2022.2.3, 2022.3.1) if it helps.

This is happening for MacOS as well as Windows. On my MacOS box, my Rider is installed at:

/Applications/Rider.app/Contents/MacOS

Does anyone know what is causing this error? These warnings are making it hard for non-engineers from reporting actual problems in our game

Jeff

Contributor guide

Open the contributing guide

Research direction

Start with the stack trace entries in Rider/Editor/Util/FileSystemUtil.cs:20 and Rider/Editor/RiderScriptEditor.cs:79, 376, and 33. Reproduce the initialization path on Unity 2022.3.21 with the Rider package and inspect how the installation path is resolved on macOS and Windows. Done means the assertions no longer appear during editor initialization while Rider detection still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
devtools, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.