Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhantomJS crashes on this SVG #77

Open
kasbah opened this issue Dec 23, 2016 · 4 comments
Open

PhantomJS crashes on this SVG #77

kasbah opened this issue Dec 23, 2016 · 4 comments

Comments

@kasbah
Copy link
Contributor

kasbah commented Dec 23, 2016

svg2png 4.1.1 and phantomjs 2.1.1

atari.svg

svg2png atari.svg
./node_modules/svg2png/lib/svg2png.js:65
        throw new Error(stdout.replace(/\r/g, "").trim());
        ^

Error: Width or height could not be determined from either the source file or the supplied dimensions

  phantomjs://code/converter.js:49 in onLoadFinished
    at processResult (./node_modules/svg2png/lib/svg2png.js:65:15)
    at Function.module.exports.sync (./node_modules/svg2png/lib/svg2png.js:25:12)
    at Object.<anonymous> (./node_modules/svg2png/bin/svg2png-cli.js:35:24)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)

and

svg2png atari.svg -w 240
./node_modules/svg2png/lib/svg2png.js:71
        throw new Error(stderr.replace(/\r/g, "").trim());
        ^

Error: PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
    at processResult (./node_modules/svg2png/lib/svg2png.js:71:15)
    at Function.module.exports.sync (./node_modules/svg2png/lib/svg2png.js:25:12)
    at Object.<anonymous> (./node_modules/svg2png/bin/svg2png-cli.js:35:24)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
@domenic
Copy link
Owner

domenic commented Dec 23, 2016

Did you

Please read the bug reporting guide at
http://phantomjs.org/bug-reporting.html and file a bug report.

?

@kasbah
Copy link
Contributor Author

kasbah commented Dec 23, 2016

No not yet, I am trying to figure out what's going wrong and if converter.js isn't at fault.

EDIT: Actually, I'll try and get a stacktrace now like they suggest.

EDIT2: I couldn't get a stack trace yet (I don't know where the dumpfile is going, if there is one) but I traced it down to the page.renderBase64("PNG") call causing the crash.

EDIT3: Looks like it's reported and downgrade to 2.0.0 is a workaround: ariya/phantomjs#14248

@domenic
Copy link
Owner

domenic commented Dec 23, 2016

Ah cool, OK, so we should probably do that in svg2png

@kasbah
Copy link
Contributor Author

kasbah commented Jan 8, 2017

Beta of PhantomJS 2.5 was just released so that might solve it. https://groups.google.com/forum/#!topic/phantomjs/AefOuwkgBh0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants