Status Update
Comments
wd...@google.com <wd...@google.com>
di...@google.com <di...@google.com> #2
jb...@gmail.com <jb...@gmail.com> #3
mo...@gmail.com <mo...@gmail.com> #4
Android 11 samsung c9pro
jl...@google.com <jl...@google.com> #5
It looks like jvmti->GetMethodName(methodId, &name, nullptr, nullptr)
returns a nullptr
for name without returning an error.
Slightly surprising. I will add a nullptr guard to avoid this.
It would be nice to find out what the kotlin code that causes looks like. It will be a lambda expression.
mo...@gmail.com <mo...@gmail.com> #6
Okay, I did some testing and found out that this code crashes the app while using Layout Inspector. Once I removed all the parameters of ModalBottomSheetState
(or of my wrapper *UiState
class with ModalBottomSheetState
in constructor) – it began to work fine.
I have other crashes on second screen and there are no functions with parameter ModalBottomSheetState
. That screen has much more functions and I will need more time to find the cause.
At least it's safe to say that this the crash is not caused by ModalBottomSheetState
exclusively
jl...@google.com <jl...@google.com> #7
Great, thanks. I will take a look.
jl...@google.com <jl...@google.com> #8
PS: You mention that there are other crashes on the second screen.
If logcat shows the same lines like #2 i.e.
```
.../apex/com.android.runtime/lib64/bionic/libc.so (__strncmp_aarch64+252)
.../libcompose_inspection_jni.so (compose_inspection::analyzeLines(_jvmtiEnv*, int, _jvmtiLineNumberEntry*, int, _jvmtiLocalVariableEntry*, int*, int*)
.../libcompose_inspection_jni.so (compose_inspection::resolveLocation(_JNIEnv*, _jclass*)
```
then it is likely the same bug.
If crash looks different in logcat, it is likely a different bug: Please create a new bug (you could update this bug with a link to the new bug. Then I will see the new bug before the it goes through triaging).
Thank you so much for reporting.
mo...@gmail.com <mo...@gmail.com> #9
Tested Compose 1.3.0-alpha03 with my project. Layout inspector works like a charm now Thank you for the fix
jl...@google.com <jl...@google.com> #10
Thank you for reporting the bug and about the bug fix.
ke...@gmail.com <ke...@gmail.com> #11
I found an issue may related to this.
Detail is here 244376735.
Description
Shortly after launch, layout inspector crashes the app within first 10 seconds. Sometimes it may stay for longer, until I click some view for inspection. The crash occurs regardless of the device I use: Samsung Tab S6 Lite (API 31), Android Emulator (API 32) and Pixel 4 (API 33). For some reason this issue is specific to my project and I wasn't able to create a reproducible test project for you. I've attached logs from devices and a thread dump from Android Studio.
I would be grateful for any insight on where to look for the problem.
P.S. Also, I can't file an issue under Android Studio > Design Tools > Layout Inspector category.