Reporter |
|
---|---|
Created | Nov 20, 2017 7:54:18 PM |
Updated | Apr 9, 2018 8:14:22 PM |
Resolved | Apr 9, 2018 8:14:22 PM |
Subsystem | JavaScript |
Assignee | Nikita Popov (poksh) |
Priority | Critical |
State | Fixed |
Type | Bug |
Fix version | 2018.1 |
Affected versions | No Affected versions |
Fixed In Version ReSharper | 2018.1 EAP 7 |
VsVersion | All Versions |
An "Index was outside of bounds of array" exception is thrown when typing anywhere in a JSON file with the following contents:
and the following schema:
Stacktrace:
See also DEXP-307235
{
"name": "Thing",
"references": ["Thing", "Thing"],
"includePlatforms": [ "Android", "Android" ],
"excludePlatforms": ["iOS"]
}
and the following schema:
{
"schema": "http://json-schema.org/draft-06/schema#",
"title": "Unity Assembly Definition",
"description": "Defines an assembly in the Unity compilation pipeline",
"type": "object",
"properties": {
"name": {
"description": "The name of the assembly being defined",
"type": "string",
"minLength": 1
},
"references": {
"description": "A list of names of assemblies to reference",
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
"includePlatforms": {
"description": "Platforms to target",
"$ref": "#/definitions/platformValues",
"uniqueItems": true
},
"excludePlatforms": {
"description": "Platforms that are explicitly not targeted",
"$ref": "#/definitions/platformValues",
"uniqueItems": true
}
},
"definitions": {
"platformValues": {
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"StandaloneOSX",
"StandaloneWindows",
"iOS",
"Android",
"StandaloneLinux",
"StandaloneWindows64",
"WebGL",
"WSAPlayer",
"StandaloneLinux64",
"StandaloneLinuxUniversal",
"Tizen",
"PSP2",
"PS4",
"XboxOne",
"N3DS",
"WiiU",
"tvOS",
"Switch"
]
}
}
},
"required": ["name"],
"anyOf": [
{
"properties": {
"includePlatforms": {
"minItems": 1
},
"excludePlatforms": {
"maxItems": 0
}
}
},
{
"properties": {
"includePlatforms": {
"maxItems": 0
},
"excludePlatforms": {
"minItems": 1
}
}
},
{
"properties": {
"includePlatforms": {
"maxItems": 0
},
"excludePlatforms": {
"maxItems": 0
}
}
}
]
}
Stacktrace:
Index was outside the bounds of the array.
--- EXCEPTION #1/2 [IndexOutOfRangeException]
Message = “Index was outside the bounds of the array.”
ExceptionPath = Root.InnerException
ClassName = System.IndexOutOfRangeException
HResult = COR_E_INDEXOUTOFRANGE=80131508
Source = JetBrains.ReSharper.Psi.Web
StackTraceString = “
at JetBrains.ReSharper.Psi.JavaScript.Impl.Services.Json.Schema.ArrayConstraint.Assert(IJavaScriptTreeNode node, ValidationOptions options)
at JetBrains.ReSharper.Psi.JavaScript.Impl.Services.Json.Schema.ObjectConstraint.Assert(IJavaScriptTreeNode node, ValidationOptions options)
at JetBrains.ReSharper.Psi.JavaScript.Impl.Services.Json.Schema.AnyOfConstraint.Assert(IJavaScriptTreeNode node, ValidationOptions options)
at JetBrains.ReSharper.Psi.JavaScript.Impl.Services.Json.Schema.AllOfConstraint.Assert(IJavaScriptTreeNode node, ValidationOptions options)
at JetBrains.ReSharper.Psi.JavaScript.Impl.Services.Json.Schema.JsonSchema.Validate(IJavaScriptExpression node, ValidationOptions options)
at JetBrains.ReSharper.Daemon.JavaScript.Stages.JSon.JsonInspectionsProcess.ValidateSchema(IJavaScriptFile file, IHighlightingConsumer consumer)
at JetBrains.ReSharper.Daemon.JavaScript.JavaScriptDaemonStageProcessBase.HighlightInFile(Action`2 fileHighlighter, Action`1 commiter)
at JetBrains.ReSharper.Daemon.JavaScript.Stages.JSon.JsonInspectionsProcess.Execute(Action`1 committer)
at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass10.<>c__DisplayClass13.<DoHighlighting>b__b(IDaemonStage stage)
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “Index was outside the bounds of the array.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = DaemonThread
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2017.3 EAP 3 Build 111.0.20171027.81346-eap03”
Data.SubProducts.#0 = “JetBrains dotCover 2017.3 EAP 3 Build 2017.3.20171027.123459-eap03”
Data.SubProducts.#1 = “JetBrains dotTrace 2017.3 EAP 3 Build 2017.3.20171027.123513-eap03”
Data.SubProducts.#2 = “JetBrains ReSharper C++ 2017.3 EAP 3 Build 2017.3.20171027.120858-eap03”
Data.SubProducts.#3 = “JetBrains ReSharper 2017.3 EAP 3 Build 2017.3.20171027.120858-eap03”
Data.SubProducts.#4 = “JetBrains dotMemory 2017.3 EAP 3 Build 2017.3.20171027.123539-eap03”
Data.SccRevisionEnv = “
Platform\Core\Shell,
Platform\VisualStudio:
git::refs/heads/wave11-eap3::55848a9a87b0f68073fa59a27771b10802fb077e
”
Data.VsVersion = 15.4.27004.2009
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass10.<>c__DisplayClass13.<DoHighlighting>b__b(IDaemonStage stage)
at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass10.<>c__DisplayClass1d.<DoHighlighting>b__e()
at JetBrains.Application.Threading.Tasks.TaskBarrier.<>c__DisplayClass14.<>c__DisplayClass16.<EnqueueDependentJobs>b__12()
at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClasse.<Create>b__a(Object state)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued)
at System.Threading.Tasks.Task.WrappedTryRunInline()
at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at JetBrains.Application.Threading.Tasks.TaskBarrier.DisposeUnmanagedResources()
at JetBrains.Util.SafeDisposable.DisposeInternal()
at JetBrains.Util.SafeDisposable.Dispose()
at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass10.<DoHighlighting>b__9()
at JetBrains.Application.Notifications.PerformanceUserNotifications.<>c__DisplayClass7.<WithPerformanceNotification>b__6(Lifetime lifetime)
at JetBrains.DataFlow.Lifetimes.Using(Lifetime parent, Action`1 λ)
at JetBrains.Application.Notifications.PerformanceUserNotifications.WithPerformanceNotification(TimeSpan performanceThreshold, String title, String body, Action action)
at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.DoHighlighting(DaemonProcessKind processKind, Action`1 commiter)
at JetBrains.ReSharper.Daemon.Impl.VisibleDocumentDaemonProcess.DoHighlighting(Boolean globalAnalysisStages)
at JetBrains.ReSharper.Daemon.Impl.VisibleDocumentDaemonProcess.<>c__DisplayClassb.<EnqueueHighlightingJob>b__a()
at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClasse.<Create>b__a(Object state)
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
at JetBrains.Application.Threading.Tasks.SingleThreadExecutorView.InternalExecute(Task task)
at JetBrains.Application.Threading.Tasks.SingleThreadExecutorView.ThreadProc()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
”
See also DEXP-307235