I tried to run my project and it appears that I did not allocate enough memory so I go to VM options and upgraded, and the error still appears, when it appears like in the screenshot I put my value oh Xmx and select shutdown.
What can I do if it does not change after that?
Screenshot of the error:
It seems that I had and JAVA_OPTIONS error apering all the time but I didn't see it, i just deleted the Java Options from users and systems following this thread
Related
I have updated my Android Studio to version 3.3.1, but now breakpoints are executing very slowly? First breakpoint take around 5 minutes to execute.
Can anyone please tell me what can I do to make it work like it was in the previous version?
I faced the same issue when I installed android studio 3.3.2. Any time I'd try to debug my app, it would run crazily slow. But finally got the solution as described below:
Go to the debugger and select view breakpoints
Make sure the Java method Breakpoint is unchecked.
It's often easy to add method breakpoints accidentally and That's usually the main reason behind the significant slowness of the debugging speed.
Follow the few steps below if that the case:
just remove all breakup points in your android studio.then automatically android debug will be fast.
remove all breakpoint step:
go to debugger then select red button it will pop up all debugger break point and then remove.
My machine has 8 GB of RAM. I installed Android Studio 1.1.0 and applied everything they posted here.
Everything works fine with a small Hello world app. But when I start editing build.gradle of a big project which we had moved from Eclipse, the IDE hangs for 20 or 30 seconds. It hangs even if I don't add or remove any lines. Even if I just press Enter. Besides I don't see any processes running (indexing, syncing, etc) at the bottom.
I checked File -> Settings -> Gradle, and Use auto-import was unchecked.
As they suggested, I ran jstack -l <pid> > dump.txt and posted a message along with dump.txt on https://code.google.com/p/android/issues/detail?id=82706#c35
I can't attach the same dump.txt here because it contains about 800 lines.
After some time looking into this issue, I found that it is an active issue among the Android Issue Tracker forum.
https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=59965
You'll see my comment in that thread but I'll post it here as well
I did find out WHY my build.grade would hang upon touching (any amount
of editing once so ever).
I had a statement where I would iterate over all the variants and
would then iterate over each variant's outputs and do a filter among
an xml file. Commenting the filter portion out would remove the
hanging/freezing problem. In fact only iterating over the first output
(of the first variant) would drastically reduce this lag time, still,
very annoying.
I would suggest starting your build.gradle file from scratch and
adding parts progressively until you come across the portion in which
hangs the editing process.
EITHER WAY, this hang shouldn't happen since I'm merely editing the
file, not compiling nor running.
Hopefully this can help someone
In your gradle.properties files uncomment the 3rd line below, if not exist create one yourself
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
This help me a lot in android-studio performance
The Visual Studio 2012 Professional Edition installed on my PC keeps on showing in error list
"csc.exe" exited with code 1 in Visual Studio 2012
instead of the actual error (e.g. syntax error).
How can I fix this?
I turned on detailed logging in Tools -> Options ... -> Projects and Solutions -> Build and Run.
When you rebuild your solution, you can see the command that gives the error. Copy the command, open a cmd window, go to your project folder, paste and run the command. The output will give you the actual error.
It's some sort of bug in VS2012 I suppose. You could try cleaning your solution, restart Visual Studio and try rebuilding? The above solution should point you in the right direction for finding your error. When opening the file containing the error, the errors should appear in the error list.
This happened to me because I enabled the "treat warnings as error" switch in my project settings and had an unused class member in some file.
I agree that the output window's message is misleading and should be replaced by some message that shows which member cause the build to fail.
Maybe my unswer is too late, but I want to say, that such error could also happen if you copy that project from another solution. That project was sign with .snk file and you added it to TFS (for ex). VS does not upload .snk by default and when you will use your code in the other place, you will not have that file, but in AssemblyInfo.cs there will be mention that your project contains that file. So, c2c2.exe will not build your solution because of this. Quick solution will be just to commnet this line
[assembly: AssemblyKeyFile( #"....\sn.snk" )]
in AssemblyInfo.cs
I had the same issue.
I tried cleaning the solution, deleting the bin/obj folders, repaired visual studio 2013, dump out detailed build info, nothing helped, CSC still exited with error code 1, no more info than that.
In the end it was caused by two variables (a double and double[]) with the same name in the same code block. Strange error to cause it.
If this happened to a project that was working before, verify no devenv.exe is running after closing VS:
-Close all the instances of VS
-Open the task manager
-Verify all the devenv.exe actually get closed, or kill the processes
For me, I still had 3 devenv.exe working; I ended these processes, started VS again, and it worked correctly.
My question is not a duplicate of this, in fact its a extension of the same question,
This is the code snippet, due to which the error occurs,
BOOL CMyApp::InitInstance() {
m_pMainWnd = new CMainWindow;
m_pMainWnd->ShowWindow(SW_NORMAL);
m_pMainWnd->UpdateWindow();
return TRUE;
}
So, when I use m_pMainWnd->ShowWindow(SW_NORMAL); the prgoram runs without any error, the window opens in normal size and I can see the output, but when I do m_pMainWnd->ShowWindow(SW_MAX); even after the program runs without errors I cannot see the output window, also when I try to rebuild, VC throws an error saying
LINK : fatal error LNK1104: cannot open .exe
I have followed a few answers of this question as well, the first answer in this question suggests
You might have not closed the the output. Close the output, clean and rebuild the file. You might be able to run the file now.
which is quite correct but what I have to do is log off my computer and log in again in order to terminate the output process, I have to do this because I can neither find an application window that is open, nor I can see any program running in the Application's tab in 'Task Manager'. I even followed the second answer which says
You have to put Application Experience on Manual startup(you can do it by searching services in windows 7 start menu, and then find Application Experience and click properties).
except when I got there, I found the Application was already put on Manual Startup, and the problem still persists. Along with the solution what I want to know is why does the program not show output when I write m_pMainWnd->ShowWindow(SW_MAX);
If it helps I am using VC++ 6.0 and my OS is Windows-7 Professional 32-bit
SW_MAX is same as SW_FORCEMINIMIZE the documentation states that
Minimizes a window, even if the thread that owns the window is not
responding. This flag should only be used when minimizing windows from
a different thread.
It infact minimize the window and the application still run's in the task bar. I checked it in Win7 machine.
if your objective is to display the window in maximized state use SW_SHOWMAXIMIZED instead.
The VC++ 6.0 debugger does not work correctly under Windows 7 due to changes.
When you attempt to kill the process from the debugger, the process doesn't end correctly and gets stuck.
See the following topic for more info.
How to debug with Visual C++ 6 on Windows 7 x64?
I have VS2010 Premium RTM version on Windows 7 Ultimate x64.
In the documentation they refer to the Memory 1-4 windows, supposedly under Debug->Windows->Memory.
I have "Enable address-level debugging" enabled in VS (Options->Debugging).
The problem is that I have no Memory menu item under Debug->Windows during debug of a c++ program.
Under Debug->Windows I have only:
Breakpoints
Parallel Tasks
Parallel Stacks
Watch ->
Locals
Call Stack
Threads
Have anyone else experienced this (and hopefully solved it)?
During the first run of VS after installation it asks you which "mode" it should run in, depending on your selection it shows or hides various menu items etc. Maybe you selected an option that hid those windows? This is described at this page.
I think you can use the information on this page to change those settings.
You might also be able to just run Devenv /ResetSettings to reset them, but not sure exactly what you'd end up with then...
Go to command Window and type in memory. It will show the Memory 1 watch window. I had to do that because I still can't find the debug command for it under customize even.
You can switch to expert mode by checking :
Tools > Settings > Expert Settings
Now you can show up Registers Window and much more other windows
The Memory window is available only if address-level debugging is enabled in the Options dialog box, Debugging node. The Memory window is not available for Script or SQL, which are languages that do not recognize the concept of memory.
or go here for other details:
http://msdn.microsoft.com/en-us/library/s3aw423e.aspx