Hi,

I have a persistent issue with Eclipse Kepler + latest ADT 
(22.6.0.v201402070614-preview-1012920, but I don't think this is specific 
to the latest version).

I have a rather large Android project using many Android libraries and Java 
dependencies.

On a fresh launch of Eclipse, repeated building and launching on device 
works fine and is reasonably fast for a while.
Building takes 10-30s.

After maybe a few hours, a launch on device trigerring a build remain stuck 
on "Refreshing workspace" for several minutes (about 8 minutes), 
then the build finally completes and the app starts on the device.
During these 8 minutes, taking thread dumps at regular interval shows that 
Dex is running and doing stuff (not blocked aiting for something) but 
abnormally slow.
For example 2 dumps of the thread it is running, at a few minutes interval, 
taken with jvisualvm:

 
"Worker-46" prio=6 tid=0x000000000f766000 nid=0x15f8 runnable 
[0x00000000230bd000]
   java.lang.Thread.State: RUNNABLE
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:561)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:532)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:169)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:199)
    at 
com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
    at com.android.dx.command.dexer.Main.run(Main.java:230)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at 
com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:187)
    - locked <0x00000000bc8cdc78> (a 
com.android.ide.eclipse.adt.internal.build.DexWrapper)
    at 
com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:813)
    at 
com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:597)



Worker-46" prio=6 tid=0x000000000f766000 nid=0x15f8 runnable 
[0x00000000230bd000]
   java.lang.Thread.State: RUNNABLE
    at com.android.dex.Mutf8.encode(Mutf8.java:111)
    at com.android.dex.Dex$Section.writeStringData(Dex.java:859)
    at com.android.dx.merge.DexMerger$1.write(DexMerger.java:393)
    at com.android.dx.merge.DexMerger$1.write(DexMerger.java:377)
    at 
com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:288)
    at com.android.dx.merge.DexMerger.mergeStringIds(DexMerger.java:377)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:161)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:187)
    at 
com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
    at com.android.dx.command.dexer.Main.run(Main.java:230)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at 
com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:187)
    - locked <0x00000000bc8cdc78> (a 
com.android.ide.eclipse.adt.internal.build.DexWrapper)
    at 
com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:813)
    at 
com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:597)



The dumps are always different (executing Dex), proving that Dexing is in 
process, except that it takes forever.

Always using jvisualvm to inspect Eclipse, it shows that plenty of memory 
is available, both for the Heap and Permgen. 
But of course, less is available than on a fresh start.

This issue is really bugging me as I'm forced to restart Eclipse every few 
hours.

As a side note, I have quite a bit of plugins loaded in Eclipse and a large 
workspace of projects of various nature.
The project I'm building has a total of 63 pre-dexed jars in total (some of 
them just a few KB).

If there is something I can do to gather more info, please let me know.




-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to