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

Cannot read property '0' of null #14

Closed
chappjc opened this issue Oct 5, 2016 · 4 comments
Closed

Cannot read property '0' of null #14

chappjc opened this issue Oct 5, 2016 · 4 comments

Comments

@chappjc
Copy link

chappjc commented Oct 5, 2016

Trying to rewrap any comments in a particular Go file, I get this. Just one file, others work fine. I can take comments from that file into another file and they wrap fine.

[Extension Host] TypeError: Cannot read property '0' of null
at new Section (C:\Users\user.vscode\extensions\stkb.rewrap-0.6.2\out\src\Section.js:19:66)
at BasicLanguage.findSections (C:\Users\user.vscode\extensions\stkb.rewrap-0.6.2\out\src\BasicLanguage.js:35:38)
at wrapSomething (C:\Users\user.vscode\extensions\stkb.rewrap-0.6.2\out\src\Main.js:33:28)
at C:\Users\user.vscode\extensions\stkb.rewrap-0.6.2\out\src\Main.js:15:20
at c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:12:29051
at e.edit (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:11:24633)
at c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:12:29017
at t.$executeContributedCommand (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:11:4834)
at t.e.handle (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:10:22905)
at s (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:7:30449)

@stkb
Copy link
Owner

stkb commented Oct 10, 2016

Sorry for the late reply; I've been away for a few days.

This is a weird error and I really need access to that file to determine what's causing it. Would it be possible for you to add the file as an attachment here or email it to me (my address is on my profile page)?

If that's not possible, you could try these:

  1. Create a new .go file in vscode and copy the whole contents of the affected file into the new. Does it still fail then?
  2. Or, remove a few sections at a time from the file to try to work out where it starts going wrong

@chappjc
Copy link
Author

chappjc commented Oct 10, 2016

Unfortunately that version of the file is long gone and I haven't seen this error recently.

However, at the time, I did copy the contents of the file into another new file and it still had the issue, so it wasn't a file write/perms issue. Can't say much else though. I think it must have been some offending part of the file that vscode-rewrap didn't like.

@stkb
Copy link
Owner

stkb commented Oct 11, 2016

Ok. I'll leave this open in case we or someone can find a reproducing example.

@stkb
Copy link
Owner

stkb commented Nov 4, 2016

Going to assume this is the same issue as #11 (it was the same error message).

@stkb stkb closed this as completed Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants