Image Crop Module Memory Issue

0
Hi Team, I tried to shrink and blur an image using Image Crop module. It is working fine for Blob image up to 11MB. But for bigger image, I am getting the following error in R2 and Production environment(not in Local). The error occurs when the ‘ScaleImage’ Java Action is executed. execution type: CUSTOM)Stack tracejava.lang.OutOfMemoryError: Java heap space at java.desktop/java.awt.image.DataBufferByte.<init>(Unknown Source) at java.desktop/java.awt.image.ComponentSampleModel.createDataBuffer(Unknown Source) at java.desktop/java.awt.image.Raster.createWritableRaster(Unknown Source) at java.desktop/javax.imageio.ImageTypeSpecifier.createBufferedImage(Unknown Source) at java.desktop/javax.imageio.ImageReader.getDestination(Unknown Source) at java.desktop/com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(Unknown Source) at java.desktop/com.sun.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source) at java.desktop/javax.imageio.ImageIO.read(Unknown Source) at java.desktop/javax.imageio.ImageIO.read(Unknown Source) at imagecrop.implementation.ImageUtil.processImage(ImageUtil.java:52) at imagecrop.actions.ScaleImage.executeAction(ScaleImage.java:52) at imagecrop.actions.ScaleImage.executeAction(ScaleImage.java:17) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54) at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152) at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:383) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:53) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:205) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:159) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54) at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152) at com.mendix.basis.component.InternalCoreBase.executeSync(InternalCoreBase.java:413) Does anyone have any idea why this isn’t working for bigger Blob images?
asked
1 answers
2

Hi jini,

 

 

 

This is an error you run into when the JVM Heap tells you “Enough is enough. I can’t fit all of this into my memory.” Which usually means that the application has become unstable and should be restarted before it crashes and that you also have a real problem to solve.

 

The following things can cause this error:

 

Memory leak

 

Introduced by developer, custom code

 

A bug in Mendix Runtime

 

A bug in a Java library used by custom code of the developer or by the Mendix Runtime

 

A bug in Java Runtime

 

Massive creation of objects (for example, by retrieving 1 trillion entities in a single microflow at once)

 

Configuration issue or sizing issue.

 

https://docs.mendix.com/refguide/runtime-java-errors/

 

You can refer to this doc.

 

 

 

you can correct this by

 

Settings→ config.→ Size

 

 And

 

Do one more thing

 

There maybe the case that a microflow of yours is going in infinite loop. So, to check that,

 kindly go to console, there's an advance option, now go to log now search for microflow and set it to trace, this will tell you which activity of yours is going in an infinite loop.

answered