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

Iconfont task kills my gulp #64

Closed
Danetag opened this issue Jun 25, 2015 · 25 comments
Closed

Iconfont task kills my gulp #64

Danetag opened this issue Jun 25, 2015 · 25 comments
Assignees
Labels

Comments

@Danetag
Copy link

Danetag commented Jun 25, 2015

Hey guys!

No idea if I'm doing something wrong, but after a while working with a gulp watch running, I have this error, even tho on watch I'm not doing anything with iconfont (but the files are required).

/Users/danetag/Sites/tests/screwdriver/node_modules/gulp-iconfont/node_modules/gulp-ttf2woff2/node_modules/ttf2woff2/jssrc/ttf2woff2.js:90
      throw ex;
            ^
RangeError: Maximum call stack size exceeded
@nfroidure
Copy link
Owner

You're still using the JS fallback ?

@Danetag
Copy link
Author

Danetag commented Jun 26, 2015

Yep, as I can't install the main version :(

@Danetag
Copy link
Author

Danetag commented Jun 26, 2015

Hmm I actually re-installed it, I still have the errors but it seems to not use the JS fallback version now...

$ npm install
/
> ttf2woff2@1.2.0 install /Users/danetag/Sites/tests/screwdriver/node_modules/gulp-iconfont/node_modules/gulp-ttf2woff2/node_modules/ttf2woff2
> (node-gyp rebuild > builderror.log) || (exit 0)

../csrc/addon.cc:9:20: error: unknown type name 'FunctionCallbackInfo'
void Convert(const FunctionCallbackInfo<Value>& args) {
                   ^
../csrc/addon.cc:9:40: error: expected ')'
void Convert(const FunctionCallbackInfo<Value>& args) {
                                       ^
../csrc/addon.cc:9:13: note: to match this '('
void Convert(const FunctionCallbackInfo<Value>& args) {
            ^
../csrc/addon.cc:11:15: error: no matching constructor for initialization of 'v8::HandleScope'
  HandleScope scope(isolate);
              ^     ~~~~~~~
/Users/danetag/.node-gyp/0.10.35/deps/v8/include/v8.h:473:3: note: candidate constructor not viable: no known conversion from
      'v8::Isolate *' to 'const v8::HandleScope' for 1st argument
  HandleScope(const HandleScope&);
  ^
/Users/danetag/.node-gyp/0.10.35/deps/v8/include/v8.h:448:3: note: candidate constructor not viable: requires 0 arguments, but 1
      was provided
  HandleScope();
  ^
../csrc/addon.cc:13:7: error: use of undeclared identifier 'args'; did you mean 'uv_process_options_s::args'?
  if (args.Length() < 1) {
      ^~~~
      uv_process_options_s::args
/Users/danetag/.node-gyp/0.10.35/deps/uv/include/uv.h:1345:10: note: 'uv_process_options_s::args' declared here
  char** args;
         ^
../csrc/addon.cc:13:7: error: invalid use of non-static data member 'args'
  if (args.Length() < 1) {
      ^~~~
../csrc/addon.cc:14:14: error: no member named 'ThrowException' in 'v8::Isolate'
    isolate->ThrowException(Exception::TypeError(
    ~~~~~~~  ^
../csrc/addon.cc:15:17: error: no member named 'NewFromUtf8' in 'v8::String'
        String::NewFromUtf8(isolate, "Wrong number of arguments")));
        ~~~~~~~~^
../csrc/addon.cc:19:8: error: use of undeclared identifier 'args'; did you mean 'uv_process_options_s::args'?
  if (!args[0]->IsObject()) {
       ^~~~
       uv_process_options_s::args
/Users/danetag/.node-gyp/0.10.35/deps/uv/include/uv.h:1345:10: note: 'uv_process_options_s::args' declared here
  char** args;
         ^
../csrc/addon.cc:19:8: error: invalid use of non-static data member 'args'
  if (!args[0]->IsObject()) {
       ^~~~
../csrc/addon.cc:20:14: error: no member named 'ThrowException' in 'v8::Isolate'
    isolate->ThrowException(Exception::TypeError(
    ~~~~~~~  ^
../csrc/addon.cc:21:17: error: no member named 'NewFromUtf8' in 'v8::String'
        String::NewFromUtf8(isolate, "Not an object")));
        ~~~~~~~~^
../csrc/addon.cc:25:31: error: use of undeclared identifier 'args'; did you mean 'uv_process_options_s::args'?
  Local<Object> inputBuffer = args[0]->ToObject();
                              ^~~~
                              uv_process_options_s::args
/Users/danetag/.node-gyp/0.10.35/deps/uv/include/uv.h:1345:10: note: 'uv_process_options_s::args' declared here
  char** args;
         ^
../csrc/addon.cc:25:31: error: invalid use of non-static data member 'args'
  Local<Object> inputBuffer = args[0]->ToObject();
                              ^~~~
../csrc/addon.cc:28:14: error: no member named 'ThrowException' in 'v8::Isolate'
    isolate->ThrowException(Exception::TypeError(
    ~~~~~~~  ^
../csrc/addon.cc:29:17: error: no member named 'NewFromUtf8' in 'v8::String'
        String::NewFromUtf8(isolate, "First arg should be a Buffer")));
        ~~~~~~~~^
../csrc/addon.cc:45:14: error: no member named 'ThrowException' in 'v8::Isolate'
    isolate->ThrowException(Exception::TypeError(
    ~~~~~~~  ^
../csrc/addon.cc:46:17: error: no member named 'NewFromUtf8' in 'v8::String'
        String::NewFromUtf8(isolate, "Could not convert the given font.")));
        ~~~~~~~~^
../csrc/addon.cc:49:30: error: no matching function for call to 'New'
  Local<Object> slowBuffer = node::Buffer::New(isolate, output_length);
                             ^~~~~~~~~~~~~~~~~
/Users/danetag/.node-gyp/0.10.35/src/node_buffer.h:123:18: note: candidate function not viable: no known conversion from
      'v8::Isolate *' to 'const char *' for 1st argument
  static Buffer* New(const char *data, size_t len);
                 ^
/Users/danetag/.node-gyp/0.10.35/src/node_buffer.h:116:33: note: candidate function not viable: requires single argument 'string',
      but 2 arguments were provided
  static v8::Handle<v8::Object> New(v8::Handle<v8::String> string);
                                ^
/Users/danetag/.node-gyp/0.10.35/src/node_buffer.h:121:18: note: candidate function not viable: requires single argument 'length',
      but 2 arguments were provided
  static Buffer* New(size_t length);
                 ^
/Users/danetag/.node-gyp/0.10.35/src/node_buffer.h:129:32: note: candidate function not viable: requires single argument 'args',
      but 2 arguments were provided
  static v8::Handle<v8::Value> New(const v8::Arguments &args);
                               ^
/Users/danetag/.node-gyp/0.10.35/src/node_buffer.h:125:18: note: candidate function not viable: requires 4 arguments, but 2 were
      provided
  static Buffer* New(char *data, size_t length,
                 ^
../csrc/addon.cc:52:38: error: no member named 'GetCurrentContext' in 'v8::Isolate'
  Local<Object> globalObj = isolate->GetCurrentContext()->Global();
                            ~~~~~~~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/addon/csrc/addon.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/danetag/Sites/tests/screwdriver/node_modules/gulp-iconfont/node_modules/gulp-ttf2woff2/node_modules/ttf2woff2
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
gulp-iconfont-css@0.0.9 node_modules/gulp-iconfont-css
├── consolidate@0.10.0
├── gulp-util@2.2.20 (lodash._reinterpolate@2.4.1, minimist@0.2.0, vinyl@0.2.3, chalk@0.5.1, lodash.template@2.4.1, through2@0.5.1, dateformat@1.0.11, multipipe@0.1.2)
└── lodash@2.4.2

gulp-iconfont@3.0.2 node_modules/gulp-iconfont
├── gulp-cond@0.0.2 (readable-stream@1.1.13)
├── gulp-ttf2eot@1.0.2 (bufferstreams@1.0.1, ttf2eot@1.3.0, readable-stream@1.1.13)
├── gulp-spawn@0.3.0 (plexer@0.0.1, gulp-util@2.2.20)
├── gulp-clone@1.0.0 (through2@0.4.2, gulp-util@2.2.20)
├── gulp-ttf2woff@1.0.2 (bufferstreams@1.0.1, readable-stream@1.1.13, ttf2woff@1.3.0)
├── plexer@0.0.3 (readable-stream@1.1.13)
├── gulp-svgicons2svgfont@2.1.0 (readable-stream@2.0.1, svgicons2svgfont@3.0.2)
├── streamfilter@1.0.1 (streamtest@1.2.1, readable-stream@1.1.13)
├── gulp-svg2ttf@1.1.1 (readable-stream@2.0.1, bufferstreams@1.0.1, svg2ttf@2.0.0)
└── gulp-ttf2woff2@1.1.1 (bufferstreams@1.0.2, readable-stream@2.0.1, ttf2woff2@1.2.0)

But I still have the issue

/node_modules/gulp-iconfont/node_modules/gulp-ttf2woff2/node_modules/ttf2woff2/jssrc/ttf2woff2.js:1
aughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Mod

@nfroidure
Copy link
Owner

Can you manually upgrade the gulp-ttf2woff2 plugin in order to see if the last version fixes your problem? I solved some memory leaks for the JS version.

I think you're still using the JS callback.

@pushred
Copy link

pushred commented Jun 26, 2015

Same over here with with both 1.1.1 and 1.1.0, except with the latter the install blows up similar to the above. With 1.1.1 there's still a bunch of warnings but make doesn't bail out.

@Danetag
Copy link
Author

Danetag commented Jun 29, 2015

Any update? Can I use the version 1.0.0? I really need to have this task working or I'll have to find something else to generate my icon fonts :(

@nfroidure
Copy link
Owner

You can revert to a prior version to avoid the issue right now.

As a short term workaround, the next version will allow to select the font formats in output so you'll be able to disable WOFF2 font generation since it looks likes the problem sits there for you. See #39 (comment)

Unfortunately, for Windows users, i think that WOFF2 support will not be enabled soon since i have no computer with Windows installed. We'll have to wait for a developper with strong debugging knowledge to debug this issue.

@nfroidure
Copy link
Owner

Also, you can try to build the woff2 fork and use the spawnWOFF2 option.

@nfroidure
Copy link
Owner

Forgot to tell that creating a failing repo will certainly help to debug and at least, to see if the issue is really Windows specific.

@sabberworm
Copy link
Collaborator

I have this as well. I’m not sure this is related to WOFF2: when I remove the woff2 code from index.js, the error just happens somewhere else:

events.js:53
EventEmitter.prototype.emit = function emit(type) {
                                           ^
RangeError: Maximum call stack size exceeded

I only have the error when I use ligatures (using options.metadataProvider), though.

@nfroidure
Copy link
Owner

Can you give me the full stack traces please?

@sabberworm
Copy link
Collaborator

At least for me, what I posted is the full output, this is the complete stack trace.

@nfroidure
Copy link
Owner

@sabberworm possible to share the failing code/icons in order to reproduce it ?

@allankikkas
Copy link

+1 for making woff2 as a separate branch.
Looks like ttf2woff2 requires node-gyp to be properly installed with all non-npm dependancies and properly set up. This is impossible to do with given documentation (tried for hours and still not building). Without proper ttf2woff2 build gulp-ttf2woff2 crashes and therefore gulp-iconfont crashes and so on.

nfroidure added a commit that referenced this issue Jul 23, 2015
@nfroidure nfroidure added the bug label Aug 1, 2015
@dudesl
Copy link

dudesl commented Aug 12, 2015

I have the same issue, in a Mac OS X 10.9.5 and the node version 0.12.6

/node_modules/gulp-iconfont/node_modules/gulp-ttf2woff2/node_modules/ttf2woff2/jssrc/ttf2woff2.js:1
aughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Mod

I try to remove all the node_modules dir and re enter the npm install command.
When the dependencies start to install, i have this output:

> ttf2woff2@1.2.2 install /Users/.../node_modules/gulp-iconfont/node_modules/gulp-ttf2woff2/node_modules/ttf2woff2
> (node-gyp rebuild > builderror.log) || (exit 0)

There is a workaround for this issue? maybe downgrade the version of ttf2woff2?

@dudesl
Copy link

dudesl commented Aug 12, 2015

I make a fork of the project and unplugged the ttf2woff2 plugin like-a-workaround.
https://github.com/dudesl/gulp-iconfont

For the moment we will use this fork, waiting for the definitive solution.

@lhwparis
Copy link

Seems like its now 4.x compatible: nfroidure/ttf2woff2#10

@bm2u
Copy link

bm2u commented Nov 27, 2015

After updating npm from npm 0.12.7 to 4.2.2 and gulp-iconfont from 5.0.0 to 5.0.1. Woff2 format in option kills my build process randomly with Process finished with exit code -1073740940 (0xC0000374). Unfortunately there is no deeper logging oder details to provide, but leaving the woff2 format option solves the problem. Maybe be a clue to follow. Has anybody an idea about how to convert ttf to woff2 in the meantime, except downgrading? Im running on windows 8.1.

@nfroidure
Copy link
Owner

@bm2u can you report the issue to the ttf2woff2 project to start discuss about this new bug?

Nice to have: the svg/ttf outputed font.

@bm2u
Copy link

bm2u commented Nov 27, 2015

@nfroidure Did it - thx nfroidure/ttf2woff2#22

@michael-jerred
Copy link

ttf2woff2 is really broken it seems. Even with no woff2 in my options it causes my visual studio task runner to crash. The fork by @dudesl (https://github.com/dudesl/gulp-iconfont) has worked for me - perhaps ttf2woff2 should be removed entirely from this project until it's in working order?

@nfroidure
Copy link
Owner

I still can't reproduce the issue neither on a Mac or Linux system. I guess the only option is to make of gulp-ttf2woff2 an optional dependency.

Can some of you try this branch? https://github.com/nfroidure/gulp-iconfont/tree/optionnal_woff2

@michael-jerred
Copy link

Yep this branch seems to be working for me.

For reference I'm using Windows 8.1 with Visual Studio Professional 2015

@nfroidure nfroidure self-assigned this Jan 14, 2016
@sabberworm
Copy link
Collaborator

I have not had this issue again.

@nfroidure
Copy link
Owner

So let's close

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

No branches or pull requests

9 participants