Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS. Crash when exceeding some height value in vertically scrollable content of ModalBottomSheet #4937

Closed
DimaSidukov opened this issue Jun 6, 2024 · 2 comments
Assignees
Labels
bug Something isn't working ios

Comments

@DimaSidukov
Copy link

Describe the bug
If ModalBottomSheet has scrollable content and is shown on the screen, the following error occurs. Whether the scrolling started or not, the crash is happening on first composition of the composable. Important: ModalBottomSheet's content height must be a large number. Hard to tell the exact value.

-[MTLTextureDescriptorInternal validateWithDevice:]:1357: failed assertion `Texture Descriptor Validation
MTLTextureDescriptor has height (11700) greater than the maximum allowed size of 8192.

Affected platforms

  • iOS

Versions

  • Libraries:
    • Compose Multiplatform version: 1.6.10
  • Kotlin version: 2.0.0
  • OS version(s) (required for Desktop and iOS issues): 17.4
  • OS architecture (x86 or arm64): arm64
  • Device (model or simulator for iOS issues): iPhone 15 Pro iOS 17.4 Simulator (happens on other versions as well)

To Reproduce
Steps to reproduce the behavior:

  1. Run this code snippet:
ModalBottomSheet(
    onDismissRequest = { },
    content = {
        Column(
            modifier = Modifier
                .fillMaxSize()
                .verticalScroll(rememberScrollState())
        ) {
            Box(
                modifier = Modifier
                .fillMaxWidth().height(1000.dp)
                .background(Color.Black)
            )
            Box(
                modifier = Modifier
                    .fillMaxWidth().height(1000.dp)
                    .background(Color.Red)
            )
            Box(
                modifier = Modifier
                    .fillMaxWidth().height(1000.dp)
                    .background(Color.Green)
            )
        }
    },
    sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
)
  1. See error

Expected behavior
No crash should happen.

@DimaSidukov DimaSidukov added bug Something isn't working submitted labels Jun 6, 2024
@terrakok terrakok added ios and removed submitted labels Jun 6, 2024
@elijah-semyonov
Copy link
Contributor

Should be fixed by JetBrains/compose-multiplatform-core#1385

@okushnikov
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios
Projects
None yet
Development

No branches or pull requests

5 participants