izuzak / atom-pdf-view

Support for viewing PDF files in Atom.
https://atom.io/packages/pdf-view
MIT License
106 stars 30 forks source link

Cannot read `numPages` of undefined #203

Closed Jegp closed 6 years ago

Jegp commented 6 years ago

This issue is similar to the issue here, but is triggered whenever the pdf is built. As far as I can tell it doesn't happen the first time the pdf is built, but rather randomly in subsequent builds. I don't have a more accurate steps-to-reproduce I'm afraid.

I'm on Ubuntu 17.10.

I get the following stack trace:

TypeError: Cannot read property 'numPages' of undefined
at /home/jens/.atom/packages/pdf-view/lib/pdf-editor-view.js:250:38
at callback (/home/jens/.atom/packages/pdf-view/lib/pdf-editor-view.js:289:14)
at ChildProcess.exithandler (child_process.js:214:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:885:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:501:12)
izuzak commented 6 years ago

Thanks for the report! I wasn't able to reproduce this, but I just pushed a new version with some changes which hopefully address this: https://github.com/izuzak/atom-pdf-view/pull/205. Let me know if you notice this again! :bow:

Jegp commented 6 years ago

It's fixed :-) Thanks a lot for looking into this!