lwip
                                
                                
                                
                                    lwip copied to clipboard
                            
                            
                            
                        Node process exit after lwip operations are done
I'm using node v0.12.0, npm v2.5.1 and lwip v0.0.6 on Windows 7 x64. The issue is when all lwip operations are done - the main app process exits. It seems like some lwip-started process should be exited but instead of this it exits the main app process without any errors.
Even if I just open a file and then do some other stuff not related with lwip - it seems like it decides that some lwip-started process are no longer needed (which is correct!) but exits the main process instead.
lwip.open(bufferr, extension, function (err, image) { /* It gets the image well. But now if something else happens it shuts down the main app process with no errors and "Press any key to continue" */ })
Same problem here, I have a async.each that iterates over an array of images to be trimmed and joined. Inside I have an lwip.open and the application exit without any error or trace.
Same configuration node v0.12.0, npm v2.5.1 and lwip v0.0.6 on Windows 7 x64. lwip compiled with visual studio express 2013.
Not problem at all with linux.
Does this problem also occur with node 0.10?
Hi, have just installed node 0.10.37 and this does not happend.
@rmarku I have updated the version of one of the native dependencies, which may have been the source of the problem. Please try to reinstall lwip from the latest commit and tell me if the problem still persists.
You can use npm install eyalar/lwip#db17767
Thanks.
@EyalAr It didnt help - nan is v1.7.0 now but the problem is still there.
Then I'll have to take a deeper look. Please provide a runnable code example which exhibits this problem.
npm: 2.7.4
node:  v0.12.2
os: win 8.1
I also have this issue when using a large amount of files.
Process finished with exit code -1073740940 (0xC0000374)
I also tried to use async.eachSeries to try and prevent any over loading from taking place, the error still occurs.
In addition to this I reduced the lwip code to only lwip.open for each file, and it still fails.
Should there be a lwip.close or similar?
Here is a snippet of my code which will reproduce the issue
  async.eachSeries(files, function(filename, fileComplete) {
      var path = source + filename;
      var stats = fs.statSync(path);
      var isDir = stats.isDirectory();
      // If its not a directory
      if (!isDir) {
        lwip.open(path, function(err, image) {
                                    
                                    
                                    
                                
I also am having this issue, closes the node main app... any fix yet?
A fix or workaround would be appreciated - I have a dissertation deadline in two weeks, I need to know if I have to redo my thumbnails (so if this will be fixed before then)
Otherwise, the module works beautifully.
As a side note, if anyone has an image cropping module that does not require imagemagick or graphics magic - please let me know
I have tried a number of node versions and lwip versions - all end the main node js app upon completion of image tasks - including simply opening the image with lwip.open(path, function(err, image) { code }
@sg26g11 for now, you can just install an older version of node as @rmarku suggests and your problems should go away.
@blowsie Thanks :+1: Just installed node 0.10.37 and it's working properly :)
@EyalAr , any luck finding the issue? Is there any more info I can provide to help?
I sometimes get this error code
Warning: error: 127 in lwip_image.node
Same issue with a 4MB image file. Node v0.12.0.
@zphingphong In Node v. 4.4.2 I can process large files without any problems. Node 0.12.0 is pretty old, perhaps it's time for an upgrade?