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

Release 1.5.1 is freezing Brackets #89

Closed
Pikoulol opened this issue Jul 21, 2015 · 12 comments · Fixed by #91
Closed

Release 1.5.1 is freezing Brackets #89

Pikoulol opened this issue Jul 21, 2015 · 12 comments · Fixed by #91

Comments

@Pikoulol
Copy link

Hi,

Since I've updated Brackets-Icons from 1.5.0 to 1.5.1. My brackets UI is not responding.
When I open Brackets, the main window and the files tree is empty.
The top menu is visible but not responding.

To get it working again I've to move Brackets-Icons to the disabled extensions folder then restart Brackets.

Plugins installed :

  • Brackets Outline List
  • Documents Toolbar
  • Extensions Rating
  • Todo
  • Tomorrow Night
@Pikoulol
Copy link
Author

I made a test with Brackets and only your plugin installed.
Problem stays the same. So, it's not a conflict between plugins.

@cgfrost
Copy link
Contributor

cgfrost commented Jul 21, 2015

I think I know what might be causing this, I'll see if I can fix it. I can recreate the problem you are describing at least.

@ivogabe
Copy link
Owner

ivogabe commented Jul 21, 2015

It looks to be only failing on Windows, on a Mac it runs without trouble.

@cgfrost What cause do you suspect? Can you create a fix?

@cgfrost
Copy link
Contributor

cgfrost commented Jul 21, 2015

I think it's the main loop in findInDictionary, I think there are some strange cases where it will never exit and keep looping. I'm working on it now. Should have a fix in the next hour or so.

@Hirse
Copy link
Contributor

Hirse commented Jul 21, 2015

The problem occurs when the extension is deciding on the icon for a file whose name is not in the list of known file names and consists only of the file extension.

@Hirse
Copy link
Contributor

Hirse commented Jul 21, 2015

This is fine:
2015-07-21 11-27-53
But when I create a new file with a name like this it freezes as soon as I press enter.
2015-07-21 11-28-35

@ivogabe
Copy link
Owner

ivogabe commented Jul 21, 2015

@cgfrost The bug is probably on line 70, when dotIndex is 0 (as in the example of @Hirse), it'll pass -1 as the second argument to lastIndexOf, which probably means the second argument is ignored. dotIndexNext is then again 0, and that introduces an infinite loop. It should be assigned -1 instead.

@cgfrost
Copy link
Contributor

cgfrost commented Jul 21, 2015

Yeah, that is close to how I have recreated it. (I'm on a Mac by the way so I don't think this is Windows specific)

@cgfrost
Copy link
Contributor

cgfrost commented Jul 21, 2015

This pull request will fix things. (I'll stop tweeking the pull request as well)

@ivogabe
Copy link
Owner

ivogabe commented Jul 21, 2015

Fixed in 1.5.2. The issue was indeed also available on Mac. (I didn't open any directories containing these unknown dot files on Mac, but I did open these on Windows)

@ivogabe
Copy link
Owner

ivogabe commented Jul 21, 2015

If you have issues updating to 1.5.2, because Brackets doesn't respond any more due to the infinite loop, you should first remove Brackets Icons (ivogabe.icons) from the extensions directory:

  • Mac: ~/Library/Application Support/Brackets/extensions/user
  • Win: C:\Users\<user>\AppData\Roaming\Brackets\extensions\user
  • Linux: ~/.config/brackets/extensions/user

@Pikoulol
Copy link
Author

I've updated the plugin to version 1.5.2 and everything works fine now.

Thank you guys !

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

Successfully merging a pull request may close this issue.

4 participants