-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Segfault when compilation raises errors #1858
Comments
I have reproduced this on a machine running Ubuntu as well with the following environment:
Output:
|
Just tried it, I'm afraid my example repo still causes the issue and same goes for our production code. Like you mention in the other issue, there are a number of parts at play and it's really hard to narrow it down to what exactly seems to cause it. Note that it only happens if the compilation fails, it also seems to happen more often with a larger code base (As in our production case). If I remove a sufficient amount of random CSS from the example repo it stops happening and the compilation exits as it should on error. |
We are facing a similar kind of issue, Where as the SASS file in our production code generates 1 CSS file with combined set of CSS files. when we run the product styles from here and there breaks. but when we remove or comment a random set of SASS code and compile the CSS file then it generates fine and no style issues occur. Any clue why this may be happening? |
I see the warning but not the segfault running 4.5.3 on OSX Nicks-MacBook-Pro:sass-segfault nschonni$ grunt sass
Running "sass:test" (sass) task
>> Error: File to import not found or unreadable: intentionally not found.
>> Parent style sheet: /Users/nschonni/Documents/github/sass-segfault/test/modules.scss
>> on line 2 of test/modules.scss
>> >> @import 'intentionally not found';
>> ^
Warning: Use --force to continue.
Aborted due to warnings. Edit: this is under Node 8 though sass-test@1.0.0 /Users/nschonni/Documents/github/sass-segfault
└─┬ grunt-sass@2.0.0
└── node-sass@4.5.3 |
Under node 6.11.1 I'm still seeing the segfault
Same dependency versions as you
However like you say Node 8 seems to fix it for me as well. |
This is probably fixed in 4.8.0 |
…isitor Remove `To_String` by using `AST->to_string` and `inspect`
A part of our SASS code generates segfaults when compiled with node-sass (I'm using grunt-sass for the compilation) in case something goes wrong with the compilation. I've tried to figure out what may be causing it but I'm really drawing a blank here, so perhaps someone with better insight into node-sass or libsass can help me out.
I have an example repo here in which I've cut down as much of the code as possible: https://github.com/richardsimko/sass-segfault
Running
grunt sass
after checking out and installing will crash with a segfault.I have found the following clues:
_organizer.scss
fixes the issue (I.e. a proper exit without segfaults even on error)_organizer.scss
causes the error to become infrequent, for example removing approximately 100 lines causes it to only happen about 1/4 of the times//@import 'uncomment me to test not found here';
to test)_organizer.scss
also fixes the issue_config.scss
into_organizer.scss
and running it using http://www.sassmeister.com/ provides a clean compilationOutput
Environment Info
NPM version (
npm -v
): 4.1.1Node version (
node -v
): 4.7.0Node Process (
node -p process.versions
):Node Platform (
node -p process.platform
): darwinNode architecture (
node -p process.arch
): x64node-sass version (
node -p "require('node-sass').info"
):npm node-sass versions (
npm ls node-sass
):npm ls node-sass
:The text was updated successfully, but these errors were encountered: