out-of-memory

OutOfMemoryError when parsing incorrect input in ANTLR

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 09:29:58
Actually this issue is related with my previous question Catching ANTLR's NoViableAltException in Java and ANTLRWorks Debugger , but I decided to split them because of different symptoms. The issue is about feeding to ANTLR input text, which contains unknown tokens. Consider for example, that our grammar doesn't known anything about tokens which start with @ symbol. If we will try to feed such text to ANTLRWorks interpreter, we will receive NoViableAltException in result graph. But if we will take generated and compiled grammar in Java and try to parse such invalid text with it, we can receive

Visual Studio diagnostic tools not displaying process memory

放肆的年华 提交于 2019-12-06 09:19:22
I have a VB.NET app (with C# libraries) which is consuming large amounts of memory over time. Ultimately the application runs out of memory. I am cautious about using the term leaking because the GC shouldn't allow a memory leak, but perhaps there is a large .NET object somewhere. If so I need to identify it. However I do have a reference to a 3rd party ActiveX control library (.ocx) of which I use some controls and make numerous calls retrieving laser beam profile data. Memory usage increases only when I run a loop retrieving the laser beam profile data from the ocx. I suspect the ocx but

memory error by using rbf with scipy

萝らか妹 提交于 2019-12-06 08:42:09
I want to plot some points with the rbf function like here to get the density distribution of the points: if i run the following code, it works fine: from scipy.interpolate.rbf import Rbf # radial basis functions import cv2 import matplotlib.pyplot as plt import numpy as np # import data x = [1, 1, 2 ,3, 2, 7, 8, 6, 6, 7, 6.5, 7.5, 9, 8, 9, 8.5] y = [0, 2, 5, 6, 1, 2, 9, 2, 3, 3, 2.5, 2, 8, 8, 9, 8.5] d = np.ones(len(x)) print(d) ti = np.linspace(-1,10) xx, yy = np.meshgrid(ti, ti) rbf = Rbf(x, y, d, function='gaussian') jet = cm = plt.get_cmap('jet') zz = rbf(xx, yy) plt.pcolor(xx, yy, zz,

java can system out result in out of memory issues

≯℡__Kan透↙ 提交于 2019-12-06 08:32:05
问题 This is a theoretical question . Can a flood of system out on java applet , cause applet to go out of memory ? If yes what would be an easy solution to remove multiple sysout spanning across multiple files ? 回答1: A single System.out.println(x) can cause an out of memory error, if x.toString() uses too much memory. Can a flood of system out on java applet , cause applet to go out of memory ? It is size of the resulting String which matters, not the number. More messages will be slower, but

How to reduce the memory usage and speed up the code

萝らか妹 提交于 2019-12-06 08:22:39
问题 I am using huge dataset with 5 columns and more that 90 million rows. The code works fine with part of the data, but when it comes to the whole I get Memory Error. I read about generators, but it appears very complex for me. Can I get explanation based on this code? df = pd.read_csv('D:.../test.csv', names=["id_easy","ordinal", "timestamp", "latitude", "longitude"]) df = df[:-1] df.loc[:,'timestamp'] = pd.to_datetime(df.loc[:,'timestamp']) pd.set_option('float_format', '{:f}'.format) df[

OutOfMemoryException while trying to send large json data to server in android?

荒凉一梦 提交于 2019-12-06 08:04:28
I am trying to send multiple Json string[each 1 MB] at a time to PHP Server. When i tried to send 10 records its working fine. But if it exceeds 20 records it says OutOfMemoryException . I seen that android memory size limit t0 15MB - 16MB. But haven't got any clue how to resolve this, I am using the below code to send multiple records at a time. /** Upload Data*/ private void submitUploadData(String url, Map<String, String> param) throws IOException { URL siteUrl; try { siteUrl = new URL(url); HttpURLConnection conn = (HttpURLConnection) siteUrl .openConnection(); conn.setRequestMethod("POST"

OutOfMemoryException when creating huge string in ASP.NET

送分小仙女□ 提交于 2019-12-06 07:43:50
When exporting a lot of data to a string (csv format), I get a OutOfMemoryException. What's the best way to tackle this? The string is returned to a Flex Application. What I'd do is export the csv to the server disk and give back an url to Flex. Like this, I can flush the stream writing to the disk. Update: String is build with a StringBuilder: StringBuilder stringbuilder = new StringBuilder(); string delimiter = ";"; bool showUserData = true; // Get the data from the sessionwarehouse List<DwhSessionDto> collection =_dwhSessionRepository.GetByTreeStructureId(treeStructureId); // ADD THE

Android - How to work around a “no space left on device” error

夙愿已清 提交于 2019-12-06 07:22:28
So my latest app runs into this problem where it complains in the logcat that theres no room left on the device to save files but that is definitely not the case as I can close my app open the stock camera and take a picture. How has everybody else dealt with this problem. Edit: The error occurs in this method private void writeFile(Bitmap bmp, File f) { FileOutputStream out = null; try { out = new FileOutputStream(f); bmp.compress(Bitmap.CompressFormat.PNG, 80, out);//<---error here } catch (NullPointerException e) { e.printStackTrace(); Log.w("nullpointerException on image error",

Tomcat memory usage (PermGen)

谁说胖子不能爱 提交于 2019-12-06 07:01:38
问题 I am using Tomcat for deploying a web application withe following PermGen configurations: JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC" Please I want to know the following: Is the whole memory used by Tomcat should be 256MB or Tomcat consumes other memory for other reasons ? How can I monitor the memory used by Tomcat to avoid reaching PemGen max size ?

How to figure out the max value for capacity parameter passed to Dictionary constructor to avoid OutOfMemoryException?

江枫思渺然 提交于 2019-12-06 06:59:33
问题 Related to this: System.OutOfMemoryException because of Large Dictionary I am getting OutOfMemoryException when I let .NET manage my dictionary. The exception thrown in resize method. So I was trying to avoid resizing by providing large number as a capacity. Naturally I tried to start from int.MaxValue just to make sure it will help to solve the problem. I was planning to go down as much as needed. However OutOfMemoryException is thrown for int.MaxValue . I decided to make a little binary