Editor Crash when opening Dev Tools (PDFjs)

I am developing an atom package (https://atom.io/packages/open-diabetes-filter) which displays PDFs using the PDF.js library from mozilla (https://www.npmjs.com/package/pdfjs-dist).

Sometimes, but not every time, when I open the developer tools (using ctrl+shift+i) the editor will crash with the following error:

Some patterns I noticed:

  • After reloading the editor, opening and closing the dev tools works like expected. The crash only happens once.
  • Having two PDFs rendered in the same view seems to increase the chance of crashes. But it did crash while only having one PDF displayed once.

Here is my code that renders the PDFs: https://github.com/Edgxxar/OpenDiabetes-Atom/blob/master/lib/plot/canvas.js

I am using Windows 10

Thanks for any help!

My editor crashes whenever I open the dev tools, too, and I haven’t been able to figure out why. Also on Windows 10, with no such package as yours.