Closed TimoWilken closed 9 years ago
Restart the editor and let me know if this happens again
I do have this issue happen from time to time. I have to restart the editor for the linter to work again, but the error still pops up at times.
I have been running master for weeks, didn't get this error, I'll try to repro
Here's what my report if that helps:
Atom Version: 1.0.19 System: Mac OS X 10.10.5 Thrown From: linter package, v1.7.0
Uncaught TypeError: Cannot read property 'setAttribute' of null
At /Users/thibault.ml/.atom/packages/linter/lib/ui/message-element.js:21
TypeError: Cannot read property 'setAttribute' of null
at linter-message.updateVisibility (/Users/thibault.ml/.atom/packages/linter/lib/ui/message-element.js:21:59)
at BottomPanel.setMessages (/Users/thibault.ml/.atom/packages/linter/lib/ui/bottom-panel.js:36:22)
at LinterViews.render (/Users/thibault.ml/.atom/packages/linter/lib/linter-views.coffee:36:12)
at /Users/thibault.ml/.atom/packages/linter/lib/linter.coffee:29:14
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at MessageRegistry.updatePublic (/Users/thibault.ml/.atom/packages/linter/lib/message-registry.js:86:18)
at UpdateMessages (/Users/thibault.ml/.atom/packages/linter/lib/message-registry.js:31:16)
-0:01.5.0 core:save (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"flatland-dark-ui",
"flatland-dark"
],
"openEmptyEditorOnStart": false
},
"linter": {}
}
# User
build, v0.47.0
build-cargo, v0.2.0
flatland-dark, v0.1.6
flatland-dark-ui, v0.2.4
language-rust, v0.4.5
linter, v1.7.0
linter-clang, v3.2.3
linter-erb, v0.1.1
linter-pep8, v1.0.1
linter-rust, v0.2.9
minimap, v4.13.4
racer, v0.17.2
# Dev
No dev packages
I have very little knowledge of JS, none of the linter or CoffeeScript, but looking at the source code, I believe the second line of this screenshot might be the problem.
It's trying to get linter-message-link
, but there is no link associated with that error. If I comment the code that generates that error, then the error doesn't appear. If I uncomment the code that generates that error, then I do get that error.
Here's the actual compiler issue:
src/main.rs:3:24: 3:27 warning: unused import, #[warn(unused_imports)] on by default
src/main.rs:3 use std::sync::{Mutex, Arc};
^~~
src/main.rs:9:1: 11:2 warning: struct is never used: `Table`, #[warn(dead_code)] on by default
src/main.rs: 9 struct Table {
src/main.rs:10 forks: Vec<Mutex<()>>,
src/main.rs:11 }
src/main.rs:10:5: 10:26 warning: struct field is never used: `forks`, #[warn(dead_code)] on by default
src/main.rs:10 forks: Vec<Mutex<()>>,
^~~~~~~~~~~~~~~~~~~~~
I believe linter-rust groups the last two errors as one, which is probably why the line/column link is not displayed. I would say that while the rust linter is the one grouping them, linter is still at fault as it should not error because of the absence of link.
I have a fix up for this
A patch release is up for download.
Thanks, that was quick :-) I see my assumption was the right one!
@naixn Yes it was sir :)
Also fixing the scenario where multi line messages don't have a link when they should.
Probably related to #911.
Steps to reproduce
.json
file with JSON linter package enabled (in my case, this was not apackage.json
like in #911)"
in my case)Atom Version: 1.0.19; installed just beforehand via
rpm -U
, no problems in previous installed version (1.0.9, I think) System: Fedora 22, x86_64, Linux 4.1.7 Thrown From: linter package, v1.7.0Stack Trace
Uncaught TypeError: Cannot read property 'setAttribute' of null
Commands
Config
Installed Packages