Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Uncaught TypeError in CSS Class Code Hint extension #6439

Closed
redmunds opened this issue Jan 9, 2014 · 4 comments
Closed

Uncaught TypeError in CSS Class Code Hint extension #6439

redmunds opened this issue Jan 9, 2014 · 4 comments

Comments

@redmunds
Copy link
Contributor

redmunds commented Jan 9, 2014

I have the Brackets CSS Class Code Hint extension installed.
My current project is brackets/src.
Every 20 seconds, I get these messages in console:

Uncaught TypeError: Cannot read property '1' of null StyleRuleCache.js:123
Detect updates: /Users/randyedmunds/github/brackets/src/thirdparty/CodeMirror2/theme/solarized.css CSSCache.js:92
Detect updates: /Users/randyedmunds/github/brackets/src/thirdparty/smart-auto-complete-local/spec/framework/jasmine-1.0.1/jasmine.css CSSCache.js:92
Detect updates: /Users/randyedmunds/github/brackets/src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/themes/base/jquery.ui.menu.css CSSCache.js:92

I have not modified any of these files.
I suspect that this is related to the "file has been modified on disk" issue introduced with File Watchers because this just started happening recently.

I am currently on Mac. I haven't tried it on Windows.

@peterflynn
Copy link
Member

That extension doesn't listen for filesystem events. It just uses setInterval to check timestamps manually every 20 seconds. It's reading private fields off the File object (fields which it doesn't seem aware might be null btw) -- seems like asking for trouble.

@redmunds since you have it up and running, do you want to add a log statement or breakpoint in CSSCache where it prints "Detect updates" to see what's going on? I suspect there's just a bug in the extension somewhere...

@redmunds
Copy link
Contributor Author

redmunds commented Jan 9, 2014

I need to review this PreferencesModel code, so I just removed it for now. If you have a link to a document explaining the best practice way for them to listen to files, I'll open a bug on that repo.

@ghost ghost assigned redmunds Jan 13, 2014
@dangoor
Copy link
Contributor

dangoor commented Jan 13, 2014

@peterflynn A document on the best practices and how to use file watching in general would be really useful

low priority to @redmunds to just file a bug with the extension author with a link

@redmunds
Copy link
Contributor Author

I posted this message to the repo of the extension. Closing.

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

No branches or pull requests

3 participants