file-icons / atom

Atom file-specific icons for improved visual grepping.
MIT License
1.32k stars 250 forks source link

Uncaught TypeError: Cannot read property 'on' of null #683

Open winstliu opened 6 years ago

winstliu commented 6 years ago
  1. Open Fuzzy Finder (icons should be visible)
  2. Disable file-icons
  3. Open Fuzzy Finder (if this does not trigger the exception, keep following steps)
  4. Enable file-icons
  5. Open Fuzzy Finder
  6. Disable file-icons
  7. Open Fuzzy Finder

Icons may or may not be present when the exception occurs.

Alternatively:

  1. Disable file-icons
  2. Enable file-icons
  3. Disable file-icons
  4. Open Fuzzy Finder

Fuzzy Finder should report that the project is empty with the uncaught exception notification in the background.

Atom: 1.25.0-dev-b7258bdc8 x64 Electron: 1.6.15 OS: Microsoft Windows 10 Home Insider Preview Thrown From: file-icons package 2.1.14

Stack Trace

Uncaught TypeError: Cannot read property 'on' of null

At C:\Users\user\.atom\packages\file-icons\lib\options.js:67

TypeError: Cannot read property 'on' of null
    at Options.onDidChange (/packages/file-icons/lib/options.js:67:22)
    at /packages/file-icons/lib/service/icon-node.js:28:12)
    at Function.forElement (/packages/file-icons/lib/service/icon-node.js:177:17)
    at /packages/file-icons/lib/service/icon-service.js:80:31)
    at IconServices.updateIcon (~/AppData/Local/Atom x64/app-dev/resources/app/node_modules/fuzzy-finder/lib/get-icon-services.js:58:37)
    at Object.elementForItem (~/AppData/Local/Atom x64/app-dev/resources/app/node_modules/fuzzy-finder/lib/fuzzy-finder-view.js:152:51)
    at $.ol.items.map (~/AppData/Local/Atom x64/app-dev/resources/app/node_modules/atom-select-list/src/select-list-view.js:166:37)
    at Array.map (native)
    at SelectListView.renderItems (~/AppData/Local/Atom x64/app-dev/resources/app/node_modules/atom-select-list/src/select-list-view.js:165:29)
    at SelectListView.render (~/AppData/Local/Atom x64/app-dev/resources/app/node_modules/atom-select-list/src/select-list-view.js:156:18)
    at updateSync (~/AppData/Local/Atom x64/app-dev/resources/app/node_modules/atom-select-list/node_modules/etch/lib/component-helpers.js:99:40)
    at ~/AppData/Local/Atom x64/app-dev/resources/app/node_modules/atom-select-list/node_modules/etch/lib/component-helpers.js:72:13
    at DefaultScheduler.performUpdates (~/AppData/Local/Atom x64/app-dev/resources/app/node_modules/atom-select-list/node_modules/etch/lib/default-scheduler.js:48:40)

Commands

     -0:34.3.0 fuzzy-finder:toggle-file-finder (div.package-detail.panels-item)
     -0:33.1.0 editor:consolidate-selections (input.hidden-input)
     -0:33.1.0 core:cancel (input.hidden-input)
     -0:31.7.0 fuzzy-finder:toggle-file-finder (div.package-detail.panels-item)
     -0:30.5.0 editor:consolidate-selections (input.hidden-input)
     -0:30.5.0 core:cancel (input.hidden-input)
     -0:28 fuzzy-finder:toggle-file-finder (div.package-detail.panels-item)
     -0:26.3.0 editor:consolidate-selections (input.hidden-input)
     -0:26.3.0 core:cancel (input.hidden-input)

Non-Core Packages

atom-ide-ui 0.6.0 
autocomplete-java 1.2.7 
autocomplete-python 1.10.5 
duotone-dark-syntax 2.1.0 
file-icons 2.1.14 
fizzy 0.21.0 
ide-java 0.7.0 
ide-typescript 0.7.1 
junit-runner 0.0.0 
language-batch 0.4.0 
language-latex 1.1.1 
language-pegjs 0.5.0 
language-pug 0.0.21 
language-sourcepawn 0.7.2 
language-test 0.0.1 
latex 0.49.0 
latex-autocomplete 1.1.1 
linter-coffeelint 1.3.1 
linter-eslint 8.4.0 
linter-js-standard 4.1.0 
linter-stylelint 4.1.0 
MagicPython 1.0.12 
pdf-view 0.61.0 
script 3.17.3 
snowfall 0.3.0 
sort-lines 0.18.0 

Related: #682

winstliu commented 6 years ago

Additionally reproducible with find-and-replace and archive-view:

  1. Disable file-icons
  2. Enable file-icons
  3. Disable file-icons
  4. Perform a project search/open an archive

find-and-replace: Uncaught exception should be in console and no project find results should appear. archive-view: Uncaught exception notification should appear and no archive view should be generated.

winstliu commented 6 years ago

The fact that you need to disable file-icons twice for these issues to occur lead me to believe that there may be something wrong going on with package deactivation?

Alhadis commented 6 years ago

Just an FYI if you're unaware of my current situation: my MacBook died, and my only remaining computer is a dinosaur Dell running OpenBSD 6.2 (which is limited to an 80×25 display due to hardware/driver issues yet to be solved).

So I'm only able to use Atom from borrowed computers, and I've been unable to investigate this (or do most Atom-related stuff, for that matter).