Status Update
Comments
ya...@google.com <ya...@google.com> #2
Thanks for report.
Does it hangs consistently or only occasionally?
ya...@google.com <ya...@google.com> #3
Studio get deadlocked internally
From attached thread dump:
- "AWT-EventQueue-0" trying to acquire a write lock. Waiting on "ApplicationImpl pooled thread 2558" to release a read lock
- "ApplicationImpl pooled thread 2558" have read lock acquired. Waiting on "ApplicationImpl pooled thread 2535" to finish async computation
- "ApplicationImpl pooled thread 2535" could not acquire a read lock because of pending write lock request.
"ApplicationImpl pooled thread 2558" #12563 prio=4 os_prio=-1 cpu=328.12ms elapsed=1682.14s tid=0x00000261e50c21b0 nid=0xee70 waiting on condition [0x00000070295fe000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@17.0.7/Native Method)
- parking to wait for <0x0000000607059b98> (a java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park(java.base@17.0.7/LockSupport.java:211)
at java.util.concurrent.CompletableFuture$Signaller.block(java.base@17.0.7/CompletableFuture.java:1864)
at java.util.concurrent.ForkJoinPool.unmanagedBlock(java.base@17.0.7/ForkJoinPool.java:3463)
at java.util.concurrent.ForkJoinPool.managedBlock(java.base@17.0.7/ForkJoinPool.java:3434)
at java.util.concurrent.CompletableFuture.waitingGet(java.base@17.0.7/CompletableFuture.java:1898)
at java.util.concurrent.CompletableFuture.get(java.base@17.0.7/CompletableFuture.java:2072)
at com.android.tools.idea.rendering.GutterIconFactory.createXmlIcon(GutterIconFactory.java:140)
at com.android.tools.idea.rendering.GutterIconFactory.createIcon(GutterIconFactory.java:77)
at com.android.tools.idea.rendering.GutterIconCache.getIcon(GutterIconCache.java:82)
at com.android.tools.idea.res.completion.DrawableResourceLookupElement.renderElement(ResourceCompletionContributor.kt:84)
at com.intellij.codeInsight.lookup.LookupElementPresentation.renderElement(LookupElementPresentation.java:220)
at com.intellij.codeInsight.lookup.impl.LookupImpl.addItem(LookupImpl.java:266)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$addItemToLookup$4(CompletionProgressIndicator.java:457)
at com.intellij.codeInsight.completion.CompletionProgressIndicator$$Lambda$8807/0x00000008043daca8.run(Unknown Source)
at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:199)
at com.intellij.util.indexing.FileBasedIndex$$Lambda$8721/0x0000000804357298.compute(Unknown Source)
at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:112)
at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:719)
at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:198)
at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:43)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.addItemToLookup(CompletionProgressIndicator.java:456)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.addItem(CompletionProgressIndicator.java:446)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$flushBatchResult$2(CompletionThreading.java:159)
at com.intellij.codeInsight.completion.AsyncCompletion$$Lambda$8806/0x00000008043daa60.run(Unknown Source)
at com.intellij.codeInsight.completion.BaseCompletionLookupArranger.batchUpdate(BaseCompletionLookupArranger.java:201)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.withSingleUpdate(CompletionProgressIndicator.java:368)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$flushBatchResult$3(CompletionThreading.java:157)
at com.intellij.codeInsight.completion.AsyncCompletion$$Lambda$8805/0x00000008043da818.run(Unknown Source)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$tryReadOrCancel$5(CompletionThreading.java:169)
at com.intellij.codeInsight.completion.AsyncCompletion$$Lambda$8760/0x000000080438fa10.run(Unknown Source)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1100)
"AWT-EventQueue-0" #40 prio=6 os_prio=0 cpu=529921.88ms elapsed=178088.05s tid=0x0000026128c74d80 nid=0x3aa4 runnable [0x00000070286fd000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@17.0.7/Native Method)
- parking to wait for <0x0000000604a25e18> (a com.intellij.openapi.application.impl.ReadMostlyRWLock)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@17.0.7/LockSupport.java:252)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.writeLock(ReadMostlyRWLock.java:292)
at com.intellij.openapi.application.impl.ApplicationImpl.startWrite(ApplicationImpl.java:1162)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:954)
at com.intellij.openapi.editor.impl.DefaultRawTypedHandler.execute(DefaultRawTypedHandler.java:49)
"ApplicationImpl pooled thread 2535" #12515 prio=4 os_prio=-1 cpu=2218.75ms elapsed=2141.17s tid=0x0000026195d8a1d0 nid=0x10230 runnable [0x00000070254fe000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@17.0.7/Native Method)
- parking to wait for <0x0000000604a25e18> (a com.intellij.openapi.application.impl.ReadMostlyRWLock)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@17.0.7/LockSupport.java:252)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.waitABit(ReadMostlyRWLock.java:166)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.startRead(ReadMostlyRWLock.java:130)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:874)
at com.android.tools.idea.configurations.ConfigurationForFile.calculateActivity(ConfigurationForFile.kt:49)
at com.android.tools.configurations.Configuration.getActivity(Configuration.java:316)
at com.android.tools.configurations.Configuration.computePreferredTheme(Configuration.java:1266)
at com.android.tools.configurations.Configuration.getTheme(Configuration.java:455)
at com.android.tools.configurations.Configuration.getResourceResolver(Configuration.java:1167)
at com.android.tools.rendering.RenderTask.renderDrawable(RenderTask.java:1187)
at com.android.tools.idea.rendering.DrawableRenderer.lambda$renderDrawable$1(DrawableRenderer.java:135)
- locked <0x0000000607056c90> (a java.lang.Object)
at com.android.tools.idea.rendering.DrawableRenderer$$Lambda$14583/0x0000000806c32448.apply(Unknown Source)
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(java.base@17.0.7/CompletableFuture.java:1150)
ni...@gmail.com <ni...@gmail.com> #4
In my experience, it hangs consistently.
pa...@google.com <pa...@google.com>
jg...@google.com <jg...@google.com> #5
Removing beta blocking and reducing priority as a fix has been merged in Hedgehog beta. But keeping this open as a more proper solution is needed
ra...@google.com <ra...@google.com> #6
Thanks for the quick fix, Jerome!
kd...@google.com <kd...@google.com>
kd...@google.com <kd...@google.com>
an...@google.com <an...@google.com> #7
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Iguana | 2023.2.1 Canary 7
- Android Gradle Plugin 8.3.0-alpha07
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
do...@gmail.com <do...@gmail.com> #8
kd...@google.com <kd...@google.com> #9
Hi - thanks for following up.
Can you provide a thread dump so we can see if this is the same issue?
kd...@google.com <kd...@google.com> #10
Actually I have one here:
kd...@google.com <kd...@google.com> #11
Hmm, could still be useful to have yours. I created mine by artificially inflating the time it takes to do the rendering of the drawable, but it still shouldn't have deadlocked as the autocomplete is no longer waiting on the rendering of the drawable.
If you have a consistent repro or a thread dump, I'd much appreciate it.
ma...@marcardar.com <ma...@marcardar.com> #13
I haven't experienced this issue since updating to Hedgehog.
kd...@google.com <kd...@google.com> #14
🎉
Description
Icon(
imageVector = ImageVector.vectorResource(id = R.drawable.ic_
The IDE normally shows list of drawable resources matching "ic_". But instead, Android Studio completely hangs and becomes irresponsive.
Gradle plugin version:1.9.0
Version of Gradle:8.2.1
Version of Java: 17
OS: Windows