domenic / svg2png

Converts SVGs to PNGs, using PhantomJS
Other
584 stars 134 forks source link

`svg2png.sync()` raise exception on only windows. #113

Open MichinariNukazawa opened 5 years ago

MichinariNukazawa commented 5 years ago

I use svg2png in electron app for win,mac,linux. svg2png.sync() raise exception "Cannot read property 'toString' of null" on only windows.

windows7 x64 electron 2.0.8 node 8.9.3

11 use <?xml version="1.0"?> is not fixed.

I try debug, step runnning.

svg2png.js[line 22] in call childProcess() child_pcorss.js[line 577] result.output is null.

wowk fine on linux, result variable is : {status: 0, signal: null, output: Array(3), pid: 6953}

and error on windows : {error: -4058, status: null, signal: null, output: null, pid: 0}

raised exception.

message :
"Cannot read property 'toString' of null"
stack :
"TypeError: Cannot read property 'toString' of null↵    at processResult (C:\Users\win\Desktop\daisy_sequence-win64-201812.02.0-923d68b\resources\app\node_modules\svg2png\lib\svg2png.js:58:34)↵    at Function.module.exports.sync (C:\Users\win\Desktop\daisy_sequence-win64-201812.02.0-923d68b\resources\app\node_modules\svg2png\lib\svg2png.js:25:12)↵    at Function.write_export_png_from_diagram_ (C:\Users\win\Desktop\daisy_sequence-win64-201812.02.0-923d68b\resources\app\js\daisy-io.js:161:26)↵    at Function.write_export_diagram (C:\Users\win\Desktop\daisy_sequence-win64-201812.02.0-923d68b\resources\app\js\daisy-io.js:129:19)↵    at menu_do_export_ (file:///C:/Users/win/Desktop/daisy_sequence-win64-201812.02.0-923d68b/resources/app/js/menu.js:153:20)↵    at click (file:///C:/Users/win/Desktop/daisy_sequence-win64-201812.02.0-923d68b/resources/app/js/menu.js:375:4)↵    at CallbacksRegistry.apply (C:\Users\win\Desktop\daisy_sequence-win64-201812.02.0-923d68b\resources\electron.asar\common\api\callbacks-registry.js:47:25)↵    at EventEmitter.ipcRenderer.on (C:\Users\win\Desktop\daisy_sequence-win64-201812.02.0-923d68b\resources\electron.asar\renderer\api\remote.js:277:21)↵    at emitMany (events.js:147:13)↵    at EventEmitter.emit (events.js:224:7)"
nicner commented 4 years ago

I found the same problem that you reported. I see that nobody helped you. Have you found a solution?

MichinariNukazawa commented 4 years ago

No. I use other npm package, switch in windows. (save-svg-as-png)