Skip to content
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

snapshots don't work anymore with v0.8 (win7- 32 & 64 bits) #1266

Closed
petitben opened this issue Oct 30, 2013 · 7 comments
Closed

snapshots don't work anymore with v0.8 (win7- 32 & 64 bits) #1266

petitben opened this issue Oct 30, 2013 · 7 comments
Milestone

Comments

@petitben
Copy link

Hi,

It seems V8 snapshots functionality doesn't work properly anymore with the new fresh release.

My code used to function with v0.7.5. But now, NW always crashes at startup (Of course, I recompiled the binary file using nwsnapshot). I tried to find the minidump file but it seems it is not created.

Here is a simple example: http://www.sendspace.com/file/7c2qzg . Hope you'll find quickly what's wrong with it.

Keep up the good work with NW :-) !

@rogerwang
Copy link
Member

It passed our test on snapshot here. Will see it with your case. Thanks

@petitben
Copy link
Author

OK, thanks! Please note that the provided example is not our final app...

As it started to crash after the migration to nw 0.8, we actually tried with another really simple example (the one linked in the first post)... and as explained, the crash still occurs.

@miklschmidt
Copy link

This is intersting.. I'm having this problem with 0.7.3, 0.7.4 and 0.7.5. In my case the crashes are inconsistent, nwsnapshot will create a working snapshot most of the time, but sometimes it fails silently, (always once when building 1 version for 4 different platforms). See #1295

@rogerwang
Copy link
Member

I just found the problem is that the code being compiled creates a closure at compile time. If you write it like this it works well:

function sampleFunction()
{
    var privateVar = 'private';

        return privateVar+'67868';
}

@rogerwang
Copy link
Member

I think this is a limitation on the code that can be compiled into snapshot. If you have a large piece of code like this then you could wrap it inside a function and then compile it.

@petitben
Copy link
Author

petitben commented Dec 3, 2013

Indeed, it works now. Thanks for the hint!

Actually, I also though it was related to the closure too... What was quite strange however is this way to code worked with nw 0.7.5. So according to me, it should be a bug...

Maybe a mention of this problem in the wiki would be useful for everybody :-)

@rogerwang
Copy link
Member

documented in the wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants