Cannot run nw.exe if compression is set to 9.
wisniewski94 opened this issue · 1 comments
By mistake in my package.json compression property was set to 9 what shouldn't be a problem anyway. I thought that this problem is related to nw.js itself but it's definitely Web2Executable issue.
If you set compression to 9 you won't be able to run your app. Debug.log file will appear and there should be log such as:
[0108/200328:FATAL:sandbox_win.cc(658)] Check failed: result == 0.
Backtrace:
std::vector<v8::CpuProfileDeoptFrame,std::allocator<v8::CpuProfileDeoptFrame> >::push_back [0x10CECF67+63623]
v8::ResourceConstraints::set_stack_limit [0x10C935F1+705969]
std::vector<v8::CpuProfileDeoptFrame,std::allocator<v8::CpuProfileDeoptFrame> >::at [0x101BC628+593896]
std::vector<v8::CpuProfileDeoptFrame,std::allocator<v8::CpuProfileDeoptFrame> >::at [0x101BBB79+591161]
v8::Extension::auto_enable [0x10A9FF2C+18860]
v8::Extension::auto_enable [0x10A9F921+17313]
ChromeMain [0x0FE16DDC+151]
(No symbol) [0x01014361]
(No symbol) [0x010127C4]
IsSandboxedProcess [0x0106105F+86135]
BaseThreadInitThunk [0x75E033CA+18]
RtlInitializeExceptionChain [0x77B19ED2+99]
RtlInitializeExceptionChain [0x77B19EA5+54]
[0108/200328:ERROR:process_info.cc(608)] range at 0xfffde000, size 0x230 fully unreadable
[0108/200328:ERROR:process_info.cc(608)] range at 0xfffdd000, size 0xf84 fully unreadable
[0108/200328:ERROR:process_info.cc(608)] range at 0xfffda000, size 0xf84 fully unreadable
There is also no difference between 0 and 9 in file size. I did not checked other compression values.
Tried on v0.5.4b and v0.6.1b
It is actually a problem with NW.js or UPX. The .exe itself is not compressed because it's at the minimal size (which is why you see no difference in size), but all of the .dll files are compressed. For binary compression, I use UPX, which compresses all of the .dll files. I believe that in certain cases, UPX may compress the files too much and actually strip out some useful data. Unfortunately, there's not much I can do about that, except document it.
Thank you for pointing it out. I noticed it before but didn't have time to document it at the time and then forgot about it.