FAQ Database Discussion Community


HackerEarth Probelm: Reverse Primes

java,optimization,out-of-memory,primes
Generate as many distinct primes P such that reverse (P) is also prime and is not equal to P. Output: Print per line one integer( ≤ 10^15 ). Don't print more than 10^6 integers in all. Scoring: Let N = correct outputs. M = incorrect outputs. Your score will...

Out of Memory Error on High Resolution mobile phones

android,out-of-memory,heap
My application is running fine on tablets its taking memory very less about 20-30 MB as can be seen DBMS -> Debug & Heap tracker. But when running same application on Devices like Samsung Galaxy Note-4 (2560 x 1440) & LG G3 (2392 x 1440) its taking heap space of...

Using Picasso to solve OutOfMemoryError

android,memory-management,out-of-memory,picasso
I have seen many answers on this issue which has not worked so far for me, the best option I got was using a Picasso to solve this, I have imported the .jar but am getting an error on the code I was told to use, I get an error...

Do Finalizer thread can cause Out of Memory?

java,out-of-memory,finalizer
Finalizer thread are responsible clearing objects in the finalization queue. Ironically does the same finalizer thread can responsible for OOM?

How to fix my system out of memory exception?

c#,out-of-memory
I am trying to create a program that will give me every single digit between 1 and 55 but 6 times in a row. That is; 1-17-25-45-49-51 55-54-53-52-51-50 Note, two numbers can never repeat in a row. I've tested this program on a smaller scale and so far it does...

How to split an array into evenly sized chucks and perform the same calculation on each chuck

python,arrays,out-of-memory
I have an array called start_similarity_results with size 47000*90000, with each element is a float number between 0 and 1. For each row, I need to find out the col indices at which position the float number is greater than a threshold, and from all these qualified col indices, I...

memory error when reading from multiple files

python,memory,iterator,out-of-memory
I am reading in 15 files that are located in a folder on my desktop. I can read in the first few files no problem but when i get a little more into it I end up getting a memory error that looks to be caused by Pythons built in...

OOM Error when Loading a List of Bitmaps Android

android,bitmap,out-of-memory,scaling
I'm trying to create a solitaire card game in android, so I'm attempting to load images for a full deck of cards (53 images total, 52 for the fronts and one for the back of the cards). The images load in just fine, but then when I try to scale...

FileBackedOutputStream on Appengine

java,google-app-engine,out-of-memory,guava,securityexception
My application on Appengine create a csv file with more 65535 rows But, I have an error of type OutOfMemoryError when writing : java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2271) at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118) at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153) White this code : public static byte[] joinLines(Collection<String> lines) { final...

Home much memory does the JVM need to allocate a character array?

java,arrays,jvm,out-of-memory
Consider to following 1 line program: public static void main(String[] args) throws Exception { // 134217728 * 2 bytes / 1024 / 1024 = 256M char[] array = new char[134217728]; } How much memory does the JVM need to allocate this 256M character array? Turns out the answer is -Xmx384m....

Increase the java heap space of a certain app

java,performance,hadoop,out-of-memory,heap
I have an application that I want to run it and gives it more heap memory. I run my application using this command in terminal: home/bin/hadoop jar $pathofjarfile parameter1 parameter2 but I don't know how to allocate more heap memory when running this application? if anyone could please advise.

andriod out of memory exception

android,out-of-memory,assets,bitmapfactory,android-bitmap
please help in solving me this out of memory exception as i am unable to solve it, any help would be greatly appreciated, 06-04 12:11:44.119: E/AndroidRuntime(9090): FATAL EXCEPTION: main 06-04 12:11:44.119: E/AndroidRuntime(9090): Process: com.zar.bdr, PID: 9090 06-04 12:11:44.119: E/AndroidRuntime(9090): java.lang.OutOfMemoryError 06-04 12:11:44.119: E/AndroidRuntime(9090): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 06-04 12:11:44.119: E/AndroidRuntime(9090): at...

Windows Phone 8.0 ListBox Out Of Memory Extension

windows-phone-8,listbox,out-of-memory
Sorry for my english. I'am execute next code: in XAML ... <Button Content="Add More" Width="160" Click="Button_Click_2"/> <ListBox x:Name="list"/> ... in CS ... for (int i = 0; i < 20; i++) { list.Items.Add(new Image { Source = new BitmapImage { UriSource = new Uri("http://pravda-team.ru/eng/image/photo/4/7/4/73474.jpeg") } }); } ... This code...

Android load image into imageview efficiently

android,bitmap,imageview,out-of-memory
I have next problem: To avoid OutOfMemoryError i'm loading my big images into ImageViews using Picasso in such way: public static RequestCreator picasso(final Context context, final int resourceId) { return Picasso.with(context) .load(resourceId) .fit() .centerCrop() .noFade(); } And in activity or fragment, i'm loading image into ImageView final ImageView backgroundImage =...

Quartz Scheduler keeps creating new objects leading to OutOfMemoryError

java,memory-leaks,out-of-memory,quartz-scheduler
I've just implemented Quartz following the quick start guide: import static org.quartz.JobBuilder.newJob; import static org.quartz.SimpleScheduleBuilder.simpleSchedule; import static org.quartz.TriggerBuilder.newTrigger; import org.quartz.JobDetail; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.Trigger; import org.quartz.impl.StdSchedulerFactory; public class Quartz { public static void startScheduler() throws InterruptedException{ try { Scheduler scheduler =...

Dealing with OutOfMemory Exception

c#,for-loop,out-of-memory
Is there a proper way to deal with Out Of Memory Exceptions while looping through a large list and adding objects from that list? What is the proper way to go about doing this? I have a large Linq query that returns around 600K items. I then go through each...

JPEG File seems to big: OutOfMemoryError

android,out-of-memory
java.lang.OutOfMemoryError: Failed to allocate a 313194252 byte allocation with 11901284 free bytes and 174MB until OOM I got this at this line: Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.handskizze); My Picture has a size of 2480*3508 at 300dpi. Is it maybe to big? How can I make it smaller?...

Android-Out Of Memory Exception For ArrayList

android,performance,android-activity,arraylist,out-of-memory
My code was running fine before I put few if else conditions. I think there is optimization issues in for loop but not getting it btSetQuantity.setOnClickListener(new OnClickListener() { public void onClick(View v) { if (etbillQuantity.getText().toString().equals("")) { Toast.makeText(getApplicationContext(), "Quantity Not Entered", Toast.LENGTH_SHORT) .show(); InputMethodManager imm = (InputMethodManager) getSystemService(context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow( etbillQuantity.getWindowToken(), 0);...

Java OutOfMemoryError with ArrayList>

java,arraylist,out-of-memory
I want to create a very large graph (with ~10 million edges) in Java. I plan to List<List<Integer>> to describe the edges, with the inside List<Integer> describing the two vertices of each edge (and the vertices are Integer type). The following code throws the OutOfMemoryError after about 1 million edges...

Unable to increase PHP Memory Limit

php,apache,memory,memory-management,out-of-memory
I am running into an issue with a project I am working with on my localhost, where I am unable to increase the PHP memory_limit setting. I've tried increasing it directly in the php.ini config: memory_limit = 1024M I've tried increasing it in the projects .htaccess file: php_value memory_limit 1024M...

Out of memory error in symfony

php,symfony2,out-of-memory
I'm currently working on Symfony project (const VERSION ='2.5.10') and I am using xampp. PHP version is 5.5.19. My problem is everytime I run my dev environment I get an error : OutOfMemoryException: Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 3358976 bytes) in C:\xampp\htdocs\Editracker\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Profiler\FileProfilerStorage.php line 153...

Faye Ruby Server Side Publish on Heroku - EventMachine buffer overflow detected

heroku,websocket,out-of-memory,publish-subscribe,faye
I have a faye ruby client on a heroku worker (using sidekiq - 5 threads) that publishes to the faye server running on linode. The worker crashes after a few minutes with a buffer overflow detected message. *Code EM.epoll EM.run { publication = @client.publish('/glive-bullion','body'=>body) publication.callback do EM.stop_event_loop end publication.errback do...

Max Memory Size for a Thread on a 32 bit process

windows,memory-management,out-of-memory,32bit-64bit,32-bit
I know there is a 4gb limit for each process when running in 32 bits .... but if a process has multiple threads... does all the memory usage of each thread add up to the total of 4gb? Or does each thread get 4gb of individual memory space to use?

Out of memory exception while updating zip in c#.net

c#,.net,out-of-memory
I am getting OutofMemoryException While trying to add files in Zip file in c#.net. I am using 32bit architecture for bulding and running application string[] filePaths = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\capture\\capture"); System.IO.Compression.ZipArchive zip = ZipFile.Open(filePaths1[c], ZipArchiveMode.Update); foreach (String filePath in filePaths) { string nm = Path.GetFileName(filePath); zip.CreateEntryFromFile(filePath, "capture/" + nm, CompressionLevel.Optimal);...

Efficiently scaling column of a sparse matrix in matlab

matlab,matrix,out-of-memory,normalization,sparse
I have a sample X which is a sparse matrix (~5%) and now try to scale each column with a factor (basically tf-idf normalization). Which I thought is a task easy to accomplish somehow now occurs to be not really supported. Here is what I used: fac = log(size(X,1)./max(1,sum(X ~=...

Why my process has been killed?

linux-kernel,out-of-memory,linuxmint
I have a program, written on C/C++ by myself, that is killed by Linux. The message "killed" appears. Willing to dig out the problem I observed inside the file /var/log/kern.log: Out of memory: Kill process 3915 (my_proj) score 236 or sacrifice child Killed process 3915 (my_proj) total-vm:5503376kB, anon-rss:3857420kB, file-rss:40kB I...

When Android gives OutOfMemory Exception?

android,memory,out-of-memory
I was reading about OutOfMemory error in Android, which comes when Android runs out of memory. Do we know that if my app consumes some x MB of memory then it will give OutOfMemory error? Does Android allocates a specific amount of memory to each app depending on the device...

reading file java.lang.OutOfMemoryError

java,arrays,string,out-of-memory
Trying to find a word in a large file. File is read line by line. When reading the way redLine exception is thrown. Are there any way around this? You can read it on the floor as a string? for(String line; (line = fileOut.readLine()) != null; ){ if(line.contains(commandString)) System.out.println(count +...

Don't understand why OutOfMemory on setImageDrawable

android,imageview,out-of-memory,android-animation
Having a problem with a custom button control which I have made. The button is defined in layout like this: <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:layout_width="180dp" android:layout_height="180dp" android:layout_centerInParent="true" android:layout_margin="20dp" android:background="#fff" android:contentDescription="@string/my_button_info"...

OutOfMemory exception thrown while writing large text file

c#,text,out-of-memory,file-writing
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...

Adding large files to IO.Compression.ZipArchiveEntry throws OutOfMemoryException Exception

c#,out-of-memory,zipfile
I am trying to add a large video file(~500MB) to an ArchiveEntry by using this code: using (var zipFile = ZipFile.Open(outputZipFile, ZipArchiveMode.Update)) { var zipEntry = zipFile.CreateEntry("largeVideoFile.avi"); using (var writer = new BinaryWriter(zipEntry.Open())) { using (FileStream fs = File.Open(@"largeVideoFile.avi", FileMode.Open)) { var buffer = new byte[16 * 1024]; using (var...

Caused by: java.lang.OutOfMemoryError

java,android,out-of-memory
I am having a layout file and 5 buttons -- 1 for next and 2 for previous etc. Application runs fine, when I click first button, it loads the image correctly, then as I click another button, it gives the error -Caused by java lang Out Of Memory Error public...

Hazelcast Out of memory issue

java,performance,configuration,out-of-memory,hazelcast
Frequent out of memory issue in Hazelcast 3.3, What I wonder is node has enough memory and CPU, 16GB Ram, 8 Core processor, still this error is happening. Its a single node setup. com.hazelcast.core.HazelcastException: Client is shutting down!!! at com.hazelcast.client.connection.nio.ClientConnection.innerClose(ClientConnection.java:302) at com.hazelcast.client.connection.nio.ClientConnection.close(ClientConnection.java:355) at com.hazelcast.client.connection.nio.ClientConnection.close(ClientConnection.java:230) at...

java.lang.OutOfMemoryError: Java heap space for java 8

java,recursion,out-of-memory,java-8
I use Java 8 (In Eclipse) when I got this error: java.lang.OutOfMemoryError: Java heap space I've tried the -Xmx command but no use even changing the MetaspaceSize doesn't solve it. This problem occurs when I tried to swap elements of list (it size<= 395). public void permutation(double[] arr, int pos,...

Remove/adding from virtual collections memory usage

c#,ef-code-first,out-of-memory,entity-framework-6
From what I can tell when profiling the sql, it executes a sql statement to retrieve all users for the group when it calls group.Users.Remove(user). Users is a virtual collection on the group, using Entity Framework 6 code first. var usersToRemove = Context.users.Where(u=>someListOfIds.Contains(u.Id)); //might only be a few users foreach(var...

C++ Out of Memory Exception Test

c++,exception,terminal,out-of-memory,bad-alloc
I have written a program for a double-ended queue using an array in C++. One of the requirements of the assignment is to handle exceptions. One of the exceptions we are supposed to check for is out of memory exceptions. Since it is a dynamically-sized queue I have a method...

java.lang.OutOfMemoryError but with 70Kb of png image

android,out-of-memory
Ok first of all it's the first time I'm asking a question on stack so if I did something not "legal" don't hesitate to tell me... Ok so now my real problem... I'm trying to load to the memory some png files. Everything went really well my game works and...

Compress large file using SharpZipLib causing Out Of Memory Exception

c#,compression,out-of-memory,sharpziplib
I have a 453MB XML file which I'm trying to compress to a ZIP using SharpZipLib. Below is the code I'm using to create the zip, but it's causing an OutOfMemoryException. This code successfully compresses a file of 428MB. Any idea why the exception is happening, as I can't see...

( Android ) Blank Black Screen on switching to new activity

android,eclipse,out-of-memory,android-logcat
i am using eclipse and when i run my app , first activity works fine , but as soon as i click a button to start another activity , a blank black screen is all i get on emulator. Following is the logcat , appears to be a memory problem...

What are the possible reasons behind the java lang outofmemoryerror java heap space in elasticsearch

java,elasticsearch,out-of-memory
I have seen lots of java lang outofmemoryerror java heap space in elasticsearch but I could find any help page that describes the possible reasons behind these errors in elastic search. I am getting errors for example: (2015-04-09 13:56:47,527 DEBUGaction.index Emil Blonsky observer: timeout notification from cluster service. timeout setting...

C# exception OutOfMemory

c#,exception,memory,stack,out-of-memory
I would need some help how to handle this exception: StackTrace : at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) at...

How do I release images and avoid outOfMemory exc-n when navigating back and forth between activities[android]

android,out-of-memory,heap-memory,android-memory
I have a children tale app - 18 pages, each page is an activity with a background image, short story and sound for every word(textView) in a story, and some animations. I notice, when i go to next page, the memory is consumed; it is also consumed when i go...

Read large file error “outofmemoryerror”(java)

java,arrays,string,out-of-memory
sorry for my english. I want to read a large file, but when I read error occurs outOfMemoryError. I do not understand how to work with memory in the application. The following code does not work: try { StringBuilder fileData = new StringBuilder(1000); BufferedReader reader = new BufferedReader(new FileReader(file)); char[]...

Python - Opening and changing large text files

python,replace,out-of-memory,large-files
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...

Configure settings when importing a large dataset using Neo4j Batch-importer

neo4j,out-of-memory,batch-processing
I’m trying to import 20 million nodes and 250 million relationships to Neo4j using the Batch-importer . I have 8GB of RAM. Here are my current settings in batch.properties: use_memory_mapped_buffers=false neostore.nodestore.db.mapped_memory=500M neostore.relationshipstore.db.mapped_memory=2000M neostore.relationshipgroupstore.db.mapped_memory=10M neostore.propertystore.db.mapped_memory=1G neostore.propertystore.db.strings.mapped_memory=200M neostore.propertystore.db.arrays.mapped_memory=0M...

OOM when creating Bitmaps on an Android application

android,out-of-memory,android-bitmap
I have an application that gets a fixed amount of images from the camera preview and converts them into a list of Bitmaps. For that purpose I have the following code: private Camera.PreviewCallback SetPreviewCallBack() { return new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte[] data, Camera camera) { List<Bitmap> imageList =...

SQl Database back up showing error “Exception of type ”System.OutofMemoryException“ was thrown.(mscorlib)”

mysql,database,exception,out-of-memory,database-backups
I need to take a backup of a SQL database with data. I select Tasks -> Generate Scripts... -> Next -> Next and in Table view option I changed Script Data FALSE to TRUE -> Next -> Select all -> Script to New Query Window -> Finish. But it end...

out of memory error when reading csv file in chunk

python,csv,mapreduce,out-of-memory,chunks
I am processing a csv-file which is 2.5 GB big. The 2.5 GB table looks like this: columns=[ka,kb_1,kb_2,timeofEvent,timeInterval] 0:'3M' '2345' '2345' '2014-10-5',3000 1:'3M' '2958' '2152' '2015-3-22',5000 2:'GE' '2183' '2183' '2012-12-31',515 3:'3M' '2958' '2958' '2015-3-10',395 4:'GE' '2183' '2285' '2015-4-19',1925 5:'GE' '2598' '2598' '2015-3-17',1915 And I want to groupby ka and kb_1...

Android ImageView Outof memory

android,listview,out-of-memory
This is my code, It response Outofmemory error on samsung mobile! I searched very much in google but not answered. When Showing Image in list show force close. public class CustomList extends ArrayAdapter<String>{ private final Activity context; private final String[] web; private final String[] imageId; public CustomList(Activity context,String[] web,String[] img)...

64 bit system, 8gb of ram, a bit more than 800MB of CSV and reading with python gives memory error

python,csv,numpy,out-of-memory
f = open("data.csv") f.seek(0) f_reader = csv.reader(f) raw_data = np.array(list(islice(f_reader,0,10000000)),dtype = int) The above is the code I am using to read a csv file. The csv file is only about 800 MB and I am using a 64 bit system with 8GB of Ram. The file contains 100 million...

java.lang.OutOfMemoryError Android

android,performance,memory-leaks,out-of-memory,image-caching
04-25 08:19:10.111 2431-2603/com.example.francesco.guidedautorewithtabs E/art﹕ Throwing OutOfMemoryError "Failed to allocate a 4194316 byte allocation with 1983651 free bytes and 1937KB until OOM" 04-25 08:19:10.114 2431-2603/com.example.francesco.guidedautorewithtabs E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 285 Process: com.example.francesco.guidedautorewithtabs, PID: 2431 java.lang.OutOfMemoryError: Failed to allocate a 4194316 byte allocation with 1983651 free bytes and 1937KB until OOM at...

Getting many memory errors when try to run it for few days in my web crawler [on hold]

java,memory,memory-management,out-of-memory
I am developing a web crawler application. When i run the program i am getting these error messages below: i've got these errors after running the program for more that 3 hours. I tried to allocate memory by changing eclipse.ini setting to 2048 MB of ram as it was answered...

Java Invalid Maximum Heap Size for Windows Remote Desktop

java,out-of-memory,remote-desktop
I am running a Java application on a windows server (32-bit, 12GB RAM) with the -Xmx8g and I am getting an error saying Invalid Maximum Heap Size. The specified size exceeds the maximum representable size. But the same application is running on my local machine (64-bit, win-7, 6GB RAM) with...

Unable to delete the persistit_tempvol file after Executing sonar Embedded Runner from Java

java,out-of-memory,sonarqube,sonar-runner
I have a set of project's on which I need to execute Sonar. Once I execute sonar task and it publishes the result it deletes all the files in the directory .sonartemp except the file persistit_tempvol. This file is locked by Java SE runtime and I am unable to delete...

Holo Calendar crashes when using Calendar.SATURDAY as last day of week

java,android,calendar,out-of-memory,infinite-loop
I am using Holo Calendar library. It is a large amount of code, and so I cannot include it in this thread. Hopefully someone will see this who has used it, but the library is free and there is a link at the bottom of the page to a completed...

attempting to load .csv file into several different arrays but python gives me an 'out of memory' error

python,out-of-memory,jython
I am attempting to read a .csv file into 7 different arrays. The first array is for the names of the columns and takes the first 6 values of the csv file as the column names are at the begging. After those 6 names have been recorded in the array...

Archiving mysql data throwing memory limit issue

php,mysql,arrays,out-of-memory,archive
I have multiple tables. like table1, table2, table3, etc. What is required: 1. fetch specific row from table1. (for ex: id = 203) 2. fetch all values related to id 203 from table2 (ex: 1,2,3,4,5,6,7....500) 3. again fetch all values of ids from step 2 from table3,table4, etc which have...

Android grid view of images consumes all memory and crashes

java,android,out-of-memory
I am trying to debug where in the my app I am consuming all memory and causing the app to crash. It all loads up find but as I scroll down the grid view I load more images to the GridView all ok. If I scroll back up I can...

Optimize javascript/jQuery for better performance

javascript,jquery,google-chrome,out-of-memory
I make Chrome extension for removing li elements from specific UL. for example i have <ul> <li id="1"><div class="l1"><p>test1</p></div></li> <li id="2"><div class="l1"><p>test2</p></div></li> <li id="3"><div class="l1"><p>test3</p></div></li> .... and so on </ul> I have array of 3500 items(like database) which on every page reload checks this ul for matches and removes them....

Memory efficient XSLT for transforming large XML files

xml,xslt,out-of-memory,xslt-1.0,xslt-2.0
This question is related to a recent answer by michael.hor257k, which is in-turn related to an answer by Dimitre Novatchev. When used the stylesheet in the above mentioned answer(by michael.hor257k), for a large XML(around 60MB, sample XML is present below) and the transformation was carried out successfully. When tried another...

Out Of Memory Error in Android Studio

android,bitmap,out-of-memory
I'm trying to create my first android app, so I'm really new to android development. I'm trying to make a nice background image for my app. I made an image that is the exact dimensions of the device, but when I try to load it, i get the error "Failed...

'OutOfMemoryError' while adding multiple images to ImageViews inside ViewFlipper?

android,out-of-memory,viewflipper
I have a fragment contains 6 ViewFlippers, each flipper contains at least 10 ImageViews. I tried to load all the images and put them in the ImageViews but the restricted memory didn't let me to do that. Every time I run the application this exception occurs. when I reduce number...

Using ifelse( ) to assign a variable to a tbl_df/data.frame object in R causes R to run short of memory

r,data.frame,out-of-memory,dplyr
I have a dataset with 4811616 rows, consisting of variables A, B, and C. Variable C has NAs, and I want to assign zeroes to cases that are NA. I proceed as follows: df$A <- ifelse(is.na(df$A), 0, df$A) And I get an error saying that R runs out of memory....

Android animating a button using PNGs and OOM

java,android,animation,out-of-memory
So I've tried going about animating a button through the example given in this example: Android Developers and have made a huge (95 pictures) anim-list with Pngs. When trying to run the app and pressing the button, I promptly receive an error about memory not being sufficient. The file sizes...

concatenation of distinct substrings

java,string,out-of-memory,substring,concatenation
question - Arrange all the distinct substrings of a given string in lexicographical order and concatenate them. Print the Kth character of the concatenated string. It is assured that given value of K will be valid i.e. there will be a Kth character Input Format First line will contain a...

Websphere Out of Memory Issue

eclipse,websphere,out-of-memory
Tried to update server.xml, deleted dumps and temporary cache files from C:\Users\username\AppData\Local\javasharedresources And still not able to start the server. This is the following error message I get: JVMDUMP010I Java dump written to C:\WAS8\profiles\AppSrv02\bin\javacore.20150210.094417.6468.0009.txt JVMDUMP013I Processed dump event "systhrow", detail "java/lang/OutOfMemoryError"....

Efficient Multi dimenstion Mutable Scala Array

arrays,scala,out-of-memory
Is there memory efficient Scala multi dimension array such as in Java? I'm trying to solve Hackerrank problem with strict memory constraints: 256mb. My solution breaks with out of memory error while creating 2D array with (39384,39384) elements: Array.ofDim[Long](39384,39384) The same happens in scala console. java.lang.OutOfMemoryError: Java heap space at...

Getting an OOM issue on the setContentView call in a java gradle android project

java,android,intellij-idea,out-of-memory,android-gradle
I'm using Intellij-idea and I had this project working without gradle, ran just fine and was functional. Migrated it to a gradle project (by just creating a new gradle android project and copying over the code) and now I'm getting this stack trace: (sorry it's so small...) Here is my...

FileWriter out of memory [duplicate]

java,out-of-memory,filewriter
This question already has an answer here: Java difference between FileWriter and BufferedWriter 5 answers I want to format and write the contents of a large Map (1.785.530 entries) to a text file. After about 85% of the entries are processed, it gets very slow and then I get...

Out of Memory when Switching Activities

java,android,bitmap,out-of-memory
I'm making an android app with a menu activity and a game activity. Switching from the menu to the game and then back to the menu works, but as soon as you try to go back to the game activity, I get an out of memory error. The game activity...

How to limit the size of the back stack in Android?

android,android-activity,out-of-memory
We are developing an Android app that contains very heavy views (it is used to present a company's catalog). The design of the app has some flaws, mainly because we were "forced" to mimic as much as possible the existing iOS version of the app (I know, this is wrong)....

Memory issue sklearn pairwise_distances calculation

python,out-of-memory,fork,scikit-learn,cosine-similarity
I have a large data frame where its index is movie_id and column headers represent tag_id. Each row is represent movie to tag relevance 639755209030196 691838465332800 \ 46126718359 0.042 0.245 46130382440 0.403 0.3 46151724544 0.032 0.04 Then I do following: data = df.values similarity_matrix = 1 - pairwise_distances(data, data, 'cosine',...

Android Fragments on Backstack taking up too much memory

android,android-fragments,memory-leaks,out-of-memory
PROBLEM: I have an Android application that allows a user to browse to a user's profile ViewProfileFragment. Inside ViewProfileFragment a user can click on an image that will take him to StoryViewFragment where various users' photos show up. It is possible to click on a user profile photo that will...

Disadvantages of calling realloc in a loop

c,memory-management,out-of-memory,realloc
I'm trying to implement some math algorithms in C on Windows 7, and I need to repeatedly increase size of my array. Sometimes it fails because realloc can't allocate memory. But if I allocate a lot of memory at once in the beginning it works fine. Is it a problem...

WCF Streaming System.OutOfMemoryException

vb.net,wcf,streaming,out-of-memory
In my streamed WCF application I get System.OutOfMemoryExceptions in my service for large messages (querying >7GB MSSQL tables using a datareader, messages might even exceed 7GB) while small messages work just fine. I can observe the memory usage grow constantly during the execution of DataReaderToExcelXml (see below). The weird thing...

Out of memory Exeption using Picasso

android,imageview,android-viewpager,out-of-memory,picasso
I need to show images in view pager. To show image in image view I use Picasso library. Also I resize image using screen size. So in my Activity in OnCreate I got view pager: mPager=(ViewPager)findViewById(R.id.pager); mPagerAdapter = new ScreenSlidePagerAdapter(); mPager.setAdapter(mPagerAdapter); Then get device size: Display display = getWindowManager().getDefaultDisplay(); Point...

OutOfMemoryError as a result of multiple searches

java,hibernate,java-ee,db2,out-of-memory
I have a classic Java EE system, Web tier with JSF, EJB 3 for the BL, and Hibernate 3 doing the data access to a DB2 database. I am struggling with the following scenario: A user will initiate a process which involves retrieving a large data set from the database....

Why is my Fortran code wrapped with f2py using so much memory?

python,memory-management,fortran,out-of-memory,f2py
I am trying to calculate all the distances between approximately a hundred thousand points. I have the following code written in Fortran and compiled using f2py: C 1 2 3 4 5 6 7 C123456789012345678901234567890123456789012345678901234567890123456789012 subroutine distances(coor,dist,n) double precision coor(n,3),dist(n,n) integer n double precision x1,y1,z1,x2,y2,z2,diff2 cf2py intent(in) :: coor,dist cf2py...

Getting the Out of memory error when displaying full screen image in android

android,imageview,out-of-memory,android-camera
I have implemented a gridview and full screen image view. Everything works fine, until I do like this. 1. I'll open my grid view and click on any thumbnail image and display the image in full screen. Then i'll come back to grid view from image view and click on...

MemoryLeak in onBackPressed with Animation

android,performance,android-activity,memory-leaks,out-of-memory
I've created a rather complex end animation within an open source application. If the onBackPressed() method is called the application will animate the views and close. it seems that there is a memory leek, because it won't stop to allocate new ram afterwards. If i remove the animation and just...

R- set working directory to hdfs

r,out-of-memory,working-directory,revolution-r
I need to create some data frames from very large data sets in R. Is there a way to change my working directory so that R objects that I create are saved into hdfs? I don't have enough space under /home to save these large data frames, but I need...

What is: Bad_dump!missing_teb (Windows Phone Dev Center Crash Log)

crash,windows-phone-8.1,out-of-memory,crash-reports,crash-dumps
The following 2 crashes are being reported as our WP 8.1 app's highest occurance crashes based on Window's developer center's crash logs. Any clue what they mean or how to debug them? I suspect 'out of memory' but would like to confirm. First: bad_dump!missing_teb BAD_DUMP_MISSING_MEMORY_MISSING_CLR_METADATA_bad_dump!missing_teb Second: bad_dump!missing_teb BAD_DUMP_MISSING_MEMORY_NULL_CLASS_PTR_READ_ZEROED_STACK_MISSING_CLR_METADATA_bad_dump!missing_teb ...

Symfony2 form validation exhausted memory

php,validation,symfony2,out-of-memory
I have a complex form with many entity choice field. When I don't use validation, add/edit is okay. But when I enable form validation in /config/validation.yml, I can't add/edit anymore. I checked php log files and see some error: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried...

Euclidian Distance of Two (Non-traditional) Vectors in Python

python,out-of-memory,distance
I have two non-traditional vectors and I'd like to compute the Euclidian distance between them. The vectors are set up as follows: line1 = '2:20 3:20 5:10 6:10 10:20' line2 = '1:18 2:20 4:10 6:10 8:20 9:10 10:10' For each element, the first number is the location in the vector...

Throwing OutOfMemoryError with large images

android,bitmap,out-of-memory,screen-resolution
I'm working on a way to hold the same aspect of my images (icons and images) in my "universal" app. The problem with the resolutions/screens densities is causing me a lot of headaches. Is there any way to work with this problem:? Device: Tablet 10" / 1280x752 / Screen density...

Out of memory error in Cassandra when querying big rows containing a collection (set)

java,cassandra,out-of-memory,datastax,cql3
I am using Cassandra 2.0.8 and I have got a cql3 table defined like this: CREATE TABLE search_scf_tdr ( fieldname text, fieldvalue text, scalability int, timestamptdr bigint, tdrkeys set<blob>, PRIMARY KEY ((fieldname, fieldvalue, scalability), timestamptdr) ) I use a replication factor of 2 per DC for this keyspace. I am...

OutOfMemoryError after Facededetion

java,out-of-memory,face-detection,openimaj
package facerec; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.List; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import org.openimaj.feature.DoubleFVComparison; import org.openimaj.image.FImage; import org.openimaj.image.MBFImage; import org.openimaj.image.colour.RGBColour; import org.openimaj.image.processing.face.alignment.RotateScaleAligner; import org.openimaj.image.processing.face.detection.HaarCascadeDetector; import...

API with hundrets of forms - out of memory

php,forms,symfony2,out-of-memory
In my Symfony 2.6 project I have API for mobile app that gives a possibility to add and object with lots of data. Main form consists of collection of other forms. Each of child forms have the same things, 4 in total. So the structure looks like this: Master form...

MapViewOfFile() no longer works after process hits the 2GB limit

winapi,memory,out-of-memory
MapViewOfFile() works without any problem if our process has not hit the 2GB limit yet. However if the process hits the limit then MapViewOfFile() no longer works even if some or all of the memory is deallocated. GetLastError() returns 8, which means ERROR_NOT_ENOUGH_MEMORY, Not enough storage is available to process...