Uncaught InvalidStateError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The imag...
LuckyGlass opened this issue · 2 comments
LuckyGlass commented
I installed a package named atom-browser and set it to the sidebar on the right side. Then I change the width of the sidebar. When the sidebar covered the whole window, minimap
show error messages, and the minimap of the current file(.cpp) disappeared. Of course after I closed Atom and open it again, the minimap can show correctly.
Atom: 1.45.0 x64
Electron: 4.2.7
OS: Win10
Thrown From: minimap package 4.29.9
Stack Trace
Uncaught InvalidStateError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
At C:\Users\lucky\.atom\packages\minimap\lib\canvas-layer.js:64
Error: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
at CanvasLayer.copyToOffscreen (/packages/minimap/lib/canvas-layer.js:64:27)
at HTMLElement.redrawRangesOnLayer (/packages/minimap/lib/mixins/canvas-drawer.js:285:11)
at HTMLElement.updateTokensLayer (/packages/minimap/lib/mixins/canvas-drawer.js:136:10)
at HTMLElement.updateCanvas (/packages/minimap/lib/mixins/canvas-drawer.js:104:10)
at HTMLElement.update (/packages/minimap/lib/minimap-element.js:887:10)
at requestAnimationFrame (/packages/minimap/lib/minimap-element.js:780:12)
Commands
-8:13.9.0 core:confirm (input.hidden-input)
-8:06.7.0 pdf-view:go-to-page (atom-workspace.workspace.scrollbars-visible-always.theme-rocket-dark-syntax.theme-one-dark-ui)
-8:05.4.0 core:confirm (input.hidden-input)
-7:12 core:move-down (input.hidden-input)
-7:11.4.0 autocomplete-plus:confirm (input.hidden-input)
-7:07.2.0 core:move-right (input.hidden-input)
3x -7:07.0 core:move-down (input.hidden-input)
-7:06.5.0 core:move-right (input.hidden-input)
-7:05.8.0 core:move-up (input.hidden-input)
-7:05.5.0 core:move-right (input.hidden-input)
-7:05.4.0 core:move-left (input.hidden-input)
-5:11.8.0 intentions:highlight (input.hidden-input)
-5:11.7.0 core:select-all (input.hidden-input)
-5:08.6.0 tree-view:copy (li.file.entry.list-item.selected)
-4:55.7.0 tree-view:paste (span.name.icon.icon-file-text)
-4:30.4.0 tree-view:remove (span.name.icon.icon-file-zip)
Non-Core Packages
atom-beautify 0.33.4
atom-browser 1.6.0
atom-clock 0.1.17
atom-html-preview 0.2.6
busy-signal 2.0.1
file-type-icons 1.3.4
gcc-make-run 0.2.12
highlight-selected 0.17.0
intentions 1.1.5
language-markdown 0.37.0
linter 2.3.1
linter-gcc 0.9.0
linter-ui-default 1.8.1
markdown-preview-enhanced 0.17.7
markdown-toc 0.4.2
minimap 4.29.9
pdf-view 0.72.0
platformio-ide-terminal 2.10.0
rocket-dark-syntax 1.0.0
script 3.25.0
LuckyGlass commented
In fact, I find out that when the sidebar cover the whole window, minimap
will go wrong.