-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Error 3221225477 on Windows, trying to compile UTF-16 input file #2040
Comments
Thank you for a nice bug report! This is Windows error What I am seeing here is an attempt to run Maybe downgrading npm might help but that's just guessing. |
You are welcome!
`npm run dev` is simply an alias to `npm run development` so that's what
you're seeing there, but that doesn't have anything to do with the bug...
…On Mon, Jul 10, 2017, 05:32 Marcin Cieślak ***@***.***> wrote:
Thank you for a nice bug report!
This is Windows error C0000005 or ACCESS_VIOLATION which can be any kind
of crash. Since you are not using Windows XP I also doubt it is any form of
a duplicate.
What I am seeing here is an attempt to run npm run development from
inside of npm run dev. I am not really sure this is related to node-sass
at all.
Maybe downgrading npm might help but that's just guessing.
|
To give some context, this is the "scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
} |
Sorry for my mistake! |
Can you reproduce this with just node-sass and without webpack? |
Wasn't able to on a simple test case... scroll all the way down here for details: https://gist.github.com/weaversam8/1821e13947f61861e64683fdbab34721 Note that this was just node-sass, not just missing webpack but all the other tools I use to run my build. |
Maybe you need to add a custom importer you have mentioned in the comments? |
@saper If you take a look, the custom importer is there and functioning. |
Some updates:
What's interesting is that this issue may be beginning to happen to others as well... 14 days ago was this: facebook/create-react-app#2661 Something from the original thread over at #1283: https://github.com/nodejs/node/blob/842e5a10ac59c826f875ef79e92d144e2655cc9a/test/common.js#L502-L505 |
What @gaearon said over in facebook/create-react-app#2661 is:
Does this jive with what you guys are seeing @saper @nschonni? Interestingly enough, in the above referenced issue, I installed the packages that the OP of that issue did, and ran |
This needs to be verified if the process is not spawning:
I understand that there is no reproduction case for us yet, right? Probably a reproduction case may require launching lots of parallel sass processors. Next steps to find out what happens:
|
I'll see if I can get some of this to work. In addition, I'll see if I can get a minimum reproduction for you guys. |
Preliminarily, I ran ProcExp, suspended the process before the error occurred, attached Visual Studio 2015, and then did manage to catch the error: Keep in mind I'm new to debugging, so I'm not sure if what I've done next is accurate:
Does any of this make any sense to you all? I'm a web developer, I'm not used to dealing with this type of stuff, so I'm not sure how correct I am, but I'd love to learn! |
Very well done! Are you really using node 6.9.1 for this test? The exact version has to match. |
If your call stack is correct, one explanation could be that a Sass error occurred, but we are getting null pointer from libsass sass_context_get_error_json() and that causes node to explode. Setting a breakpoint before line 250 and getting the contents of the Maybe you can also identify the problem in your Sass source, and this could be the simplest reproduction case. |
I further tried to complicate my reproduction case by adding webpack and the vendor library I use to manage webpack, laravel-mix, to no avail. The next chance I get to run a full debug again, I'll see if I can resolve the |
Further information about the bug: Evidence suggests we've encountered a bug in V8. The function
The function
As you can see, calling this function with a null pointer gives the crash in question. I filed a bug report with V8 here: https://groups.google.com/forum/#!topic/v8-dev/e240zonwV3g As I understand it, I don't think this is the real root of the problem I'm experiencing, but I think we found a bug in V8 in the process... I think finding the files for that |
@weaversam8 It is not a bug in V8. Zero is an illegal argument for this function and crashing is unfortunately the expected response. We need to find out the contents of the The error coming out of Sass processing did not get converted to JSON properly. I really would like to know what kind of error is this. I hope this is not some resource constraint, really. We also need code to reproduce this bug. Check the Also checkout the sources of node-sass for your version (use tags) from git, and use A similar trick should work for |
Got it. Which version of the sass bindings should I download. I saw many
win32 x64 bindings, all with a different number after them...
|
Which one do you have installed in your node-sass vendor folder? I have for example
which means I have a binding file for FreeBSD amd64 for node 0.10 installed. You will certainly have win32-something. |
This comment has been minimized.
This comment has been minimized.
@saper you were right, it was with Contents of Do you know where the problem is in |
My Problem ExplanationI discovered that this was a simple case of node-sass trying to compile a UTF-16 file instead of UTF-8. Changing the text encoding of the file fixed my issue and allowed my code to run. Remaining ProblemI'm not exactly clear why node-sass failed to provide a proper error message, but that's what's still left to figure out. Ideally we can reproduce a test case now by trying to compile a UTF-16 file? |
Can you post the ctx variable as text? Can you build a simple replication case with UTF-16? |
Here's a replication case. Run Edit: I'm not sure how to get the |
@davidhantson as I understand it this is an issue in the underlying C code. There should never be any input to node-sass that should cause the low level code to error but it does. Theoretically every error should be returned in some form or another to the Javascript interface, but it isn't in this case which is what this issue should be focused on: fixing the error delivery path from the low level code all the way up to the Javascript. The underlying issue that caused this error, my error at least, was an input file to node-sass being in an encoding other than UTF-8 (UTF-16 in my case.) Are you sure all the input files are UTF-8? |
This comment has been minimized.
This comment has been minimized.
Did you upgraded node after installing your dependencies? I'd recommend to run our good old friend:
And try again. See rimraf if you don't have the command |
I fix this issue just unistalling npm most recent and download the recommended on npm website |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Since there is not much to be done in this bug report, closing. |
Version Information:
5.1.0
)v6.9.1
)win32
)x64
)npm ls node-sass
):Problem Description:
I am using a third party library known as Laravel Mix to manage my webpack dependencies. I am compiling a file, known as
app.scss
, which has the import statement@import 'foundation'
to import the Zurb Foundation library. Because the library is not immediately on my path, I'm using the node-sass feature ofincludePaths
to add the path to the folder containingfoundation.scss
.Upon running my code to compile, (by running the
npm run dev
script, which triggers webpack,) I reach the dependency ofapp.scss
and then the process exits with the status of 3221225477. For the history of this error code, please see #1283. Unfortunately, I don't think this is a duplicate, because this isn't occurring on installation. I'd also like to add that I was unable to find a clear resolution or explanation of the problem in that thread, and would greatly appreciate someone explaining it to me in a simple manner if it's applicable.Error Log:
The error log created by npm is here:
Note the command line flags on line 10, which was an effort to try and put in place something mentioned in #1283, but it also failed.
The text was updated successfully, but these errors were encountered: