Skip to content

Crash when node-ffi is requiredΒ #2680

@rosen-vladimirov

Description

@rosen-vladimirov

Hi,

I'm trying to use node-ffi as dependency in the electron, but the require('ffi') leads to crash. Please note I'm using v2 branch of node-ffi, as it has support for iojs 3.x and this is the branch from which the new version should be released in npm very soon. The v2 branch can be required (after successful build of course) without any issues in iojs 2.x, iojs 3.x, node 0.12.x, but it fails in electron. I've noticed you are using a fork of node and there are some changes in it, so I've tried using older electron version - 0.29.1.The ffi module is successfully required with it, so I've checked the differences in your node's fork - the only one I see is this commit - could you share more details about it and could it cause the problem?

I've tried my app with electron 0.31.0 and 0.31.1, but without success.
You can find a sample application that reproduces the issue here. After cloning it, just run installAndStart script with target and architecture paramters, for example:

./installAndStart.sh 0.31.0 x64

And the modules will be rebuild with correct headers. At the end the electron should start, but it just crashes.

I've tried rebuilding your node's fork without the latest commit, but I'm not sure how to produce dll from it in order to replace it in my electron's installation.

Could you check what's causing this crash? I would have contacted node-ffi's authors, but their version is working fine with real iojs, it looks like the latest commit in your iojs's fork is causing the issue.

Thanks in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions