Status Update
Comments
ti...@google.com <ti...@google.com>
co...@google.com <co...@google.com>
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
ma...@google.com <ma...@google.com>
ja...@gmail.com <ja...@gmail.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
ap...@google.com <ap...@google.com> #4
-
Second crash in the description is from a real device. Experienced it myself on two different Xiaomi phones, plus lots of crashes from users in the Google Play console.
-
Dynamic features are not used in the application.
As a wild guess, I have downgraded build tools from 31.0.0 to 30.0.3, compileSdk from 31 to 30, and moved all work with Language ID to the service in a separate process (just to be sure that crash can kill secondary process instead of main). This combination is in beta for 2 days by now and I don't see any SIGSEGV crashes.
ma...@google.com <ma...@google.com>
vi...@gmail.com <vi...@gmail.com> #5
Hmm, I feel the crash might be something related to separate/secondary process.
I also changed compileSdk and targetSDK to 31 but still cannot repro this issue.
Description
compose-bom = "2023.06.01"
compose-compiler = "1.5.1"
Jetpack Compose component(s) used:
DropdownMenu
Android Studio Build:
Android Studio Giraffe | 2022.3.1
Kotlin version:
1.9.0
Emulator version:
33.1.6
Emulated device:
Pixel 4 (33 api) + google services
Steps to Reproduce or Code Sample to Reproduce:
With i use y offset value from -127.dp to -231.dp DropdownMenu draw in incorrect location
Sample
```
import android.util.Log
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.DropdownMenu
import androidx.compose.material.DropdownMenuItem
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.DpOffset
import androidx.compose.ui.unit.dp
@Composable
private fun Test() {
var expanded by remember {
mutableStateOf(false)
}
var yOffset by remember {
mutableStateOf((-125).dp)
}
Box(
modifier = Modifier
.fillMaxSize()
.clickable {
yOffset -= 1.dp
expanded = true
},
contentAlignment = Alignment.Center,
) {
Text(text = "Current offset: $yOffset")
val menuOffset = remember(yOffset) {
DpOffset(200.dp, yOffset).also {
Log.d("TestOffset", "OFFSET = $it")
}
}
DropdownMenu(
expanded = expanded,
offset = menuOffset,
onDismissRequest = { expanded = false },
) {
DropdownMenuItem(onClick = { /*TODO*/ }) {
Text(text = "Item 1")
}
DropdownMenuItem(onClick = { /*TODO*/ }) {
Text(text = "Item 2")
}
DropdownMenuItem(onClick = { /*TODO*/ }) {
Text(text = "Item 3")
}
}
}
}
@Preview
@Composable
fun TestPreview() {
Test()
}
```