Fixed
Status Update
Comments
am...@google.com <am...@google.com> #2
Attaching logs for further investigation
jg...@google.com <jg...@google.com>
jg...@google.com <jg...@google.com>
an...@google.com <an...@google.com> #3
From the log:
2024-08-23 08:24:16,009 [70180461] INFO - sun.awt.AWTThreading - InvocationEvent has timed out (awaiting 2000 ms). Originated at java.desktop/sun.lwawt.macosx.CAccessibility.getAccessibleRole(Unknown Source)
2024-08-23 08:24:16,423 [70180875] WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 7314ms, details saved to /Users/bhergert/Library/Logs/Google/AndroidStudio2024.1/threadDumps-freeze-20240823-082414-AI-241.18034.62.2412.12169539-ComponentManagerImpl$getComponentAdapter$1.invoke-7sec
2024-08-23 08:24:21,005 [70185457] INFO - sun.awt.AWTThreading - InvocationEvent has timed out (awaiting 1023 ms). Originated at java.desktop/sun.lwawt.macosx.CAccessibility.accessibilityHitTest(Unknown Source)
2024-08-23 08:24:23,000 [70187452] INFO - sun.awt.AWTThreading - InvocationEvent has timed out (awaiting 1995 ms). Originated at java.desktop/sun.lwawt.macosx.CAccessibility.getAccessibleRole(Unknown Source)
2024-08-23 08:24:25,005 [70189457] INFO - sun.awt.AWTThreading - InvocationEvent has timed out (awaiting 2002 ms). Originated at java.desktop/sun.lwawt.macosx.CAccessibility.accessibilityHitTest(Unknown Source)
2024-08-23 08:24:25,256 [70189708] WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 8741ms, details saved to /Users/bhergert/Library/Logs/Google/AndroidStudio2024.1/threadDumps-freeze-20240823-082421-AI-241.18034.62.2412.12169539-AndroidPsiTreeChangeListener.computeModulesToInvalidateAttributeDefinitions-8sec
2024-08-23 08:24:28,006 [70192458] INFO - sun.awt.AWTThreading - InvocationEvent has timed out (awaiting 1245 ms). Originated at java.desktop/sun.lwawt.macosx.CAccessibility.accessibilityHitTest(Unknown Source)
2024-08-23 08:24:30,003 [70194455] INFO - sun.awt.AWTThreading - InvocationEvent has timed out (awaiting 1997 ms). Originated at java.desktop/sun.lwawt.macosx.CAccessibility.getAccessibleRole(Unknown Source)
2024-08-23 08:24:32,004 [70196456] INFO - sun.awt.AWTThreading - InvocationEvent has timed out (awaiting 1999 ms). Originated at java.desktop/sun.lwawt.macosx.CAccessibility.accessibilityHitTest(Unknown Source)
2024-08-23 08:24:33,614 [70198066] WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 8220ms, details saved to /Users/bhergert/Library/Logs/Google/AndroidStudio2024.1/threadDumps-freeze-20240823-082430-AI-241.18034.62.2412.12169539-HashMap.putVal-8sec
Do you still have the thread dumps in ~/Library/Logs/Google/AndroidStudio2024.1/
? If yes, can you please attach them?
Also, do you have any accessibility features enabled? Because I see various calls to java.desktop/sun.lwawt.macosx.CAccessibility
flagged for timeouts.
an...@google.com <an...@google.com> #4
Attached you can find all the thread dumps from that day.
Description
Hello, I found that calling
context.getSystemService(Context.VIBRATOR_SERVICE)
leads to a crash if run in the IDE preview, even in interactive preview, which is quite annoying when you have haptics linked to touch interaction for example.Why isn't that implemented as a no-op in the IDE, or implemented through speakers, or as a visual indicator to see when the vibrator is asked to be running?
All the details are below, have a good one!
Louis CAD
Jetpack Compose version: 1.2.1
Jetpack Compose component(s) used: IDE preview
Android Studio Build:
Kotlin version: 1.7.10
Steps to Reproduce or Code Sample to Reproduce:
LocalContext.current.getSystemService(Context.VIBRATOR_SERVICE)
in a@Composable
functionStack trace (if applicable):