Assigned
Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #2
Same exact crash occurs on canary:
Android Studio Jellyfish | 2023.3.1 Canary 1
Build #AI-233.13135.103.2331.11247450, built on December 21, 2023
Runtime version: 17.0.9+0--11185874 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4086M
Cores: 12
Registry:
debugger.watches.in.variables=false
Non-Bundled Plugins:
com.github.drjacky.avocado (3.2.2)
cn.jxzhang.plugin.json-formatter (1.4)
com.intellij.marketplace (233.13135.108)
Show As ... (1.0.3)
String Manipulation (9.12.0)
GenerateSerialVersionUID (3.0.3)
idea.plugin.protoeditor (233.13135.65)
com.steve.plugins.autoscroll (1.1)
com.dethlex.numberconverter (2.0.0)
izhangzhihao.rainbow.brackets (2023.3.9-233)
com.ppismerov.ksvu (0.0.1)
net.aquadc.mike.plugin (0.31)
com.developerphil.adbidea (1.6.13)
GenerateSerializationHelpers (1.0.6)
Android Studio Jellyfish | 2023.3.1 Canary 1
Build #AI-233.13135.103.2331.11247450, built on December 21, 2023
Runtime version: 17.0.9+0--11185874 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4086M
Cores: 12
Registry:
debugger.watches.in.variables=false
Non-Bundled Plugins:
com.github.drjacky.avocado (3.2.2)
cn.jxzhang.plugin.json-formatter (1.4)
com.intellij.marketplace (233.13135.108)
Show As ... (1.0.3)
String Manipulation (9.12.0)
GenerateSerialVersionUID (3.0.3)
idea.plugin.protoeditor (233.13135.65)
com.steve.plugins.autoscroll (1.1)
com.dethlex.numberconverter (2.0.0)
izhangzhihao.rainbow.brackets (2023.3.9-233)
com.ppismerov.ksvu (0.0.1)
net.aquadc.mike.plugin (0.31)
com.developerphil.adbidea (1.6.13)
GenerateSerializationHelpers (1.0.6)
ju...@google.com <ju...@google.com>
jg...@google.com <jg...@google.com>
ps...@google.com <ps...@google.com>
ps...@google.com <ps...@google.com> #3
I have fixed the crash. The fix will be available in JellyFish Canary 4.
I will keep this issue open because I noticed Layout Inspector struggles to connect using auto-connect if the Activity is immediately finished.
lb...@gmail.com <lb...@gmail.com> #4
@3 Have you also fixed the issue that it's impossible to even use the inspector at all in this case?
Description
STEPS TO REPRODUCE:
1. Run your app that is currently using SAW (system alert window) permission, floating over other apps.
You can try the attached project too (add "-g" to grant permission), which just shows a large layout on top, that upon clicking it, it closes.
2. While the UI is floating, try to use layout inspector
The bug is that not only that it failed to inspect anything, but it also crashed the app.
Tested on emulator API 34.
The logs are :
java.lang.UnsupportedOperationException: Tried to obtain display from a Context not associated with one. Only visual Contexts (such as Activity or one created with Context#createWindowContext) or ones created with Context#createDisplayContext are associated with displays. Other types of Contexts are typically related to background entities and may return an arbitrary display.
at android.app.ContextImpl.getDisplay(ContextImpl.java:3025)
at android.content.ContextWrapper.getDisplay(ContextWrapper.java:1192)
at android.content.ContextWrapper.getDisplay(ContextWrapper.java:1192)
at com.android.tools.agent.appinspection.proto.ViewExtensionsKt.getDefaultDisplay(ViewExtensions.kt:255)
at com.android.tools.agent.appinspection.proto.ViewExtensionsKt.isRunningInMainDisplay(ViewExtensions.kt:203)
at com.android.tools.agent.appinspection.proto.ViewExtensionsKt.createAppContext(ViewExtensions.kt:154)
at com.android.tools.agent.appinspection.CaptureExecutor.sendLayoutEvent(CaptureExecutor.kt:173)
at com.android.tools.agent.appinspection.CaptureExecutor.executeCapture(CaptureExecutor.kt:145)
at com.android.tools.agent.appinspection.CaptureExecutor.access$executeCapture(CaptureExecutor.kt:42)
at com.android.tools.agent.appinspection.CaptureExecutor$execute$1.run(CaptureExecutor.kt:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
...
------------------
Studio Build:
Version of Gradle Plugin:
Version of Gradle:
Version of Java:
OS:
Android Studio Hedgehog | 2023.1.1
Build #AI-231.9392.1.2311.11076708, built on November 9, 2023
Runtime version: 17.0.7+0-b2043.56-10550314 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4086M
Cores: 12
Registry:
external.system.auto.import.disabled=true
debugger.watches.in.variables=false
ide.text.editor.with.preview.show.floating.toolbar=false
Non-Bundled Plugins:
com.github.drjacky.avocado (3.2.2)
Show As ... (1.1.1)
cn.jxzhang.plugin.json-formatter (1.4)
com.intellij.marketplace (231.9392.3)
String Manipulation (9.12.0)
GenerateSerialVersionUID (3.0.3)
idea.plugin.protoeditor (231.9225.5)
com.steve.plugins.autoscroll (1.1)
com.dethlex.numberconverter (2.0.0)
izhangzhihao.rainbow.brackets (2023.3.7)
com.ppismerov.ksvu (0.0.1)
net.aquadc.mike.plugin (0.31)
com.developerphil.adbidea (1.6.11)
GenerateSerializationHelpers (1.0.6)