lwip icon indicating copy to clipboard operation
lwip copied to clipboard

Node process exit after lwip operations are done

Open Sektoid opened this issue 10 years ago • 15 comments

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" */ })

Sektoid avatar Mar 25 '15 12:03 Sektoid

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.

rmarku avatar Mar 25 '15 21:03 rmarku

Does this problem also occur with node 0.10?

EyalAr avatar Mar 25 '15 23:03 EyalAr

Hi, have just installed node 0.10.37 and this does not happend.

rmarku avatar Mar 26 '15 00:03 rmarku

@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 avatar Mar 26 '15 00:03 EyalAr

@EyalAr It didnt help - nan is v1.7.0 now but the problem is still there.

Sektoid avatar Mar 26 '15 11:03 Sektoid

Then I'll have to take a deeper look. Please provide a runnable code example which exhibits this problem.

EyalAr avatar Mar 26 '15 12:03 EyalAr

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?

blowsie avatar Apr 01 '15 11:04 blowsie

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) {

blowsie avatar Apr 01 '15 11:04 blowsie

I also am having this issue, closes the node main app... any fix yet?

sg26g11 avatar Apr 12 '15 21:04 sg26g11

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 avatar Apr 13 '15 21:04 sg26g11

@sg26g11 for now, you can just install an older version of node as @rmarku suggests and your problems should go away.

blowsie avatar Apr 14 '15 13:04 blowsie

@blowsie Thanks :+1: Just installed node 0.10.37 and it's working properly :)

sg26g11 avatar Apr 15 '15 10:04 sg26g11

@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

blowsie avatar May 07 '15 15:05 blowsie

Same issue with a 4MB image file. Node v0.12.0.

zphingphong avatar Apr 17 '16 20:04 zphingphong

@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?

ChristianRich avatar Apr 18 '16 01:04 ChristianRich