Its a baffling problem, since I don't know how to debug this.
The goal: combine two images into one with jimp. It works perfectly on some images(no clue why it works on some but not on others), but on other images it doesn't work and just kills repl.it that I use.
When I try to write the image when it doesnt work, the only thing logged in the console is: "The repl process has died unexpectedly: signal killed"
Then repl.it that i'm running the program locally on stops running.
Here is the code that should be reproducible in itself:
jimp.read(req.file.buffer, (err, fir_img) => {
//replace with req.file.buffer
if(err) {
console.log(err);
res.send({status: "error"})
} else {
jimp.read(file10.location[0], (err, sec_img) => {
if(err) {
console.log(err);
res.send({status: "error"})
} else {
fir_img.composite( sec_img, x, y);
console.log('about to write')
fir_img.write('new_imgae15.png');
I'm truly baffled as to why this is happening. I need some way of debugging this but there is none since repl doesn't give much to go off of.
Another alternative if no solution/explanation can be found, is is there another place to run the code that DOES show detailed errors if this happens? Just for temporary use?
Thanks, let me know if anything needs more clarification/explanation.