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

IndexOutOfRangeException in WpfFactories #17759

Closed
psfinaki opened this issue Sep 17, 2024 · 4 comments
Closed

IndexOutOfRangeException in WpfFactories #17759

psfinaki opened this issue Sep 17, 2024 · 4 comments

Comments

@psfinaki
Copy link
Member

I keep occasionally getting this exception when opening VisualFSharp solution:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at 
System.Windows.Baml2006.WpfSharedBamlSchemaContext.GetKnownBamlMember(Int16 memberId)
   at 
System.Windows.Baml2006.Baml2006SchemaContext.TryGetBamlProperty(Int16 propertyId, BamlProperty& bamlProperty, XamlMember& xamlMember)
   at 
System.Windows.Baml2006.Baml2006SchemaContext.GetProperty(Int16 propertyId, XamlType parentType)
   at 
System.Windows.Baml2006.Baml2006Reader.Process_PropertyWithStaticResourceId()
   at 
System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
   at 
System.Windows.Baml2006.Baml2006Reader.ReadObject(KeyRecord record)
   at 
System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
   at 
System.Windows.ResourceDictionary.OnGettingValue(Object key, Object& value, Boolean& canCache)
   at 
System.Windows.ResourceDictionary.OnGettingValuePrivate(Object key, Object& value, Boolean& canCache)
   at 
System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at 
System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at 
Microsoft.VisualStudio.FSharp.Editor.QuickInfo.WpfFSharpStyleFactory.linkStyleUpdater() in D:\a\_work\1\s\vsintegration\src\FSharp.Editor\QuickInfo\WpfFactories.fs:line 38
   at 
Microsoft.VisualStudio.FSharp.Editor.QuickInfo.WpfFSharpStyleFactory.Microsoft.VisualStudio.Text.Adornments.IViewElementFactory.CreateViewElement[a](ITextView _arg1, Object model) in D:\a\_work\1\s\vsintegration\src\FSharp.Editor\QuickInfo\WpfFactories.fs:line 65
   at 
Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint[T](Object errorSource, Func`1 call, T valueOnThrow)

I don't have a proper repro yet. A few thoughts and observations:

  1. This generally doesn't seem to have any catastrophic influence on the repo behavior
  2. I feel this is happening only when opening the solution after the fresh build using build.cmd
  3. I feel this might be related to the colorization issues in VS, it takes very long to get my colors in VS
  4. I couldn't get into the error when trying to debug things using VisualFSharpDebug

I might look closer into that, for now just poking around if anyone has ideas or has also seen this.

@majocha
Copy link
Contributor

majocha commented Sep 17, 2024

#17602 ?
building vsix from main (9rc1) should fix it, I think.

@majocha
Copy link
Contributor

majocha commented Sep 17, 2024

However, I too did notice the IDE is unusually sluggish recently.

@psfinaki
Copy link
Member Author

Right, that might be related. Let's probably wait with this then :)

@vzarytovskii
Copy link
Member

Not related, and not our issue. If happens in latest main, please report to wpf

@vzarytovskii vzarytovskii closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants