out-of-memory

Out of Memory error after using app for more than 5-10 mins

社会主义新天地 提交于 2019-12-12 06:37:03
问题 I've been getting following out of memory issue due to layout inflater when i use my app for little longer than 7-8 minutes. I have checked through many questions in stackoverflow but have not been able to find a good solution. I tried 'android:largeHeap="true"' too, but it seems to create more problem than solve this. The Fragment that contains the listview where i have loaded large chunk of item details which is usually causing outOfMemory error is as follows: @Override public View

Create ziparchive native c# out of memory memorystream

三世轮回 提交于 2019-12-12 06:23:37
问题 I am using the build in feature to make a zip system.io.compression.ziparchive https://msdn.microsoft.com/en-us/library/system.io.compression.ziparchive.getentry%28v=vs.110%29.aspx and got: An exception of type 'System.OutOfMemoryException' occurred in mscorlib.dll but was not handled in user code I have read this: ZipArchive creates invalid ZIP file and this is some of my code in an *.ashx file (webforms): Dictionary<string, string> csvs = new Dictionary<string, string>(); using (var

How to increase java heap memory in netbeans?

情到浓时终转凉″ 提交于 2019-12-12 04:39:41
问题 I'm trying to execute a java script on a large text file, but it gives me this error java.lang.OutOfMemoryError: Java heap space I tried to do that on my netbeans project: Project Properties -> Run -> VM Options -> -Xmx2048m -Xms1024m I tried also : System -> Programs -> Java -> Java -> View -> Execution Parameters -> -Xincgc -Xmx2048M But i didn't solve the problem .. any suggestions please ? 回答1: String storage can be quite expensive. Using random String of avarage ~ 80 chars long, 3 000

OOM exception in Hadoop Reduce child

吃可爱长大的小学妹 提交于 2019-12-12 04:22:25
问题 I am getting OOM exception (Java heap space) for reduce child. In the reducer, I am appending all the values to a StringBuilder which would be the output of the reducer process. The number of values aren't that many. I tried to increase the value of mapred.reduce.child.java.opts to 512M and 1024M but that doesn't help. Reducer code is given below. StringBuilder adjVertexStr = new StringBuilder(); long itcount= 0; while(values.hasNext()) { adjVertexStr.append(values.next().toString()).append("

High memory usage of a windows forms method

心不动则不痛 提交于 2019-12-12 04:08:45
问题 I have a c# windows forms application which uses too much memory. The peace of code, that is the problem is this private void mainTimer_Tick(object sender, EventArgs e) { try { if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday) { if (File.Exists(Globals.pathNotifFile + "1")) { File.Delete(Globals.pathNotifFile + "1"); File.Move(Globals.pathNotifFile, Globals.pathNotifFile + "1"); } File.Move(Globals.pathNotifFile, Globals.pathNotifFile + "1"); } if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday)

Buffer underrun and ResourceExhausted errors with tensorflow

北城余情 提交于 2019-12-12 03:54:01
问题 I'm in high school and I'm trying to do a project involving neural networks. I am using Ubuntu and trying to do reinforcement learning with tensorflow, but I consistently get lots of underrun warnings when I train a neural network. They take the form of ALSA lib pcm.c:7963:(snd_pcm_recover) underrun occurred . This message is printed to the screen more and more frequently as training progresses. Eventually, I get a ResourceExhaustedError and the program terminates. Here is the full error

Out of Memory on Bitmap Android

断了今生、忘了曾经 提交于 2019-12-12 03:25:57
问题 I want to make implement this in android For this, I have to load images from asset folder and I am making two HorizontalScrollView in xml file and load dynamically ImageView in it. For loading ImageView I am using this code LinearLayout myGallery = (LinearLayout) findViewById(R.id.mygallery); try { String galleryDirectoryName = "gallery"; String[] listImages = getAssets().list(galleryDirectoryName); for (String imageName : listImages) { InputStream is = getAssets().open(galleryDirectoryName

Android - Reliable way to get percentage of heap size occupied

与世无争的帅哥 提交于 2019-12-12 03:19:44
问题 In one of my activities I load a large number of bitmaps dynamically and show them in a GridView. There is risk of exceeding the heap size and crashing the app. I need a reliable way to know when heap size is growing too large, to stop loading the bitmap and start recycling the ones now being viewed at the moment. I tried using this function: public int memoryPercent(){ Double alloc=new Double(Runtime.getRuntime().totalMemory()/1048576); Double avail=new Double(Runtime.getRuntime().maxMemory(

OutOfMemoryException returning large set of data from Web API

故事扮演 提交于 2019-12-12 03:16:06
问题 We created a Web API which queries the Oracle Database and returns the result in JSON format. If the data returned is very large it throws an Out of Exception issue. So it was suggested in the other question the issue is because loading that entire result set into memory before serializing it out to the HttpResponseMessage . So created the below classes [JsonConverter(typeof(OracleDataTableJsonResponseConverter))] public sealed class OracleDataTableJsonResponse { public string

Avoid 'Memory Error" when dealing with large arrays

六眼飞鱼酱① 提交于 2019-12-12 03:06:46
问题 I'm facing sometimes Memory Error , sometimes it goes through fine and sometimes it pops up.. Specifically when trying to subtract large array by one. I tried many ways to do this subtraction, is there any way to avoid this? and is my other code parts will also sometime arise this error? Here is my code: def home(request): if request.method=="POST": img = UploadForm(request.POST, request.FILES) no_clus = int(request.POST.get('num_clusters', 10)) if img.is_valid(): paramFile =io.TextIOWrapper