-
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
Crash on start when using binary #6061
Comments
I can't reproduce your issue. It works fine on Windows 8.1 with nwjs-sdk-v0.24.0. |
@Christywl Finally, I could narrow down the problematic parts. I'm using angular 1.6.6 and, here's minimal reproducible example code: index.html: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script>nw.Window.get().evalNWBin(null, 'index.js.bin');</script>
</head>
<body ng-app="app" ng-cloak>
<test></test>
</body>
</html> index.js: 'use strict';
const angular = require('angular');
const assert = require('assert');
class Class {}
function Constructor () {}
const obj1 = new Class();
const obj2 = new Constructor();
assert(obj1 !== obj2);
const test = {
controller: Constructor,
template : 'test'
};
test.controller = Class; // causes crash
const app = angular
.module('app', [])
.component('test', test)
.name;
module.exports = app;
When I giving controller using a class, the app crashes. If I give it as a constructor function by commenting out This code is tested on Windows 10 with nwjs-sdk-v0.25.0. |
I'm sorry for incomplete example. I think 'mixed context' should be enabled. I've tried to make a separated and complete example: Although this example does not crash, it says some reference error when binary used while it works perfect when js used.
|
Use the updated sample, I see the same error and don't meet the crash. So the reported crash issue also doesn't reproduce for you now? |
@Christywl |
I also have the same issue, and have narrowed it down to having something to do with classes. Example: index.js
index-bin.html
Opening the dev tools, the created devItem is shown via console.log, but when opening it and clicking on proto the app crashes. Windows 10 with NW 0.25.0-sdk |
I can reproduce the crash with noviwiden's codes on Linux/Windows 10 with nwjs-sdk-v0.25.2. |
This is fixed in git and will be available in the next nightly build. |
I compiled my application with
nwjc
but when I useevalNWBin
, the application crashes on start.With original js file, it works fine.
When I tried with simple js file which contains one line
alert()
only, compiled binary works too.Maybe some pacakge contains compatibility issue?
I attach my crash dump, here.
0c6e696d-ea69-44bc-b12b-7edd26faf958.zip
NW.js version: 0.24.0 SDK for window 64bit
The text was updated successfully, but these errors were encountered: