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

[CLOSED] Block uncomment throws exception near bottom of file #2730

Open
core-ai-bot opened this issue Aug 29, 2021 · 8 comments
Open

[CLOSED] Block uncomment throws exception near bottom of file #2730

core-ai-bot opened this issue Aug 29, 2021 · 8 comments

Comments

@core-ai-bot
Copy link
Member

Issue by njx
Friday Feb 15, 2013 at 21:10 GMT
Originally opened as adobe/brackets#2887


  1. Open the Getting Started project
  2. Open and close an inline editor
  3. Go to the CSS file and select the last 2 lines within the last selector
  4. Block comment
  5. Block uncomment

Result: exception thrown in CodeMirror (although things seem to work fine afterward)


Original description:

Failures:

  • EditorCommandHandlers Block comment/uncomment should block uncomment, cursor in whitespace within block comment.
  • EditorCommandHandlers Block comment/uncomment should block uncomment, selection in whitespace within block comment.

Both seem to be the same issue: TypeError: Cannot call method 'chunkSize' of undefined.

This only happens if certain other test suites are run before this one (so you have to run all the test suites, and the tests have to load in a certain order).

@core-ai-bot
Copy link
Member Author

Comment by njx
Friday Feb 15, 2013 at 21:10 GMT


To@peterflynn

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Friday Feb 15, 2013 at 21:45 GMT


I think it might be problem with adobe/brackets#2335

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Feb 15, 2013 at 22:15 GMT


I ran unit tests (the full "All") manually on the Jenkins machine and they all pass. Also ran this suite locally on my machine and it passes, and NJ confirms same on his machine.

I'm not seeing any evidence linking this to the tokenization race condition, other than it being not 100% reproducible. In #2335, the symptom was the command getting stale tokens back from CM and thinking some stuff was commented out when it wasn't (or vice versa). Here the symptom is CM crashing in updateDisplay() after we've made some edits... which often implies we passed it undefined or NaN as a line number at some point.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Feb 15, 2013 at 22:38 GMT


Looking like a CM bug -- and it only occurs if CM has ever seen hidden lines (e.g. an inline editor before), which means whether or not this repros depends on the (nondeterministic) order that other test suites got run in. Will file an issue and disable the two tests for now.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Feb 15, 2013 at 23:13 GMT


Filed codemirror/codemirror5#1255. Put up a pull request for disabling the tests, so reducing this to Low & adding Tracking label.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Tuesday Feb 19, 2013 at 04:33 GMT


Adding new info: there is a user-visible bug here too, but it's a little tricky to hit and not readily apparent unless you have Dev Tools open. Bumping up to Medium, though...

The CM bug is now fixed, so this will be fixed with our next merge from upstream.

@core-ai-bot
Copy link
Member Author

Comment by njx
Tuesday Feb 19, 2013 at 23:27 GMT


FBNC to@peterflynn

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Wednesday Feb 20, 2013 at 02:27 GMT


Confirmed fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant