Search Issue Tracker
Fixed
Votes
14
Found in [Package]
1.1.4
Issue ID
VSC-8
Regression
Yes
IndexOutOfRangeException is thrown when opening a project with Visual Studio Code set as preferred External Script Editor
How to reproduce:
1. Create and open a project
2. In 'Preferences' > 'External Tools' set Visual Studio Code as your preferred External Script Editor
3. Re-open the project
4. Observe the Console window
Expected result: no errors are thrown
Actual result: IndexOutOfRangeException is thrown
Reproducible with: 2019.2.20f1, 2019.3.0f6, 2020.1.0a22 (1.1.4)
Not reproducible with: 2019.2.20f1, 2019.3.0f6, 2020.1.0a22 (1.0.2, 1.1.2, 1.1.3)
Could not test with: 2017.4.36f1, 2018.4.17f1 (package not available)
Note: in 2019.2.20f1 the issue reproduces after installing the 1.1.4 package version instead of opening the Editor
Thrown exception:
IndexOutOfRangeException: Index was outside the bounds of the array.
VSCodeEditor.ProjectGeneration.<SyncIfNeeded>b__25_0 (System.String asset) (at Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs:175)
System.Linq.Enumerable+SelectListIterator`2[TSource,TResult].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Asset Bundles retain their previous hash and CRC values when an object within a bundle is changed and rebuilt
- APV Reflection Probe Normalization breaks when SSGI is enabled
- Default Custom Components in project have Library counterparts
- [iOS]"The destination host has an erroneous SSL certificate" error is thrown when using UnityWebRequest to connect to the server with a self-signed certificate
- Freeze/crash on DynamicHeapAllocator::Allocate when opening a specific project
UDN_f80b201d-9653-4c20-8aec-edc4445f4637
Mar 22, 2020 22:19
Installing mono I've fixed the problem!
Shpinxis
Mar 10, 2020 03:37
Really hoping this gets fixed, it's really annoying.
polyphonic13
Feb 29, 2020 16:31
I am getting the same error with Editor v2019.3.2f1. This is happening with an existing game. It only started happening after a delete of ProjectSettings directory (due to a different, build issue.)
Masiorama
Feb 24, 2020 19:11
Same for me.
jhon-avila
Feb 23, 2020 19:35
I am having this problem also, it's quite annoying...
bao007fei
Feb 20, 2020 13:24
1.1.3 works fine.
1.1.4 throw this error all the time. pretty annoying.
IlkerHadzhalaran
Feb 04, 2020 16:29
I have the same issue
Cool_Flow
Feb 03, 2020 11:43
While this is a annoying bug there is a quick workaround. Go into your package manager and downgrade Visual Studio Code Editor from 1.1.4 to 1.1.3. The issue will be fixed immediately.
Organik05
Feb 02, 2020 23:48
I have this same issue!
qvinh222
Feb 02, 2020 22:35
I have the same problem.
Unity 2019.3.0f6
VScode package 1.1.4
error:
IndexOutOfRangeException: Index was outside the bounds of the array.
VSCodeEditor.ProjectGeneration.<SyncIfNeeded>b__25_0 (System.String asset) (at Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs:175)
System.Linq.Enumerable+SelectListIterator`2[TSource,TResult].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Collections.Generic.HashSet`1[T].UnionWith (System.Collections.Generic.IEnumerable`1[T] other) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Collections.Generic.HashSet`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Collections.Generic.HashSet`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
VSCodeEditor.ProjectGeneration.SyncIfNeeded (System.Collections.Generic.List`1[T] affectedFiles, System.String[] reimportedFiles) (at Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs:177)
VSCodeEditor.VSCodeScriptEditor.SyncIfNeeded (System.String[] addedFiles, System.String[] deletedFiles, System.String[] movedFiles, System.String[] movedFromFiles, System.String[] importedFiles) (at Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeScriptEditor.cs:139)
UnityEditor.CodeEditorProjectSync.PostprocessSyncProject (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)