-
Notifications
You must be signed in to change notification settings - Fork 249
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
Uncaught TypeError: Cannot read property 'onDidChangeIcon' of null #698
Comments
👋 Hey @ArekSredzki, thanks for reporting this. Could you tell me exactly which git commands were being used to update directories, perchance? |
Hi @Alhadis, thanks for the prompt response & great atom package! 😄 |
Did another window have focus when this happened? Certain file-related events aren't picked up if the Atom window is in the background. It's a known issue I've yet to fix, I'm afraid. |
Atom wasn't in focus since I usually use the terminal for git operations |
Could you add graceful degradation in this case so that the failure to retrieve an icon doesn't disable use of the file tree to navigate those directories? :) |
This actually shouldn't be happening. Period. I'll try to have a look at it sometime late this week (probably Friday). 😞 Sorry this is happening. |
Same problem |
Same problem, different setup. In my case, atom was in focus. I deleted a directory with the Known workaround: restart atom. Reloading via Ctrl+Shift+F5 seems to work too, although I think I remember one occasion where a simple reload didn't. |
Hey guys, sorry for the silence. Still trying to wrap up a contract role which is urgently due for end-of-month delivery, and it kinda ate my entire weekend. 😞 I'll hopefully be able to look this soon-ish... giving you all an update for sake of transparency. I couldn't reproduce this on macOS or Windows, so I'll need to test this with a proper Ubuntu installation to really figure out what's going on here. |
If it helps any, here's a few ways I had the error pop up for me (also only started recently):
Tried to find a way to consistently reproduce it but no luck yet. :( Versions: *: I have setup git hooks for pre-commit which checks coverage and such and it usually creates a temporary directory which is almost instantly deleted. |
Same problem, different setup: I've just tried to open a folder as a project folder. |
For me it seems to happen inconsistently when trying to use Ctrl + P to bring up the file search menu. After the error occurs, that menu no longer works and I have to restart atom. Fedora 27. |
I'm having this issue popping up every time I move files around. I don't see any problems in the file tree. Please allow suppressing this message somehow, I already start considering removing the package as the error message is worse than the issue itself ... |
To everybody experiencing this problem:You can disable IO completely and force the package not to make any filesystem read/access attempts. Doing this will make hashbang, modeline and fallback signature detection unavailable, but it's better than disruptive crap like this. To disable IO, uncheck the following options in the package settings:
I recommend restarting the editor after changing these settings, just to be on the safe side. If you're STILL getting this error, then it's indicative of a much more serious problem. |
Allllrighty. Due to the (obviously) nasty nature of the issue, and the fact that I haven't been able to reproduce it (even on Ubuntu), I'm taking a leaf from @kalinchernev's book and suppressing the damn message until I can work out what the actual fuck is going on here. Until then, if any of you see a missing icon in the |
I haven't had the issue since updating Atom to 1.24. Not sure if it's just a fluke though considering how sporadic the error is. For now I'll continue to use the package without the fix and see what happens. |
Gonna roll a release soon anyway, so you won't see this issue even if it is a fluke. =) |
@sylvanr Are you saying you're still witnessing this issue even after installing the latest version of both If so, could you please tell me what packages and themes are installed? Note what I said before about switching off IO in the package's settings. |
@Alhadis I see my mistake, the issue was indeed solved by updating Atom to 1.24. Thank you. |
I dove a bit into this issue, with additional logging. It seems that the received resource is marked as destroyed.
which logs |
@WorldSEnder Yes, but resources shouldn't be destroyed so soon after a delegate is created (since delegates are created whenever resources are referenced for the first time). By memory, this all happens synchronously, which means it can't be a race condition. If anything, it's probably connected to some underlying platform-specific logic. 😕
Don't get too carried away. 😉 The culprit probably lies in the |
Steps to reproduce
Not sure, what exactly causes this erroneous application state. However, once the application enters it, clicking to expand some directories in the file tree causes this error to be thrown. I assume that it happens while trying to get the icon for the files in said directory. Because of the error, it is not possible to see the files in that directory.
In the instance that I'm experiencing right now there is only one file (
.yaml
) in the problematic directory, no sub folders.This might have something to do with changes git branches which add new directories.
This error only started occurring a couple of days ago.
Other
Atom: 1.23.2 x64
Electron: 1.6.15
OS: Ubuntu 16.04.3
Thrown From: file-icons package 2.1.16
Stack Trace
Uncaught TypeError: Cannot read property 'onDidChangeIcon' of null
Commands
Non-Core Packages
The text was updated successfully, but these errors were encountered: