-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
BasicAlertDialog
Crash iOS with OOM (Memory Leak)
#4852
Comments
Hello! |
Yeah we're working on deploying a hot fix to users once that's done I'll create a sample for y'all |
Added Trace, easy to reproduce, any dialog with scrollable content, scroll SLOWLY and you'll eventually run out of memory |
Unfortunately, I wasn't able to successfully reproduce this crash. Memory usage on a small project from template was about 70 mb and didn't increase no matter how I scrolled. |
Dang, OK, will try and create a sample project. Sorry about that |
Oh just checking this ONLY happens on a physical device, simulators are fine (faster/more ram from host machine) |
@mazunin-v-jb As requested: Launch app on physical iPhone, open dialog, scroll slowly (will be jerky vs previous versions) and then will suddenly crash. I should have noted it was the |
BasicAlertDialog
Crash iOS with OOM (Memory Leak)
Nvm mind, I tested on the foundation |
@chrisjenx many thanks! |
Oh good, maybe a placebo, but 1.6.10 doesn't feel as smooth as 1.6.0 potentially related if it's over drawing, leaking, etc |
@mazunin-v-jb I will give 1.6.11 ago, I'm wondering if this was the cause of the OOM JetBrains/compose-multiplatform-core#1355 |
Tested 1.6.11, still crashing for me. Looks like it's something else :( (It's actually worse after some more testing) |
Initial testing, looks like JetBrains/compose-multiplatform-core#1390 fixed it, just running profiling now. |
So far looks like peak memory usage is 90mb on the demo project, no more OOM crashes, still churning memory but at least not exploding. |
Looks like this is resolved |
Describe the bug
Since 1.6.10x, m3
BasicAlertDialog
s with lots of content will recompose and leak memory causing out of memory crashes on iOS.iOS will throw
didReceiveMemoryWarning
then crash:More diagnostics to follow once got a sample project for you.
Affected platforms
Versions
To Reproduce
More to follow, but full screen dialogs will recompose unconditionally and crash (will try and create a reproduction project for you)
Steps to reproduce the behavior:
Expected behavior
Don't OOM and crash on iOS
Screenshots
![Screenshot 2024-05-22 at 5 38 33 PM](https://private-user-images.githubusercontent.com/1167793/332989551-047c1c60-149f-4a07-9708-6abf3a045901.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MDk2NTIsIm5iZiI6MTcyNDYwOTM1MiwicGF0aCI6Ii8xMTY3NzkzLzMzMjk4OTU1MS0wNDdjMWM2MC0xNDlmLTRhMDctOTcwOC02YWJmM2EwNDU5MDEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjVUMTgwOTEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjlkYzFmZTQ3NjJiZDJmNWZjZWI1NmYxYzMzMWI0Yjg3NzEzOWYyMjVhNzhiYWYwNTJmMjk4MmRmMjdlMWVmNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.R9aEj9iONOkzAJ8ljUl0rFS9CjO9h4bwsHnxYpye7Z4)
Additional context
I thought it was related to Kotlin 2.x but downgraded and still an issue, downgraded CMP to 1.6.1 and now not crashing.
Link to trace from Profling iOS App, looks like a Skia Canvas draw leak in 1.6.10. If you stop moving it will dealloc the objects, but scrolling slowly will not release quick enough.
https://drive.google.com/drive/folders/1UUPOyAWaeg7uTKaXc5EMCp-03jSy4hrk?usp=sharing
The text was updated successfully, but these errors were encountered: