mahnunchik / gulp-responsive

gulp-responsive generates images at different sizes
https://npmjs.com/gulp-responsive
MIT License
502 stars 62 forks source link

Handling Segmentation fault: 11 #9

Closed subblue closed 9 years ago

subblue commented 9 years ago

I've been getting a sporadic Segmentation fault: 11 error when using gulp-responsive. My task is using a */.jpg source path to match a bunch of images in subfolders. Sometimes it would complete the task without problems, but other times it throws the error.

Running the task on specific subfolders individually always worked, but then it occurred to me that it might be Dropbox interfering with the files before they have been fully written to disk as pausing Dropbox seems to stop the error. I'll probably end up modifying my task to move the files outside my Dropbox folder for the resizing so that I can keep my usual workflow.

I'm using OSX 10.10.1 and the issue is probably something to do with Sharp rather than gulp-responsive, but in case others have the same problem I thought it worth mentioning here. Is there a way of more gracefully capturing such errors I wonder?

subblue commented 9 years ago

Actually it's not Dropbox, it seems to work sometimes when the machine is under load from other tasks at the same time, like viewing a separate directory of image thumbnails.

subblue commented 9 years ago

Upgrading the sharp dependency to v0.9.0 fixes the issue :)

mahnunchik commented 9 years ago

Fix: https://github.com/mahnunchik/gulp-responsive/pull/10 Related issue: https://github.com/lovell/sharp/issues/155