JoelBesada / activate-power-mode

Atom package - Activate POWER MODE to write your code in style.
MIT License
3.58k stars 422 forks source link

Uncaught TypeError: Cannot read property 'observe' of null #330

Open 110662 opened 6 years ago

110662 commented 6 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.23.3 x64 Electron: 1.6.15 OS: "CentOS Linux Thrown From: activate-power-mode package 2.7.0

Stack Trace

Uncaught TypeError: Cannot read property 'observe' of null

At /home/myhome/.atom/packages/activate-power-mode/lib/canvas-renderer.coffee:72

TypeError: Cannot read property 'observe' of null
    at Object.setupCanvas (/packages/activate-power-mode/lib/canvas-renderer.coffee:72:20)
    at Object.onChangePane (/packages/activate-power-mode/lib/plugin/power-canvas.coffee:19:13)
    at /packages/activate-power-mode/lib/plugin-manager.coffee:90:32
    at Object.onEnabled (/packages/activate-power-mode/lib/plugin-registry.coffee:92:19)
    at Object.runOnChangePane (/packages/activate-power-mode/lib/plugin-manager.coffee:89:21)
    at Object.setupPane (/packages/activate-power-mode/lib/power-editor.coffee:40:20)
    at /packages/activate-power-mode/lib/power-editor.coffee:9:8
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /usr/share/atom/resources/app/src/workspace.js:550:30

Commands

     -0:35.1.0 core:backspace (input.hidden-input)
     -0:34.5.0 core:confirm (input.hidden-input)

Non-Core Packages

activate-power-mode 2.7.0 
atom-beautify 0.30.9 
markdown-mindmap 0.4.2 
markdown-scroll-sync 2.1.2 
markdown-toc 0.4.2 
markdown-writer 2.7.3 
tool-bar 1.1.6 
vim-mode 0.66.0 
vim-mode-plus 1.28.0 
wordcount 2.10.4 
taketakeyyy commented 6 years ago

This error occurred when I double-cliked a file to open while Untoggle(Packages -> Activate Power Mode -> Toggle) or Disable(Packages -> Activate Power Mode -> Disable) state.

P.S. Sorry. There seem to be some conditions which this error occurs. I'm using "symbols-tree-view" package and "Minimap" package. After I repeatedly untoggled and toggled these packages, then this error didn't occur.

asdf23 commented 5 years ago

To trigger this bug turn off the feature.