It is taking precedence. Setting it to e.g. 2000M (using a 32 bit VM) stops Eclipse from starting stating the normal "could not create Java virtual machine".
No, L: is a local disk. :) Yes, 381.500 kB is about 381 MB . The 32 bit VM on my OS can create a VM with more than 1GB as Xmx, the limit is close to what I use as an argument. Trying to set -Xmx to a too large value will stop the VM from starting, at startup time, and not later. I talked to another developer who also is writing Android applications .He has not had any problems on a 32 bit version of Windows. (I'm using Windows Vista Ultimate 64 bit) On 5 Aug, 09:09, Bob Kerns <r...@acm.org> wrote: > OK. I'm not 100% certain that the command line will take precedence > over the eclipse.ini. You might want to edit the -Xmx512m there. > > Except that with a drive letter like L:, I'm surmising that you're > running it from a network share? This may cause some significant > performance problems, and is not something I would recommend. That > wouldn't cause you to run out of memory, though. But you might want to > experiment with a local copy. > > Private working set is not relevant to running out of memory. "working > set" merely indicates, out of all the memory allocated in this > process, how much is actually in RAM? It is relevant to competing for > RAM with other processes, and thus paging slowdowns. > > By "Commit size is now 381.500 kB", you mean 381.5 MB? For this one > process? (Just checking). That is perhaps about right for a setting of > -Xmx512m, with the GC factored in, etc. It is not consistent with > running out of a > 1GB allocation. (And I'm not sure the 32-bit > version of Java can actually handle a heap of that size; I don't > recall the limit, but I think you're not that far from it at best. I > do recall it changing from release to release and finding a server > stopped working as a result...) So one possibility is that the Eclipse > launcher may be dropping that setting without telling you, just > because it's too big. > > One thing you can do, if you haven't already: In Eclipse, go to > Windows / Preferences... / General and check Show Heap Status. This > puts a field in the status bar that shows Java's idea of how much Java > heap it has allocated, and the current limit (i.e. the upper number > will grow from -XmsXXXm to -XmxYYYm). This is an easy way to see > Eclipse's GC status. > > On Aug 4, 10:37 pm, Kaj Bjurman <kaj.bjur...@gmail.com> wrote: > > > > > Eclipse is started using a shortcut: > > > Galileo > > L:\eclipse-jee-galileo-win32\eclipse\eclipse.exe -vmargs -Xmx1324m > > > Ganymede > > L:\eclipse\eclipse.exe -vmargs -Xmx1324m > > > (I'm having the same problem in both) > > > eclipse.ini says: > > > --launcher.library > > plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 > > -startup > > plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar > > -product > > org.eclipse.epp.package.jee.product > > --launcher.XXMaxPermSize > > 256M > > -showsplash > > org.eclipse.platform > > --launcher.XXMaxPermSize > > 256m > > -vmargs > > -Dosgi.requiredJavaVersion=1.5 > > -Xms40m > > -Xmx512m > > > The java version that is in path: > > > java version "1.6.0_13" > > Java(TM) SE Runtime Environment (build 1.6.0_13-b03) > > Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) > > > I only checked the process in task manager, but I also made the > > columns for handles, threads and user objects visible. The number of > > threads was only about 40 which surprised me. (An fresh started > > Eclipse on my system has about 28 threads) > > > Memory (Private working set) was about 400.000 kB. I did not check > > commit size, I tonigh when I got time to provoke Eclipse again. The > > paging size looked normal. > > > I now saw that that Eclipse only used revision 5 of the Android SDK > > Tools. I started a fresh Eclipse, opened up Android SDK and AVD > > Manager, selected to install all available packages, and then bumbed > > into the same error again (so it took less than 2 minutes) > > > Commit size is now 381.500 kB, Private working set 327.048 kB, Threads > > 26, Handles 506 > > > On 5 Aug, 03:44, Bob Kerns <r...@acm.org> wrote: > > > > OK, this is good information. You are, in fact, running out of memory > > > -- somehow. > > > > I've see this, but seldom as performance starts to suck for me long > > > before. > > > > How exactly are you allocating memory for Java? How are you starting > > > Eclipse? > > > > And when you were checking how much memory Eclipse was using, how did > > > you check that, exactly? It sounds like you used the task manager -- > > > what is the exact title of the column you used? Task manager is not > > > ideal for looking at this, but the only column that is actually > > > relevant out of the 7 memory columns available is "Memory - Commit > > > size". But the relationship between that and Java's GC'd heap memory > > > allocation is tenuous. About the only thing you can say is that Memory > > > - Commit size" will be greater than the amount of memory Java is > > > actively using in its heap. > > > > Did you check your paging file space? That's another way you can run > > > out of memory. > > > > And finally, it may report this error when you've run out of native > > > threads. That is, in fact, WHERE you are running out of memory, > > > though it may not be the specific cause. Check the Threads column. > > > > With Galileo, and Rev 6 of the Android SDK tools, I don't see a thread > > > leak. In fact, my thread count was initially 47, went up to 52 briefly > > > while auto-building my project, and then as I started looking at > > > layouts, it has gone down to 37, and I don't seem to find anything > > > with layouts that bumps it up at all. > > > > If you see a different behavior, then we have a clue. (Otherwise, it's > > > still a clue, but a weak one). > > > > On Aug 4, 2:00 pm, Kaj Bjurman <kaj.bjur...@gmail.com> wrote: > > > > > I just provoked my Eclipse again, just to see what the error message > > > > is. I remembered it as out of handles, but that was a bit wrong. I > > > > checked the process in the task manager when it was in the error > > > > state. It isn't out of memory, and it's probably not out of handles. > > > > The CPUs are also idle, so nothing is spinning. > > > > > The error from Eclipse is a dialog that says: > > > > > Multiple problems have occured (as title) > > > > > The error message is then, "unable to create new native thread". > > > > > Followed by a textfield that is displaying: > > > > > Collecting garbage > > > > Collecting garbage > > > > Unhandled event loop exception > > > > > unable to create new native thread > > > > > The eclipse error log can be seen below. > > > > > Eclipse was at that time taking about 400 MB of memory (of the 1300M > > > > that I had assigned to the VM) > > > > > It took me about 10-15 minutes. All I did was editing one layout file, > > > > switched between layout view, then edited the xml directly, changed > > > > some properties through the property view, saved quite frequently, > > > > even with compilation errors, and also tried keep editing while it was > > > > saving. > > > > > This never happens when I write code in Eclipse. > > > > > !ENTRY org.eclipse.core.resources 8 2 2010-08-04 22:40:49.414 > > > > !MESSAGE Problems occurred when invoking code from plug-in: > > > > "org.eclipse.core.resources". > > > > !STACK 1 > > > > org.eclipse.core.runtime.CoreException: 'aapt' error. Pre Compiler > > > > Build aborted. > > > > at > > > > com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown > > > > Source) > > > > at > > > > com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown > > > > Source) > > > > at org.eclipse.core.internal.events.BuildManager > > > > $2.run(BuildManager.java:627) > > > > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) > > > > at > > > > org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java: > > > > 170) > > > > at > > > > org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java: > > > > 201) > > > > at org.eclipse.core.internal.events.BuildManager > > > > $1.run(BuildManager.java:253) > > > > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) > > > > at > > > > org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java: > > > > 256) > > > > at > > > > org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j > > > > ava: > > > > 309) > > > > at > > > > org.eclipse.core.internal.events.BuildManager.build(BuildManager.java: > > > > 341) > > > > at > > > > org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java: > > > > 140) > > > > at > > > > org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java: > > > > 238) > > > > at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) > > > > !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414 > > > > !MESSAGE 'aapt' error. Pre Compiler Build aborted. > > > > !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-08-04 22:40:49.414 > > > > !MESSAGE 'aapt' error. Pre Compiler Build aborted. > > > > > !ENTRY org.eclipse.ui 4 0 2010-08-04 22:45:29.067 > > > > !MESSAGE Unhandled event loop exception > > > > !STACK 0 > > > > java.lang.OutOfMemoryError: unable to create new native thread > > > > at java.lang.Thread.start0(Native Method) > > > > at java.lang.Thread.start(Unknown Source) > > > > at org.eclipse.jface.text.contentassist.AdditionalInfoController > > > > $Timer.<init>(AdditionalInfoController.java:244) > > > > at org.eclipse.jface.text.contentassist.AdditionalInfoController > > > > $10.<init>(AdditionalInfoController.java:457) > > > > at > > > > org.eclipse.jface.text.contentassist.AdditionalInfoController.install(Addit > > > > ionalInfoController.java: > > > > 457) > > > > at > > > > org.eclipse.jface.text.contentassist.CompletionProposalPopup.displayProposa > > > > ls(CompletionProposalPopup.java: > > > > 1198) > > > > at > > > > org.eclipse.jface.text.contentassist.CompletionProposalPopup.access > > > > $23(CompletionProposalPopup.java:1157) > > > > at org.eclipse.jface.text.contentassist.CompletionProposalPopup > > > > $2.run(CompletionProposalPopup.java:500) > > > > at > > > > org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java: > > > > 70) > > > > at > > > > org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals( > > > > CompletionProposalPopup.java: > > > > 482) > > > > at > > ... > > läs mer » -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en