-
Notifications
You must be signed in to change notification settings - Fork 135
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
Sass worker compilation aborts and all compilations fail after #85
Comments
The stack traces of the built file aren't helpful. Can you provide a reduced test case so I can reproduce this in order to investigate? |
I will try to build one. Is there any way to build the library with the ASSERTIONS=1 flag? |
closing because there has been no update from OP in months, presume issue is resolved - otherwise please reopen with additional details. |
I'm having this problem, as a work around whenever the compiler fails, I retry with a new instance of the compiler. |
Sounds like a memory leak problem (that just doesn't matter much on 1-3 compilations).
|
It's a single "string" what I'm passing to the compiler, no importer is used. The string size is not bigger that a MB and the number of compilations to the crash goes from 3 to 7. |
do you mind sharing that source? might be related to functions, loops, … |
The sass looks like: @function quotes-verbatim($value) {
@if (type-of($value) == "string") {
$list-expr: "#{inspect(($value, ""))}";
@return str-slice($list-expr, 0, str-length($list-expr) - 4);
}
@else {
@return $value;
}
}
@function wrap($name, $value) {
@if (outputstyle() != "COMPRESSED") {
@if ($value) {
@return unquote("/* << var:" + $name + " */ " + quotes-verbatim($value) + " /* >> */");
}
@return null;
}
@return $value;
};
$myBar1: #e23200;
$myBar2: #e23200;
.dummyClass {
myBar1: wrap('$myBar1', $myBar1);
myBar2: wrap('$myBar2', $myBar2);
} The sequence of var declarations and usage is bigger, around 300. The sass source code is dynamically generated. |
thanks! I'll investigate once I've managed to switch to WebAssembly and upgraded to libsass 3.5.2 (hopefully soon) |
I've encountered the same issue, chrome dev tool did show leaking memory and the compiler did crash (aborted) on my sass file after the 48th compile every time. Did a recompilation of sass.js with a newer emscripten and the problem went away. 1000th sass compile and no aborts or memory leaks. The forked repo with the recompiled @rodneyrehm I can send you a pull request if you'd like to merge the recompiled version. |
I am using sass.js in the browser using the sass.worker.js. The worker recompiles css as the user changes variables. After a while, the worker starts emitting errors on compilation, even when the input is valid.
Here are some of the errors emitted, all of which have a status code of 99:
It seems to start after attempting to compile invalid css but even when the css is corrected is remains broken. Can you provide any insight?
The text was updated successfully, but these errors were encountered: