out-of-memory

android - Out of memory Exception

我们两清 提交于 2019-12-04 14:35:02
I develop one android app for book read. The Book pages and audios are download from Amazon Bucket. After downloading it stores on SD Card. I place to two button for next and previous pages. When I display pages It gives me Out of Memory Exception. 11-03 10:59:39.199: E/AndroidRuntime(13566): FATAL EXCEPTION: main 11-03 10:59:39.199: E/AndroidRuntime(13566): java.lang.OutOfMemoryError 11-03 10:59:39.199: E/AndroidRuntime(13566): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 11-03 10:59:39.199: E/AndroidRuntime(13566): at android.graphics.BitmapFactory.decodeStream

java.lang.OutOfMemoryError: Java heap space when stitching 13k .png images together

谁说我不能喝 提交于 2019-12-04 14:28:19
I have 13255 images, each 240 x 240 pixels wide, the biggest 15,412 bytes in size and the smallest 839 bytes. I am trying to loop through the folder adding each of them to a File[]. Once I have an array of each image I am then placing them inside a BufferedImage[] ready to be looped through and drawn onto a larger single image made up of each individual one. Each image is named in the form of Image x-y.png However, I keep ending up with a java.lang.OutOfMemoryError: Java heap space error. I have no idea why. I have tried altering the size of the memory available to the JVM by adding parameters

Jasper Reports OutOfMemoryError on export

落爺英雄遲暮 提交于 2019-12-04 14:08:42
问题 I have written a web app for managing and running Jasper reports. Lately I've been working with some reports that generate extremely large (1500+ page) outputs, and attempting to resolve the resultant memory issues. I have discovered the JRFileVirtualizer, which has allowed me to run the report successfully with a very limited memory footprint. However, one of the features of my application is that it stores output files from previously run reports, and allows them to be exported to various

Why so much memory?

删除回忆录丶 提交于 2019-12-04 13:57:56
问题 I have a 1000x1500 pixel bitmap of which I want to make a mutable copy in Android. When I run the following code... // int width = original.getWidth(); // 1000px // int height = original.getHeight(); // 1500px final Bitmap result = original.copy(original.getConfig(), true); original.recycle(); ...I get an OutOfMemoryError on the copy line: java.lang.OutOfMemoryError: bitmap size exceeds VM budget ERROR/GraphicsJNI(419): VM won't let us allocate 6000000 bytes Why does the copy instruction need

Tomcat memory usage (PermGen)

我的未来我决定 提交于 2019-12-04 12:19:27
I am using Tomcat for deploying a web application withe following PermGen configurations: JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC" Please I want to know the following: Is the whole memory used by Tomcat should be 256MB or Tomcat consumes other memory for other reasons ? How can I monitor the memory used by Tomcat to avoid reaching PemGen max size ? Also please be noticed that I have 3 Tomcats with the same previous PermGen configurations, running on

java can system out result in out of memory issues

安稳与你 提交于 2019-12-04 11:59:56
This is a theoretical question . Can a flood of system out on java applet , cause applet to go out of memory ? If yes what would be an easy solution to remove multiple sysout spanning across multiple files ? A single System.out.println(x) can cause an out of memory error, if x.toString() uses too much memory. Can a flood of system out on java applet , cause applet to go out of memory ? It is size of the resulting String which matters, not the number. More messages will be slower, but make no difference to the amount of free memory after a Full GC and that is what counts. 来源: https:/

Android pinch zoom large image, memory efficient without losing detail

好久不见. 提交于 2019-12-04 10:53:33
问题 My app has to display a number of high resolution images (about 1900*2200 px), support pinch zoom. To avoid Out of memory error I plan to decode image to show full screen by using options.inSampleSize = scale (scale was calculated as Power of 2 as Document) (My view i used is TouchImageView extends of ImageView ) So i can quickly load image and swipe smoothly between screens(images). However, when i pinch zoom, my app loses detail because of scaled image. If i load full image, i can't load

Large memory chunk not garbage collected

旧巷老猫 提交于 2019-12-04 10:13:19
问题 In a hunt for a memory-leak in my app I chased down a behaviour I can't understand. I allocate a large memory block, but it doesn't get garbage-collected resulting in a OOM, unless I explicit null the reference in onDestroy. In this example I have two almost identical activities that switch between each others. Both have a single button. On pressing the button MainActivity starts OOMActivity and OOMActivity returns by calling finish(). After pressing the buttons a few times, Android throws a

Python: Unpredictable memory error when downloading large files

╄→гoц情女王★ 提交于 2019-12-04 10:04:02
I wrote a python script which I am using to download a large number of video files (50-400 MB each) from an HTTP server. It has worked well so far on long lists of downloads, but for some reason it rarely has a memory error. The machine has about 1 GB of RAM free, but I don't think it's ever maxed out on RAM while running this script. I've monitored the memory usage in the task manager and perfmon and it always behaves the same from what I've seen: slowly increases during the download, then returns to normal level after it finishes the download (There's no small leaks that creep up or anything

java out of memory error-heap space

帅比萌擦擦* 提交于 2019-12-04 09:48:38
I'm developing web application in jsp/servlet,i had an issue with netbeans and Java. My program needs large data process. So I used -Xmx512m to increase the maximum heap size via Tools -> Servers -> on the Platform tab there is a VM option below Java Platform. Then it works fine.. Now my issue is i'm building the WAR file, directly deployed and run in my another machine Tomcat for demo, here i'm facing the same issue java out of memory error-heap space i also tried with environment variable set CATALINA_OPTS=-Xms512m -Xmx512m this also didn't help me how to resolve this issue?, Please point me