https://kotlinlang.org logo
t

Tolriq

01/11/2023, 8:20 PM
Is there something special when running baselineProfileGeneration about dependencies in the main app?
The app works fine with alpha 4 but when trying to generate the baseline it crash with:
Copy code
java.lang.ClassCastException: androidx.compose.ui.focus.FocusChangedModifierNode cannot be cast to androidx.compose.ui.focus.FocusPropertiesModifierNodeImpl
                                                                             	at androidx.compose.ui.focus.FocusPropertiesKt$focusProperties$$inlined$modifierElementOf$2.update(Unknown Source:41)
                                                                             	at androidx.compose.ui.node.NodeChain.updateNodeAndReplaceIfNeeded(Unknown Source:13)
                                                                             	at androidx.compose.ui.node.NodeChain.structuralUpdate(Unknown Source:851)
                                                                             	at androidx.compose.ui.node.LayoutNode.setModifier(Unknown Source:325)
                                                                             	at androidx.compose.ui.CombinedModifier$toString$1.invoke(SourceFile:58)
                                                                             	at androidx.compose.runtime.ComposerImpl$apply$operation$1.invoke(Unknown Source:20)
                                                                             	at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Unknown Source:59)
                                                                             	at androidx.compose.runtime.CompositionImpl.applyChanges(Unknown Source:5)
                                                                             	at androidx.compose.material3.CheckboxKt$CheckboxImpl$1$1.invoke(Unknown Source:205)
                                                                             	at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(Unknown Source:6)
                                                                             	at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(Unknown Source:47)
                                                                             	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229)
                                                                             	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
                                                                             	at android.view.Choreographer.doCallbacks(Choreographer.java:899)
                                                                             	at android.view.Choreographer.doFrame(Choreographer.java:827)
                                                                             	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
                                                                             	at android.os.Handler.handleCallback(Handler.java:942)
                                                                             	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                             	at android.os.Looper.loopOnce(Looper.java:201)
                                                                             	at android.os.Looper.loop(Looper.java:288)
                                                                             	at android.app.ActivityThread.main(ActivityThread.java:7872)
                                                                             	at java.lang.reflect.Method.invoke(Native Method)
                                                                             	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                                                             	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Ok so occurs on release builds too, probably a mix of things with R8 😞 Too late to debug now.
b

Ben Trengrove [G]

01/12/2023, 1:36 AM
This looks like a bug in the new focus modifier code. Could you please file an issue with that stacktrace and any reproduction steps?
t

Tolriq

01/12/2023, 6:18 AM
That's the plan for today.
So this is an R8 full mode issue or at least they will provide the info if some new rules are needed. Reported as https://issuetracker.google.com/issues/265188224
25 Views