endel / node-delta Goto Github PK
View Code? Open in Web Editor NEWAn efficient delta compression algorithm for Node.js
License: Other
An efficient delta compression algorithm for Node.js
License: Other
I'm using node-delta on an electron app I am build, but it seem to crash every time I invoke the 'apply' method. Doesn't matter the file size, it simply crashes the app.
I have tested on a clean node app, and works fine. I'm Having crashes issues only with electron.
Sometimes it do what it have to do, finish everything (I mean, the final file is generated just fine), but after 5 seconds the app goes down. If it doesn't happen, it will surely crash if you open the console.
I don't know if it can make difference, but I had to rebuild node-delta using "electron-rebuild" to make it work.
So, any suggestion with what may cause this issue?
npm install node-delta
[email protected] install /home/olga/Desktop/kolmofs/delta_analysis/node_modules/node-delta
node-gyp rebuild
make: Entering directory '/home/olga/Desktop/kolmofs/delta_analysis/node_modules/node-delta/build'
CXX(target) Release/obj.target/delta/src/delta.o
../src/delta.cc: In function ‘int delta_create(const char*, unsigned int, const char*, unsigned int, char*)’:
../src/delta.cc:436:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(k=1; k<iSrc && k<=i; k++){
~^~~
../src/delta.cc:450:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( cnt>=sz && cnt>bestCnt ){
~~~^~~~~~~~
../src/delta.cc:482:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( bestOfst + bestCnt -1 > lastRead ){
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
../src/delta.cc: In function ‘int delta_apply(const char*, int, const char*, int, char*)’:
../src/delta.cc:600:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( ofst+cnt > lenSrc ){
~~~~~~~~~^~~~~~~~
../src/delta.cc:616:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( cnt>lenDelta ){
~~~^~~~~~~~~
../src/delta.cc: In function ‘int delta_analyze(const char*, int, int*, int*)’:
../src/delta.cc:689:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( cnt>lenDelta ){
~~~^~~~~~~~~
../src/delta.cc: In function ‘void Init(v8::Localv8::Object)’:
../src/delta.cc:742:55: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
Nan::New(Create)->GetFunction());
^
In file included from /home/olga/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../src/delta.cc:713:
/home/olga/.cache/node-gyp/12.16.1/include/node/v8.h:6126:46: note: candidate: v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^~~~~~~~~~~
/home/olga/.cache/node-gyp/12.16.1/include/node/v8.h:6126:46: note: candidate expects 1 argument, 0 provided
../src/delta.cc:745:54: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
Nan::New(Apply)->GetFunction());
^
In file included from /home/olga/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
from ../../nan/nan.h:54,
from ../src/delta.cc:713:
/home/olga/.cache/node-gyp/12.16.1/include/node/v8.h:6126:46: note: candidate: v8::MaybeLocalv8::Function v8::FunctionTemplate::GetFunction(v8::Localv8::Context)
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^~~~~~~~~~~
/home/olga/.cache/node-gyp/12.16.1/include/node/v8.h:6126:46: note: candidate expects 1 argument, 0 provided
../src/delta.cc: In function ‘unsigned int checksum(const char*, size_t)’:
../src/delta.cc:270:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 3: sum += (z[2] << 8);
~~~~^~~~~~~~~~~~~~
../src/delta.cc:271:5: note: here
case 2: sum += (z[1] << 16);
^~~~
../src/delta.cc:271:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 2: sum += (z[1] << 16);
~~~~^~~~~~~~~~~~~~~
../src/delta.cc:272:5: note: here
case 1: sum += (z[0] << 24);
^~~~
delta.target.mk:111: recipe for target 'Release/obj.target/delta/src/delta.o' failed
make: *** [Release/obj.target/delta/src/delta.o] Error 1
make: Leaving directory '/home/olga/Desktop/kolmofs/delta_analysis/node_modules/node-delta/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.3.0-45-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/olga/Desktop/kolmofs/delta_analysis/node_modules/node-delta
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/olga/.npm/_logs/2020-04-01T17_02_47_640Z-debug.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.