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.

Too many spaces (around 20) after line containing string interpolation will cause editor to crash

See original GitHub issue

I’m submitting a bug report

  • Extension Version: 1.0.1

Please tell us about your environment:

  • Operating System: OSX 10.x|Windows 7 (I have confirmed on both)

  • Visual studio code version: 1.20.1

HTML/JS/TS of incorrect highlight image note: I have render whitespace set to ‘all’ in this screenshot.

Current behavior: Not an incorrect highlight so much as each additional space after about ~20 will cause cpu usage to spike. Simply holding down space bar should be enough to trigger a hard lock of the application

Expected/desired behavior: Code to not crash when there’s too much whitespace after a line featuring string interpolation

  • What is the motivation / use case for changing the behavior? It’s annoying to have the editor crash when I backspace at the start of an empty line to remove it, only to have the whitespace append to the previous line, and cause the editor to crash.

Update:

The spaces do not have to be contiguous, so this bug would also hit anyone who has ~20 words after an aurelia interpolation, and on the same line.

${a} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa is fine ${a} a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a will crash ${a} ............................................................... (spaces) will crash.

Possibly some error in tokenisation there somewhere.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
erikliebencommented, Feb 23, 2018

Was a bit overloaded with work this week, will look at it this weekend

0reactions
erikliebencommented, Feb 28, 2018

Tested and implemented the fix, @darthInvad0r thanks for the helping out fixing the issue!

Will release a new version in a bit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Long string interpolation lines in C#6 - Stack Overflow
Colonel Panic, the question is asking about how to break up long interpolation lines so we don't violate column width requirements, without ...
Read more >
Render a String with Non-breaking Spaces in React | Pluralsight
A single typo while entering a string can lead to a lot of breakages in the code, which is why validating strings on...
Read more >
Unity 2023.1.0a20
Editor : Fixing silent crash caused by cache-server drop-down menu. (UUM-11898) First seen in 2023.1.0a4. Fixed in 2023.1.0a22.
Read more >
Swift String Formatting Examples: The Best Tips and Tricks
Learn about the basics of strings and then look into various examples of how to format Swift strings.
Read more >
Changelog | Burst | 1.7.4 - Unity - Manual
This fixes the case where having too many static readonly ... and then attaching the managed debugger, could cause an editor crash.
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