out-of-memory

Eclipse + GWT -> Out of memory in development mode

筅森魡賤 提交于 2019-12-01 18:03:13
If I run my GWT application in eclipse in development mode and click around in the browser for some time, I always get an "out of memory" error in eclipse. My computer has 16 GB Ram, and there is never used more than 8GB. I tried several config parameters. The VM-arguments in my Run configuration contain these parameters: "-Xms8192m -Xmx8192m" Even in the eclipse.ini I tested several config parameters and now it looks like this: --launcher.XXMaxPermSize 8192M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 8192m --launcher.defaultAction openFile --launcher.appendVmargs -vmargs -Dosgi

Eclipse + GWT -> Out of memory in development mode

旧城冷巷雨未停 提交于 2019-12-01 17:52:56
问题 If I run my GWT application in eclipse in development mode and click around in the browser for some time, I always get an "out of memory" error in eclipse. My computer has 16 GB Ram, and there is never used more than 8GB. I tried several config parameters. The VM-arguments in my Run configuration contain these parameters: "-Xms8192m -Xmx8192m" Even in the eclipse.ini I tested several config parameters and now it looks like this: --launcher.XXMaxPermSize 8192M -showsplash org.eclipse.platform

byte[] and efficiently passing by reference

匆匆过客 提交于 2019-12-01 17:41:49
So this is in relationship to dealing with the Large Object Heap and trying to minimize the number of times I instantiate a byte[]. Basically, I'm having OutOfMemoryExceptions and I feel like it's because we're instantiating too many byte array's. The program works fine when we process a couple of files, but it needs to scale, and it currently can't. In a nutshell, I've got a loop that pulls documents from a database. Currently, it's pulling one document at a time and then processing the document. Documents can range from less than a meg to 400+ megs. (hence why i'm processing one at a time).

Newtonsoft.Json - Out of memory exception while deserializing big object

ぃ、小莉子 提交于 2019-12-01 17:37:27
I have a problem deserializing a JSON file of about 1GB. When I run the following code I get an out of memory exception: using (FileStream sr = new FileStream("myFile.json", FileMode.Open, FileAccess.Read)) { using (StreamReader reader = new StreamReader(sr)) { using (JsonReader jsReader = new JsonTextReader(reader)) { JsonSerializer serializer = new JsonSerializer(); dataObject = serializer.Deserialize<T>(jsReader); } } } the exception is thrown by Newtonsoft.Json.Linq.JTokenWriter.WriteValue(Int64 value) The serialization works well, here is the code I'm using using (StreamWriter reader =

Android bitmap imageview memory leak

南楼画角 提交于 2019-12-01 17:14:49
问题 I put 4x4 imageView to an activity(BoardActivity), and user can change the images by clicking them. With HTC Desire (Android 2.2.2), I got OOM(Out Of Memory) in about 30 minutes of intensive useage -EDIT: 16th start of this activity- , but no other devices produces this (android 2.1, and android 2.2.1). Is it possible, that I made some mistake with the bitmap/imageview useage and that causes this error? First, I load all resource ID into a map: private Map<String, Integer> imageResourceMap;

Large, 1 bit-per-pixel bitmap causes OutOfMemoryException

浪尽此生 提交于 2019-12-01 17:01:25
问题 What I'd like to do is to load an image from disk and create a BitmapSource from it. The image is 14043px x 9933px and is b/w (1bpp). But I run into a OutOfMemoryException because the following code consumes about 800 MB RAM. The following code generates an ImageSource in the dimensions of my specific file. I did this to see if I could make it work without using the actual file on my disk. public System.Windows.Media.ImageSource getImageSource(){ int width = 14043; int height = 9933; List

Large, 1 bit-per-pixel bitmap causes OutOfMemoryException

北慕城南 提交于 2019-12-01 16:48:53
What I'd like to do is to load an image from disk and create a BitmapSource from it. The image is 14043px x 9933px and is b/w (1bpp). But I run into a OutOfMemoryException because the following code consumes about 800 MB RAM. The following code generates an ImageSource in the dimensions of my specific file. I did this to see if I could make it work without using the actual file on my disk. public System.Windows.Media.ImageSource getImageSource(){ int width = 14043; int height = 9933; List<System.Windows.Media.Color> colors = new List<System.Windows.Media.Color>(); colors.Add(System.Windows

How to avoid OutOfMemory ex while rotating the image?

£可爱£侵袭症+ 提交于 2019-12-01 15:31:20
问题 public static boolean rotateBitmapByExifAndSave(File targetFile){ if (targetFile==null || !targetFile.exists() || !targetFile.canRead() || !targetFile.canWrite()) return false; boolean isSucceed = false; // detect if photo is need to be rotated try { final Matrix matrix = new Matrix(); ExifInterface exifReader = new ExifInterface(targetFile.getAbsolutePath()); int orientation = exifReader.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1); boolean isRotationNeeded = true; switch (orientation)

Android - Many OutOfMemoryError exceptions only on single Activity with MapView

偶尔善良 提交于 2019-12-01 15:10:50
I'm getting quite a few OutOfMemoryError reports from my users and every single report is from the same Activity, which contains a MapView. I'm thinking that it's an isolated exception with just this one place in my app, and I can't figure out what the problem is. Can anybody give me some pointers as to why this is happening? I've removed some unneeded code for this question, so if somebody thinks the issue could potentially be in that, I'll post it. Stack Traces Stack Trace #1 java.lang.OutOfMemoryError: bitmap size exceeds VM budget at android.graphics.Bitmap.nativeCreate(Native Method) at

OutOfMemoryError with image selection in Android. How to resize image before decoding it to bitmap?

泄露秘密 提交于 2019-12-01 14:38:07
I'm building an imagepicker in my Android app, for which I used the example code on this page . This basically gives me a button which opens the possibility to get a file from the SD card, or one by taking a picture. Once I selected an image, it displays the image using a simple ImageView. In general, this works perfectly well; I can select an image, then click the select image button again and select another image. So far so good.. with small files that is. The problem starts, when I use "larger files"; pictures I simply took with the built-in phone camera. I can select one, and that works