out-of-memory

Comparison of Image Library for Android (Picasso, Fresco, etc.)

99封情书 提交于 2019-12-08 19:43:35
Does anyone make a comparison about the Image-library for android ? Handling images in Android sometimes is a headache since it's always about the memory problem. There are some popular libs also (such as Picasso , Fresco ), having been playing some of those, anyone did some comparison before ? Jackie Refer to this: https://twitter.com/jessewilson/status/581235604740042752 Local image caching solution for Android: Square Picasso vs Universal Image Loader https://www.bignerdranch.com/blog/solving-the-android-image-loading-problem-volley-vs-picasso/ Android Image loading - Volley vs Picasso

Increasing permgen space for Cobertura ant task running from Gradle

对着背影说爱祢 提交于 2019-12-08 19:03:29
I'm getting the following trying to run Cobertura as part of my Gradle build. :cobertura Instrumenting classes for Cobertura Exception in thread "Test worker" java.lang.OutOfMemoryError: PermGen space java.lang.OutOfMemoryError: PermGen space I've tried bumping up DEFAULT_JVM_OPTS / -XX:MaxPermSize in my gradle wrapper script, to no effect. Is there a more direct (and effective) way to do this? The only thing that worked for me was changing the .bashrc on my Linux box to have export _JAVA_OPTIONS='-XX:MaxPermSize=512m' Proof that this got detected by gradle when I built was shown with this

Dealing with large bitmap onPictureTaken android

房东的猫 提交于 2019-12-08 18:02:26
My app is an OCR app base on Tesseract . It will do OCR task from camera picture. Users can take many pictures and put them into an OCR queue. To get more accuracy, I want to keep high quality image (I choose min size is 1024 x 768 (maybe larger in future), JPEG, 100% quality). When users take many pictures, there are three things to do: Save the image data byte[] to file and correct EXIF. Correct the image orientation base on device's orientation. I know there are some answers that said the image which comes out of the camera is not oriented automatically, have to correct it from file, like

java.lang.OutOfMemoryError: GC overhead limit exceeded when loading an xlsx file

匆匆过客 提交于 2019-12-08 15:26:35
I understand what the error means, that my program is consuming too much memory and for a long period of the time it is not recovering. My program is just reading 6,2Mb xlsx file when the memory issue occures. When I try to monitor the program, it very quickly reaches 1,2Gb in memory consumption and then it crashes. How can it reach 1,2Gb when reading 6,2Mb file? Is there a way to open the file in chunks? So that it doesn't have to be loaded to the memory? Or any other solution? Exactly this part causes it. But since it is a library, shouldn't it be handled somehow smartly? It is only 200 000

Hibernate: OutOfMemoryError persisting Blob when printing log message

蓝咒 提交于 2019-12-08 11:21:19
问题 I have a Hibernate Entity: @Entity class Foo { //... @Lob public byte[] getBytes() { return bytes; } //.... } My VM is configured with a maximum heap size of 512 MB. When I try to persist an object which has a 75 MB large object, I get an OutOfMemoryError. The names of the methods in the stack trace (StringBuilder, ByteArrayBlobType.toLoggableString, pretty.Printer.toString) suggest that hibernate is trying to write a very large log message that contains my object. Am I correct about why

Heap space error with Apache POI XSSF

馋奶兔 提交于 2019-12-08 10:44:40
问题 I am trying to parse a large excel file(.xlsx) using Apache POI XSSF library. After 100,000 rows it throws heap space error. I tried increasing the memory but it does not help. Is there a workaround for this problem? Or can someone suggest me a another library to parse large excel files. Thanks! 回答1: You can use http://poi.apache.org/spreadsheet/how-to.html#xssf_sax_api Have a look at this thread for details. Efficient way to search records from an excel file using Apache-POI 回答2: Try the

how to reduce the bitmap memory usage byte count but keep its dimensions

走远了吗. 提交于 2019-12-08 10:20:05
问题 Searched and only find solutions for scale the bitmap to reduce its dimensions and size. But I am looking for a way to reduce the bitmap's memory byte count and don't change its dimension. The images are from remote sources, they are not in our control. , after save the images to device locally, they will be shown as thumbnail later. Noticed it frequently throws OOM exception. The first step was to scale down the bitmap to a smaller dimensions when loading from the file (such as 500x500, or

OutOfMemory exception thrown while writing large text file

最后都变了- 提交于 2019-12-08 10:02:36
问题 I want to generate a string and then write it in to a .txt file. The problem is I get OutOfMemory exceptions when I attempt to do so. The file is large (about 10000 lines). I use String.Format and loops to create the string. How can I write this to a .txt file? string Text= @"..."; const string channelScalar = @"..."; Text= string.Format(...); foreach (Channel channel in ...) { switch (channel.Type) { case "...": Text= string.Format(Text, ChannelFrames(channel, string.Format(...); break; } }

(BioPython) How do I stop MemoryError: Out of Memory exception?

我是研究僧i 提交于 2019-12-08 09:41:42
问题 I have a program where I take a pair of very large multiple sequence files (>77,000 sequences each averaging about 1000 bp long) and calculate the alignment score between each paired individual element and write that number into an output file (which I will load into an excel file later). My code works for small multiple sequence files but my large master file will throw the following traceback after analyzing the 16th pair. Traceback (most recent call last): File "C:\Users\Harry\Documents

java.lang.OutOfMemoryError: bitmap size exceeds VM budget on line Drawable.createFromStream(((java.io.InputStream) new URL(url), “”) in android

社会主义新天地 提交于 2019-12-08 09:23:36
问题 First I'm creating an Arraylist of images and image information by parsing json response `JSONArray jsonArray = jsonObj.getJSONArray("result"); for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObjInner = jsonArray.getJSONObject(i); ImageInfo imageInfo = new ImageInfo(); imageInfo.setImageUrl("http://www.dvimaytech.com/markphoto/" + jsonObjInner.getString("image")); new GetDrawableFromUrl(imageInfo).execute(); imageInfo.setEmail(jsonObjInner.getString("emailid")); imageInfo