JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.96k stars 1.16k forks source link

fonts.defaultFallback() must not be null #291

Closed alialbaali closed 3 years ago

alialbaali commented 3 years ago

Using TextField with empty string throws an exception

fun main() = Window {

    var text by remember { mutableStateOf("") }

    TextField(
        text,
        onValueChange = { text = it },
    )

}
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: fonts.defaultFallback() must not be null
    at androidx.compose.ui.text.platform.FontLoader.findTypeface$ui_text(DesktopFont.kt:301)
    at androidx.compose.ui.text.platform.ParagraphBuilder$defaultFont$2.invoke(DesktopParagraph.kt:738)
    at androidx.compose.ui.text.platform.ParagraphBuilder$defaultFont$2.invoke(DesktopParagraph.kt)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at androidx.compose.ui.text.platform.ParagraphBuilder.getDefaultFont$ui_text(DesktopParagraph.kt:736)
    at androidx.compose.ui.text.platform.ParagraphBuilder$defaultHeight$2.invoke(DesktopParagraph.kt:748)
    at androidx.compose.ui.text.platform.ParagraphBuilder$defaultHeight$2.invoke(DesktopParagraph.kt)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at androidx.compose.ui.text.platform.ParagraphBuilder.getDefaultHeight$ui_text(DesktopParagraph.kt:747)
    at androidx.compose.ui.text.platform.DesktopParagraph.getCursorRect(DesktopParagraph.kt:190)
    at androidx.compose.ui.text.MultiParagraph.getCursorRect(MultiParagraph.kt:446)
    at androidx.compose.ui.text.TextLayoutResult.getCursorRect(TextLayoutResult.kt:408)
    at androidx.compose.foundation.text.TextFieldScrollKt.getCursorRectInScroller(TextFieldScroll.kt:199)
    at androidx.compose.foundation.text.TextFieldScrollKt.access$getCursorRectInScroller(TextFieldScroll.kt)
    at androidx.compose.foundation.text.VerticalScrollLayoutModifier$measure$1.invoke(TextFieldScroll.kt:135)
    at androidx.compose.foundation.text.VerticalScrollLayoutModifier$measure$1.invoke(TextFieldScroll.kt)
    at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:67)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer-muyPCdA(Placeable.kt:301)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer(Placeable.kt:282)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer$default(Placeable.kt:277)
    at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier$measure$1.invoke(GraphicsLayerModifier.kt:212)
    at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier$measure$1.invoke(GraphicsLayerModifier.kt)
    at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:67)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeAutoMirrored-pOgwPa8(Placeable.kt:309)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative-z2mxYZE(Placeable.kt:150)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative(Placeable.kt:181)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative$default(Placeable.kt:180)
    at androidx.compose.foundation.layout.UnspecifiedConstraintsModifier$measure$1.invoke(Size.kt:820)
    at androidx.compose.foundation.layout.UnspecifiedConstraintsModifier$measure$1.invoke(Size.kt)
    at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:67)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeAutoMirrored-pOgwPa8(Placeable.kt:309)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative-z2mxYZE(Placeable.kt:150)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative(Placeable.kt:181)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative$default(Placeable.kt:180)
    at androidx.compose.foundation.layout.PaddingModifier$measure$1.invoke(Padding.kt:221)
    at androidx.compose.foundation.layout.PaddingModifier$measure$1.invoke(Padding.kt)
    at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:67)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.node.OuterMeasurablePlaceable.placeAt-rMeLuDI(OuterMeasurablePlaceable.kt:124)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeAutoMirrored-pOgwPa8(Placeable.kt:309)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative-z2mxYZE(Placeable.kt:150)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative(Placeable.kt:181)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative$default(Placeable.kt:180)
    at androidx.compose.material.TextFieldKt.placeWithoutLabel(TextField.kt:662)
    at androidx.compose.material.TextFieldKt.access$placeWithoutLabel(TextField.kt)
    at androidx.compose.material.TextFieldKt$IconsWithTextFieldLayout$2$1$1.invoke(TextField.kt:523)
    at androidx.compose.material.TextFieldKt$IconsWithTextFieldLayout$2$1$1.invoke(TextField.kt)
    at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:67)
    at androidx.compose.ui.node.LayoutNode$layoutChildren$1.invoke(LayoutNode.kt:926)
    at androidx.compose.ui.node.LayoutNode$layoutChildren$1.invoke(LayoutNode.kt)
    at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:131)
    at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui(OwnerSnapshotObserver.kt:78)
    at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui(OwnerSnapshotObserver.kt:59)
    at androidx.compose.ui.node.LayoutNode.layoutChildren(LayoutNode.kt:910)
    at androidx.compose.ui.node.LayoutNode.onNodePlaced$ui(LayoutNode.kt:898)
    at androidx.compose.ui.node.InnerPlaceable.placeAt-rMeLuDI(InnerPlaceable.kt:117)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeAutoMirrored-pOgwPa8(Placeable.kt:309)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative-z2mxYZE(Placeable.kt:150)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative(Placeable.kt:181)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative$default(Placeable.kt:180)
    at androidx.compose.foundation.layout.SizeModifier$measure$1.invoke(Size.kt:718)
    at androidx.compose.foundation.layout.SizeModifier$measure$1.invoke(Size.kt)
    at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:67)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.node.OuterMeasurablePlaceable.placeAt-rMeLuDI(OuterMeasurablePlaceable.kt:124)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place(Placeable.kt:203)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place$default(Placeable.kt:203)
    at androidx.compose.ui.platform.DesktopSelectionKt$Wrap$1$1.invoke(DesktopSelection.kt:52)
    at androidx.compose.ui.platform.DesktopSelectionKt$Wrap$1$1.invoke(DesktopSelection.kt)
    at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:67)
    at androidx.compose.ui.node.LayoutNode$layoutChildren$1.invoke(LayoutNode.kt:926)
    at androidx.compose.ui.node.LayoutNode$layoutChildren$1.invoke(LayoutNode.kt)
    at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:131)
    at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui(OwnerSnapshotObserver.kt:78)
    at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui(OwnerSnapshotObserver.kt:59)
    at androidx.compose.ui.node.LayoutNode.layoutChildren(LayoutNode.kt:910)
    at androidx.compose.ui.node.LayoutNode.onNodePlaced$ui(LayoutNode.kt:898)
    at androidx.compose.ui.node.InnerPlaceable.placeAt-rMeLuDI(InnerPlaceable.kt:117)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer-muyPCdA(Placeable.kt:301)
    at androidx.compose.ui.node.OuterMeasurablePlaceable.placeAt-rMeLuDI(OuterMeasurablePlaceable.kt:126)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeAutoMirrored-pOgwPa8(Placeable.kt:309)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelativeWithLayer-muyPCdA(Placeable.kt:238)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelativeWithLayer(Placeable.kt:262)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelativeWithLayer$default(Placeable.kt:257)
    at androidx.compose.ui.layout.RootMeasureBlocks$measure$2.invoke(RootMeasureBlocks.kt:43)
    at androidx.compose.ui.layout.RootMeasureBlocks$measure$2.invoke(RootMeasureBlocks.kt)
    at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:67)
    at androidx.compose.ui.node.LayoutNode$layoutChildren$1.invoke(LayoutNode.kt:926)
    at androidx.compose.ui.node.LayoutNode$layoutChildren$1.invoke(LayoutNode.kt)
    at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1710)
    at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
    at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui(OwnerSnapshotObserver.kt:78)
    at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui(OwnerSnapshotObserver.kt:59)
    at androidx.compose.ui.node.LayoutNode.layoutChildren(LayoutNode.kt:910)
    at androidx.compose.ui.node.LayoutNode.onNodePlaced$ui(LayoutNode.kt:898)
    at androidx.compose.ui.node.InnerPlaceable.placeAt-rMeLuDI(InnerPlaceable.kt:117)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE$default(Placeable.kt:214)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper$performMeasure$1.placeChildren(DelegatingLayoutNodeWrapper.kt:114)
    at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.placeAt-rMeLuDI(DelegatingLayoutNodeWrapper.kt:102)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.place-z2mxYZE(Placeable.kt:215)
    at androidx.compose.ui.node.OuterMeasurablePlaceable.placeAt-rMeLuDI(OuterMeasurablePlaceable.kt:124)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeApparentToRealOffset-pOgwPa8(Placeable.kt:324)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeAutoMirrored-pOgwPa8(Placeable.kt:309)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative-z2mxYZE(Placeable.kt:150)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative(Placeable.kt:181)
    at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative$default(Placeable.kt:180)
    at androidx.compose.ui.node.LayoutNode.place$ui(LayoutNode.kt:789)
    at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout(MeasureAndLayoutDelegate.kt:217)
    at androidx.compose.ui.platform.DesktopOwner.measureAndLayout(DesktopOwner.kt:161)
    at androidx.compose.ui.platform.DesktopOwners.onFrame(DesktopOwners.kt:82)
    at androidx.compose.ui.platform.DesktopOwners$onFrame$1.invokeSuspend(DesktopOwners.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Failed requirement.
    at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout(MeasureAndLayoutDelegate.kt:194)
    at androidx.compose.ui.platform.DesktopOwner.measureAndLayout(DesktopOwner.kt:161)
    at androidx.compose.ui.platform.DesktopOwner.onPointerMove-k-4lQ0M$ui(DesktopOwner.kt:247)
    at androidx.compose.ui.platform.DesktopOwners.onMouseMoved(DesktopOwners.kt:134)
    at androidx.compose.desktop.ComposeLayer$initCanvas$3$mouseMoved$1.invoke(ComposeLayer.kt:183)
    at androidx.compose.desktop.ComposeLayer$initCanvas$3$mouseMoved$1.invoke(ComposeLayer.kt)
    at androidx.compose.desktop.AWTDebounceEventQueue$job$1.invokeSuspend(AWTDebounceEventQueue.kt:58)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

OS: Windows 10 20H2 JDK : 11 Compose : 0.3.0-build141 Kotlin: 1.4.21

ghasemdev commented 3 years ago

I have the same problem using TextField

prepor commented 3 years ago

@jakode2020 @alialbaali on what OS are you experiencing this bug?

alialbaali commented 3 years ago

Windows 10 20H2

Dominaezzz commented 3 years ago

I've just encountered this on Arch Linux

wen-flower commented 3 years ago

Is there a solution now? version:0.3.0-build141

maxxxbar commented 3 years ago

Is there a solution now? version:0.3.0-build141

textStyle = TextStyle(fontFamily = FontFamily.Serif)

wen-flower commented 3 years ago

Is there a solution now? version:0.3.0-build141

textStyle = TextStyle(fontFamily = FontFamily.Serif)

Thank you.

prepor commented 3 years ago

Yes, the workaround is always to specify a font. A proper fix is already pushed https://android-review.googlesource.com/c/platform/frameworks/support/+/1557192

prepor commented 3 years ago

@twtangwentw @alialbaali @Dominaezzz could you please try it with 0.3.0-build143? Please, feel free to reopen this issue if the problem is still here

okushnikov commented 2 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.