-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Sprint 34 crashs when the js file is in Desktop (Windows 7 64bits) #6067
Comments
This seems to be caused by JSCodeHints trying to parse every file on the desktop, even binary files. I'm not crashing on my Win7 machine, but there is a huge lag when opening a file on the desktop, and I traced it back to a big binary file being read and fed to tern. |
Setting High Priority |
There was a change to file loading in Sprint 34. I'll take a look there too. |
This is the change I'm talking about. I don't think this change would lead to reading more files than expected, but it's the first place I'm double checking. |
but even HTML files are concerned? so i guess because a javascript code can be included in html that jscodehints will run too? because it dont crash on CSS ! |
copied the files of the desktop to a folder, and it crashed, so the problem occurs not because of a number of files, because i created a folder with the same js file pasted 400 times and it dident crash, but it has relation with type of files that exists in that folder. |
@dangoor - I do assign this to you, please hand it over if appropriate. |
Note that this is the same issue in #5847 and #6022 I turned on debugging using this in the console:
|
Actually, more important is the Init message which told the worker about the files that we don't care about:
|
Ah. It looks like the codepath that creates the initial list of files to send to Tern with that init message doesn't check language IDs - it just checks the exclusion list from preferences. (This is the call to |
The change that I pointed to is, indeed, the reason that it is now reading dot files. The problem is subtle. The old code that called |
Yeah, moving the dotfile (and language) checks into |
Is it only dotfiles, though, or all files? It seems like it might be the lack of language check as well, not just the dotfile checking. |
(You can see that in your init message trace, which shows files like README.md being sent as well.) |
Oddly, it seems like we were reading .md files and such prior to sprint 34. The change is that we now read the dotfiles which we shouldn't be. I wonder if it's supposed to be parsing just .js files or if it's purposefully looking at other files. |
I need to go afk until about 6pm PST (though I'll try to check email in the meantime). I've put up a quick pull request for testing that just filters out the dotfiles (per the old behavior). I'd like to figure out if there's some reason it wasn't limiting to .js files before doing more filtering than we were previously doing. |
i recorded a video how to make the bug, it seems it has relation with a length of bytes, it should not scan what is in the folder, i confirm that i scans for every bits in the same folder, so when the time exceeds Delta it hangs, i am uploading the video to youtube. |
@njx @dangoor Yes, sending at least some non-JS files to Tern was definitely happening even in Sprint 33 and earlier -- that's how I hit #5847 (see notes there). In that bug, it didn't always send over non-JS files though -- it needed a certain set of repro steps before it would happen... albeit those steps are extremely simple and easy to hit. |
here is the video |
My thinking is that we probably should filter down to just What do you all think? |
html files too can have a javascript integred, so the filter could be *.js and *.html only? |
@abdelouahabb We don't currently extract JS bits out of HTML files, so there'd be no point in looking at them right now. We could certainly add a feature like that later, though. |
@abdelouahabb Oops actually, I take that back -- turns out we do. Good catch! I'll suggest this in the PR. |
@peterflynn it is because the bug occurs only on html and js files, but when a css is created, there is no crash, so this is why i supposed that the program checks for html too because it can contain javascript code? |
the bug has gone, thank you :) |
hi, just downloaded brackets, and it seems it crashs everytime the javascript file is in desktop, i moved it in another location (folder), it opens without any problems.
even a blank javascript file will cause de bug.
this happens ALSO with HTML.
first i thought it may be some old extension, i deleted every trace that the old release let on the pc, so it is a fresh install.
when brackets crashs, it dont exit and stay open, and i hear the pc works in its full power.
Edit: it dont crash on CSS or other files (mhtl for example, or other non-internet files).
The text was updated successfully, but these errors were encountered: