question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes editing basic files

See original GitHub issue

Hi. I’m having a lot of VS crashes editing ZX Basic files.

The first one I can replicate consistently is cutting code. Whenever I cut more than two or three lines VS always crashes with no message. On EventViewer I can see this:

Información de la excepción: System.ArgumentOutOfRangeException
   en Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.GetText(Microsoft.VisualStudio.Text.Span)
   en Microsoft.VisualStudio.Text.Implementation.CachingTextImage.GetText(Microsoft.VisualStudio.Text.Span)
   en Microsoft.VisualStudio.Text.Implementation.BaseSnapshot.GetText(Int32, Int32)
   en Spect.Net.VsPackage.LanguageServices.ZxBasic.ZxBasicParserListener.ExitAsm_section(Asm_sectionContext)
   en Spect.Net.BasicParser.Generated.ZxBasicParser+Asm_sectionContext.ExitRule(Antlr4.Runtime.Tree.IParseTreeListener)
   en Antlr4.Runtime.Tree.ParseTreeWalker.ExitRule(Antlr4.Runtime.Tree.IParseTreeListener, Antlr4.Runtime.Tree.IRuleNode)
   en Antlr4.Runtime.Tree.ParseTreeWalker.Walk(Antlr4.Runtime.Tree.IParseTreeListener, Antlr4.Runtime.Tree.IParseTree)
   en Spect.Net.VsPackage.LanguageServices.ZxBasic.ZxBasicClassifier.<ParseDocument>b__43_1()
   en System.Threading.Tasks.Task.InnerInvoke()
   en System.Threading.Tasks.Task.Execute()
   en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   en Spect.Net.VsPackage.LanguageServices.ZxBasic.ZxBasicClassifier+<<ParseDocument>g__DoParse|43_0>d.MoveNext()
   en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   en Spect.Net.VsPackage.LanguageServices.ZxBasic.ZxBasicClassifier+<ParseDocument>d__43.MoveNext()
   en System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0(System.Object)
   en System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   en System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   en System.Windows.Threading.DispatcherOperation.InvokeImpl()
   en System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   en MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   en System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   en System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   en System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   en MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   en System.Windows.Threading.DispatcherOperation.Invoke()
   en System.Windows.Threading.Dispatcher.ProcessQueue()
   en System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   en MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   en MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   en System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   en System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   en System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   en MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

Also when I delete or paste code some times the same happens, the IDE crashes and I have the exact same error on the event viewer.

I think this error started happening since the last VS update.

Cheers.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Dotneteercommented, Apr 1, 2020

Thanks, @gusmanb, I managed to reproduce the issue! 😃

0reactions
gusmanbcommented, Apr 4, 2020

I’ve been working all the day on my project, cutting, pasting, replacing code, etc, and I had no single crash, so I’m going to close the issue 😄

Cheers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Editing resource file crashes Visual Studio
Every time I try to edit any resource file in any UWP project in my solution, Visual Studio crashes and restarts.
Read more >
Video Editor crashing without exporting
I bought a brand new laptop yesterday and trying to export a file where three video files which consists of one with 5...
Read more >
Visual Studio crash on typing in VB.NET source code editor
The cause of the crash in my case was the Text Editor configuration. There was an entry in Tools → Options... → File...
Read more >
Video Editor keeps crashing when i try to add audio file?
Im using the built in video editing software on my windows surface, my computer is up to date and the program runs fine...
Read more >
Indesign 2022 crashes upon trying to edit a file
Indesign 2022 crashes upon trying to edit a file · Close all adobe applications · Go to Locations: · ~/Library/Caches · ~/Library/Preferences ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found