out-of-memory

Android HttpEntityUtils OutOfMemoryException

青春壹個敷衍的年華 提交于 2019-12-31 03:45:12
问题 I'm working on a project which connect to a web server and receive binary data. My problem is when I'm downloading data from web server. If i send request to login or to activate some setting, there is no problem. But when I send request to download a binary data it's throwing me an OutOfMemoryException . Here is the code which I'm using : public byte[] activateColl(int index) { createCancelProgressDialog("","Communcating with you...","Cancel"); byte[] buffer = new byte[1024]; try {

In XNA, what is the best method to dispose of textures I no longer need?

微笑、不失礼 提交于 2019-12-31 03:23:25
问题 I started a project with the concept of reusing the same texture2d objects continuously throughout the game, reloading new textures periodically. Over time this proved a bad idea as I was running in to: System.OutOfMemoryException bool loadImages(string image) { System.Diagnostics.Debug.WriteLine("beginning loading textures " + image); try { //image_a = null; //image_o = null; //image_o.Dispose(); //image_a.Dispose(); image_o = Content.Load<Texture2D>("images/"+image); image_a = Content.Load

java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available

你说的曾经没有我的故事 提交于 2019-12-31 03:05:19
问题 I am trying to compare values of lat long provided by user with values of lat long from database. If they are in 15 km radius of each other textview should be changed. But i am facing following error, My database contains value source lat = 19.218418 source long = 73.08661 Des lat = 18.9766017 des long = 72.8326658. and values provided by user are soure lat = 19.2213935 source long= 73.081532 des lat = 18.9632933 des long = 72.8324848. E/AndroidRuntime: FATAL EXCEPTION: main Process: com

java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available

▼魔方 西西 提交于 2019-12-31 03:05:03
问题 I am trying to compare values of lat long provided by user with values of lat long from database. If they are in 15 km radius of each other textview should be changed. But i am facing following error, My database contains value source lat = 19.218418 source long = 73.08661 Des lat = 18.9766017 des long = 72.8326658. and values provided by user are soure lat = 19.2213935 source long= 73.081532 des lat = 18.9632933 des long = 72.8324848. E/AndroidRuntime: FATAL EXCEPTION: main Process: com

OutOfMemoryException On Mobile Device

余生颓废 提交于 2019-12-31 01:59:03
问题 I'm developing an application that uses a mobile device to take a photo and send it using a webservice. But after I've taken 4 photos I am getting an OutOfMemoryException in the code below. I tried calling GC.Collect() but it didn't help either. Maybe someone here could be give me an advice how to handle this problem. public static Bitmap TakePicture() { var dialog = new CameraCaptureDialog { Resolution = new Size(1600, 1200), StillQuality = CameraCaptureStillQuality.Default }; dialog

byte[] and efficiently passing by reference

拈花ヽ惹草 提交于 2019-12-30 18:55:51
问题 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

android loadIcon generates outOfMemoryError

为君一笑 提交于 2019-12-30 13:08:07
问题 I just have a little ListView containing all installed apps and their icons but if there are too much Apps installed i run into outOfMemoryErrors while doing Drawable app_icon = applicationInfoList.get(i).loadIcon(context.getPackageManager())); that for every ListEntry (this line is written in my ListAdapter ) no problem so far, i understand why i ran into this error (too much icons loaded, too few vm heap) but i had a look at the source code of androids ManageApplications Activity in the

Memory error only in Spyder IDE

十年热恋 提交于 2019-12-30 11:05:21
问题 doing the following causes a MemoryError in my Spyder Python IDE: >>> from numpy import * >>> a_flt = ones((7000,7000), dtype=float64)+4 >>> b_flt = ones((7000,7000), dtype=float64)+1 Traceback (most recent call last): File "<stdin>", line 1, in <module> MemoryError >>> THis is weird, since the memory usage in the statusbar of Spyder shows that only approx. 25% of my memory is used. Furthermore, when generating even a higher number of these large 7000*7000 arrays in the standard Python IDE

Memory error only in Spyder IDE

强颜欢笑 提交于 2019-12-30 11:05:10
问题 doing the following causes a MemoryError in my Spyder Python IDE: >>> from numpy import * >>> a_flt = ones((7000,7000), dtype=float64)+4 >>> b_flt = ones((7000,7000), dtype=float64)+1 Traceback (most recent call last): File "<stdin>", line 1, in <module> MemoryError >>> THis is weird, since the memory usage in the statusbar of Spyder shows that only approx. 25% of my memory is used. Furthermore, when generating even a higher number of these large 7000*7000 arrays in the standard Python IDE

excessive memory use by java

雨燕双飞 提交于 2019-12-30 10:27:07
问题 In a project of mine I constantly compress little blocks of data. Now I find out that the jvm then grows to 6GB of ram (resident (RES) RAM, not shared or virtual or so) and then die because of out of memory. It is as if the garbage collector never runs or so. I've pulled out the relevant code and pasted it below. When I run it (java6, 32 bit linux) it grows to 1GB of ram. Anyone got an idea how to reduce the memory usage? import java.util.Random; import java.util.zip.Deflater; import java