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

Icon generation fails with node 9.2.0 (docker) #82

Closed
lmm-git opened this Issue Nov 21, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@lmm-git
Contributor

lmm-git commented Nov 21, 2017

Steps to reproduce:

  1. Start docker container: docker run -it --rm node:latest /bin/bash
  2. Install icon-gen in it (e.g. npm install icon-gen)
  3. Download some random svg: wget https://raw.githubusercontent.com/encharm/Font-Awesome-SVG-PNG/master/black/svg/address-book-o.svg
  4. Call node ./node_modules/icon-gen/dist/bin/index.js -i address-book-o.svg -o /tmp/test -m icns,ico

Result:

/usr/local/bin/node[80]: ../src/node_zlib.cc:189:static void node::{anonymous}::ZCtx::Write(const v8::FunctionCallbackInfo<v8::Value>&) [with bool async = false]: Assertion `Buffer::HasInstance(args[4])' failed.
 1: node::Abort() [node]
 2: node::Assert(char const* const (*) [4]) [node]
 3: 0x1258860 [node]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
 5: 0xb77f9c [node]
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
 7: 0x1d0dce3842fd
Aborted (core dumped)

Result with option report set to true (from my original project):

Icon generetor from SVG:
  src: /some/path/src/images/app.svg
  dir: /some/path/analysis-file-watcher/build/icons
SVG to PNG:
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/16.png
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/24.png
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/32.png
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/48.png
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/64.png
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/128.png
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/256.png
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/512.png
  Create: /tmp/98e6e2f7-a21c-4ed0-bcf7-b7e0e5b1f9f0/1024.png
ICO:
/usr/local/bin/node[65]: ../src/node_zlib.cc:189:static void node::{anonymous}::ZCtx::Write(const v8::FunctionCallbackInfo<v8::Value>&) [with bool async = false]: Assertion `Buffer::HasInstance(args[4])' failed.
 1: node::Abort() [node]
 2: node::Assert(char const* const (*) [4]) [node]
 3: 0x1258860 [node]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
 5: 0xb77f9c [node]
 6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
 7: 0x1bbc85e042fd

With node 8 everything is working fine. Not sure if the error is related to your project or to node itself.

@akabekobeko akabekobeko added this to the v.NEXT milestone Nov 21, 2017

@akabekobeko akabekobeko added the bug label Nov 21, 2017

@lmm-git

This comment has been minimized.

Contributor

lmm-git commented Nov 22, 2017

I believe this is not an error of this module but of pngjs. See lukeapage/pngjs#95 for my Issue there.

@akabekobeko

This comment has been minimized.

Owner

akabekobeko commented Nov 23, 2017

Thanks for the report, Let's expect it to fix pngjs

@koalalorenzo

This comment has been minimized.

koalalorenzo commented Mar 17, 2018

Plz update the dependency to 3.3.2 at least :D apparently the bug has been fixed!

@akabekobeko

This comment has been minimized.

Owner

akabekobeko commented Mar 19, 2018

@koalalorenzo

I tried updating to pngjs v3.3.2, but the problem has not been fixed. The same error occurs when used in Node v9.8.0 environment.

/usr/local/Cellar/node/9.8.0/bin/node[3067]: ../src/node_zlib.cc:188:static void node::(anonymous namespace)::ZCtx::Write(const FunctionCallbackInfo<v8::Value> &) [async = false]: Assertion `Buffer::HasInstance(args[4])' failed.
 1: node::Abort() [/usr/local/Cellar/node/9.8.0/bin/node]
 2: node::Assert(char const* const (*) [4]) [/usr/local/Cellar/node/9.8.0/bin/node]
 3: void node::(anonymous namespace)::ZCtx::Write<false>(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/Cellar/node/9.8.0/bin/node]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/Cellar/node/9.8.0/bin/node]
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/Cellar/node/9.8.0/bin/node]
 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/Cellar/node/9.8.0/bin/node]
 7: 0x1e5e4a042fd
@akabekobeko

This comment has been minimized.

Owner

akabekobeko commented Mar 19, 2018

@koalalorenzo

I have reported that it has not been fixed to the issue of pngjs.

@akabekobeko

This comment has been minimized.

Owner

akabekobeko commented Mar 26, 2018

As for pngjs, it is said that the author does not positively modify it waiting for pull request. Therefore, use pngjs-nozlib instead of pngjs.

Transition to pngjs-nozlib is supported by #87. Therefore I close this issue.

@akabekobeko akabekobeko modified the milestones: v.NEXT, v1.2.1 Mar 26, 2018

@tiriel729 tiriel729 referenced this issue Apr 2, 2018

Closed

pngjs error #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment