Status Update
Comments
ji...@gmail.com <ji...@gmail.com> #2
The TODO()
don't make a difference, sorry. I edited the method to have proper values in the stable AS, and tried to edit it again in AS canary and it freezes again.
Edit: AS Freezes in any file when I type R.drawable.
and the popup opens, can you please change the title?
jp...@google.com <jp...@google.com> #3
Thanks for providing logs. They indicate the freeze reports have been taken at the following path:
/Users/<username>/Library/Logs/Google/AndroidStudioPreview2023.1/threadDumps-freeze-20230811-105601-AI-231.9225.16.2311.10572941/
Could you provide those thread dumps, and/or any around the same time?
da...@davwheat.dev <da...@davwheat.dev> #4
Hi, sure, I've uploaded all thread dumps as a zip to the Drive folder, including the one you specified.
di...@google.com <di...@google.com> #5
Thanks for the thread dumps. I'm pasting the relevant threads below, but this helps identify that it's a regression due to commits d8564fd (ag/24154614) and c0629de (ag/24195203).
I'm going to disable that fix for Hedgehog, which should fix the freezing issue.
Event thread responding to a keystroke, waiting for write lock:
"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 waiting on condition
java.lang.Thread.State: TIMED_WAITING
on com.intellij.openapi.application.impl.ReadMostlyRWLock@755c8fa3
at java.base@17.0.7/jdk.internal.misc.Unsafe.park(Native Method)
at java.base@17.0.7/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
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)
at com.intellij.openapi.editor.impl.EditorFactoryImpl$MyRawTypedHandler.execute(EditorFactoryImpl.java:317)
at com.intellij.openapi.editor.actionSystem.TypedAction.lambda$actionPerformed$2(TypedAction.java:200)
at com.intellij.openapi.editor.actionSystem.TypedAction$$Lambda$7468/0x00000008037b37d0.run(Unknown Source)
at com.intellij.reporting.FreezeLoggerImpl.runUnderPerformanceMonitor(FreezeLoggerImpl.java:28)
at com.intellij.openapi.editor.actionSystem.TypedAction.lambda$actionPerformed$3(TypedAction.java:199)
at com.intellij.openapi.editor.actionSystem.TypedAction$$Lambda$7467/0x00000008037b3110.run(Unknown Source)
at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:194)
at com.intellij.openapi.editor.actionSystem.TypedAction.actionPerformed(TypedAction.java:199)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTypedNormally(EditorImpl.java:1314)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:1296)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:3458)
at com.intellij.openapi.editor.impl.EditorImpl$7.keyTyped(EditorImpl.java:1130)
at java.desktop@17.0.7/java.awt.AWTEventMulticaster.keyTyped(Unknown Source)
...
Completion running inside a read lock, waiting on drawable renderer:
"ApplicationImpl pooled thread 982" prio=0 tid=0x0 nid=0x0 waiting on condition
java.lang.Thread.State: WAITING
on java.util.concurrent.CompletableFuture$Signaller@22e11857
at java.base@17.0.7/jdk.internal.misc.Unsafe.park(Native Method)
at java.base@17.0.7/java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.base@17.0.7/java.util.concurrent.CompletableFuture$Signaller.block(Unknown Source)
at java.base@17.0.7/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source)
at java.base@17.0.7/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source)
at java.base@17.0.7/java.util.concurrent.CompletableFuture.waitingGet(Unknown Source)
at java.base@17.0.7/java.util.concurrent.CompletableFuture.get(Unknown Source)
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.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1100)
at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:167)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$flushBatchResult$4(CompletionThreading.java:156)
...
Drawable renderer, waiting for a read lock (which it can't get, since the event thread is waiting for a write lock):
"ApplicationImpl pooled thread 969" prio=0 tid=0x0 nid=0x0 waiting on condition
java.lang.Thread.State: TIMED_WAITING
on com.intellij.openapi.application.impl.ReadMostlyRWLock@755c8fa3
at java.base@17.0.7/jdk.internal.misc.Unsafe.park(Native Method)
at java.base@17.0.7/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
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)
at com.android.tools.idea.rendering.DrawableRenderer$$Lambda$14320/0x000000080649a8e8.apply(Unknown Source)
...
Description
IDE hangs completely when attempting to autocomplete
R.drawable.
. When this happened, I was within a Kotlin file using Jetpack Compose.I'm unable to use
jst
(doesn't list a Studio process), and thestudio.bat
method fails because my user profile folder contains a whitespace. There, however, thread freeze auto dumps in my Studio logs folder which I have attached, that I hope are sufficient.