-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Comments
It passed our test on snapshot here. Will see it with your case. Thanks |
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. |
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 |
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';
} |
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. |
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 :-) |
documented in the wiki |
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 :-) !
The text was updated successfully, but these errors were encountered: