question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐞 App crash after reopening BottomSheet modal 😱πŸ₯Ί

See original GitHub issue

Hey there, amazing 49ers! πŸ€ πŸ‘‹

I hope you’re having a fantastic day! πŸ˜ƒ I’ve stumbled upon a πŸ› that’s causing our app to crash, and I could really use your expertise to squash it. πŸ™

Steps to reproduce the issue πŸ•΅οΈβ€β™€οΈ:

  1. Create a button that, when clicked, opens the BottomSheet modal with the following code:
var page = new DataPickerBottomSheetPage();
page.IsModal = true;
page.ShowHandle = true;
page.Cancelable = true;
page.Show(Window);
  1. Click on the button πŸ–±οΈ and behold the modal in all its glory! 🌟
  2. Dismiss the BottomSheet modal by pulling it down like a fancy window blind πŸ“‰
  3. Click on the same button again to reopen the modal πŸ”„ πŸ’₯ Boom! The app goes down like a house of cards πŸƒπŸ 

Expected behavior 🧐:

The app should allow us to open and close the BottomSheet modal as many times as our hearts desire, without any crashes. πŸ˜πŸ”„

Actual behavior 😡:

The app crashes when we try to reopen the BottomSheet modal after dismissing it. πŸ˜’πŸ’”

Environment 🌍:

Specification Details
Device Model Android Emulator - Pixel 5
Operating System Android 13
BottomSheet Version 1.0.0-alpha4

I know you folks are wizards when it comes to fixing bugs like these! πŸ§™β€β™‚οΈ So, I’m sure this issue will be resolved in no time. Thanks in advance for your help! You’re the best! πŸ˜ŽπŸŽ‰

Keep up the fantastic work, and may the force be with you! πŸš€πŸŒŸ

Issue Analytics

  • State:closed
  • Created 6 months ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
paulvarachecommented, Apr 25, 2023

Hi,

1.0.0-alpha6 was just published and it removes the need to use DetentsCollection. It also fixes this issue

1reaction
paulvarachecommented, Apr 5, 2023

I have isolated the issue and will try to get a fix for it. In the meantime, a workaround is to use the DetentsCollection:

Replace

    <the49:BottomSheet.Detents>
        <the49:FullscreenDetent />
    </the49:BottomSheet.Detents>

With

<the49:BottomSheet.Detents>
        <the49:DetentsCollection>
            <the49:FullscreenDetent />
        </the49:DetentsCollection>
    </the49:BottomSheet.Detents>

And the problem goes away. Alternatively setting the Detents programmatically in the Code-Behind will also fix this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bottom sheet crashes app due to racing conditions with ...
I believe the issue is that the animated values are not fully set while the modal is opening or closing, and sometimes it...
Read more >
App crashes on theme changed when bottom sheet is ...
The problem is when I open the bottom sheet and then drag my notification shade to toggle the dark theme, my application crashes....
Read more >
ModalBottomSheetLayout crashes when rotating from ...
Steps to Reproduce or Code Sample to Reproduce: Open bottom sheet in landscape, move to halfExpanded; Rotate to portrait; App crashes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found