out-of-memory

Android Camera Intent - Out Of Memory Error and Rotation Error

五迷三道 提交于 2019-12-22 09:49:27
问题 I'm creating an android app that utilizes the camera to take pictures and then sends them to a server based on user input. I'm currently having some problems with the camera intent. My main problems are : Getting a picture that seems to be rotated when compared to the position it was taken. When I try to fix this Rotation I get an OutOfMemoryError So mainly I need to make sure that the orientation of the picture doesn't change and that I don't get an OutOfMemoryError. Here is the function

OutOfMemory when removing rows > 500000 EntityFramework 6

梦想的初衷 提交于 2019-12-22 09:33:21
问题 What I've got: I have a large list of addresses(ip addr) > millions What I'm trying to do: Remove 500k addresses efficiently through EntityFramework My Problem: Right now, I'm splitting into lists of 10000 addresses and using RemoveRange(ListOfaddresses) if (addresses.Count() > 10000) { var addressChunkList = extension.BreakIntoChunks<Address>(addresses.ToList(), 10000); foreach (var chunk in addressChunkList) { db.Address.RemoveRange(chunk); } } but I'm getting an OutOfMemoryException which

SplashScreen using PNG image leads to Android.Views.InflateException followed by OutOfMemory

会有一股神秘感。 提交于 2019-12-22 08:56:13
问题 I watched Google IO 2011 conference, read almost every post about OutOfMemory Exception and InflateException, no luck, I cannot find any answer that solve my problem. How can I properly clear memory from a layout containing a background image? I feel like if the InflateException followed by OutOfMemory are related because that background image is not cleared properly. So I'm getting : Android.Views.InflateException: Binary XML file line #24: Error inflating class followed by : Java.Lang

Custom ListView with many images gets Out Of Memory Exception

孤者浪人 提交于 2019-12-22 08:55:01
问题 I'm trying to create an Android ListView that will look like Instagram pictures feed or Facebook's. I'm getting Out Of Memory Exception on my Galaxy Nexus after loading some images (only a few). I scaled them, but still, the number of images isn't fixed and theoretically can be unlimited. On Facebook and Instagram they load lots of images and other data and it works well. What do you think? Can i achieve those performances with native Android coding? If i'll create a HTML5 feed (like Facebook

Custom ListView with many images gets Out Of Memory Exception

与世无争的帅哥 提交于 2019-12-22 08:54:15
问题 I'm trying to create an Android ListView that will look like Instagram pictures feed or Facebook's. I'm getting Out Of Memory Exception on my Galaxy Nexus after loading some images (only a few). I scaled them, but still, the number of images isn't fixed and theoretically can be unlimited. On Facebook and Instagram they load lots of images and other data and it works well. What do you think? Can i achieve those performances with native Android coding? If i'll create a HTML5 feed (like Facebook

How to analyze excessive memory consumption (PageFileUsage) in a Delphi Application?

旧城冷巷雨未停 提交于 2019-12-22 08:53:08
问题 This is a follow-up to this question: What could explain the difference in memory usage reported by FastMM or GetProcessMemoryInfo? My Delphi XE application is using a very large amount of memory which sometimes lead to an out of memory exception. I'm trying to understand why and what is causing this memory usage and while FastMM is reporting low memory usage, when requesting for TProcessMemoryCounters.PageFileUsage I can clearly see that a lot of memory is used by the application. I would

Transforming large Xml files

 ̄綄美尐妖づ 提交于 2019-12-22 08:48:33
问题 I was using this extension method to transform very large xml files with an xslt. Unfortunately, I get an OutOfMemoryException on the source.ToString() line. I realize there must be a better way, I'm just not sure what that would be? public static XElement Transform(this XElement source, string xslPath, XsltArgumentList arguments) { var doc = new XmlDocument(); doc.LoadXml(source.ToString()); var xsl = new XslCompiledTransform(); xsl.Load(xslPath); using (var swDocument = new StringWriter

Garbage collection runs too late - causes OutOfMemory exceptions

穿精又带淫゛_ 提交于 2019-12-22 08:46:16
问题 Was wondering if anyone could shed some light on this. I have an application which has a large memory footprint (& memory churn). There aren't any memory leaks and GCs tend to do a good job of freeing up resources. Occasionally, however, a GC does not happen 'on time', causing an out of memory exception. I was wondering if anyone could shed any light on this? I've used the REDGate profiler, which is very good - the application has a typical 'sawtooth' pattern - the OOMs happen at the top of

Python: is the garbage collector run before a MemoryError is raised?

有些话、适合烂在心里 提交于 2019-12-22 08:17:33
问题 In a Python code that iterates over a sequence of 30 problems involving memory- and CPU-intense numerical computations, I observe that the memory consumption of the Python process grows by ~800MB with the beginning of each of the 30 iterations and finally raises an MemoryError in the 8th iteration (where the system's memory is in fact exhausted). However, if I import gc and let gc.collect() run after each iteration, then the memory consumption remains constant at ~2.5GB and the Python code

Python - Opening and changing large text files

∥☆過路亽.° 提交于 2019-12-22 06:57:31
问题 I have a ~600MB Roblox type .mesh file, which reads like a text file in any text editor. I have the following code below: mesh = open("file.mesh", "r").read() mesh = mesh.replace("[", "{").replace("]", "}").replace("}{", "},{") mesh = "{"+mesh+"}" f = open("p2t.txt", "w") f.write(mesh) It returns: Traceback (most recent call last): File "C:\TheDirectoryToMyFile\p2t2.py", line 2, in <module> mesh = mesh.replace("[", "{").replace("]", "}").replace("}{", "},{") MemoryError Here is a sample of my