-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Crash on PieChartRenderer line 833 #4001
Comments
hi i'm also having this issue when using version 3.3.0 accessibleChartElements.insert(contentsOf: highlightedAccessibleElements, at: 1) |
@username199327 I submitted a PR to hopefully work around this issue: If you're able to replicate this bug consistently, I'd love to retrace your steps and confirm the PR works. The best evidence I currently have to identify the underlying cause is that all the crashed devices were low on memory at the time. Specifically at 2% - 3% free RAM. |
Thanks! But have to wait a few days - really busy recently. Have to understand what's wrong first |
i have no idea on how to fully replicate it, but i manage to avoid it maybe? |
Fixed in latest commit. Marking closed. |
What did you do?
I'm seeing two crash reports failing on the same line of PieChartRenderer from different users with different devices. This could be memory or timing-related, and I'm writing in the hopes that we can either find a way to replicate this issue or wrap defensive code around the line that's crashing.
What did you expect to happen?
I'd like PieChartView to do safety-checks before unsafe array operations to prevent hard-crashes. Even in case of misconfiguration, error logs would be preferred over hard crashes.
What happened instead?
Hard crash. Stack trace below.
Charts Environment
Charts version/Branch/Commit Number: v3.3.0
Xcode version: 10.2.1 (10E1001)
Swift version: 5
Platform(s) running Charts: 12.2.0 (16E227)
macOS version running Xcode: 10.14.4 (18E226)
Suggested workaround
Add a defensive if statement around the following unsafe insert:
PieChartRenderer.swift:833
Pull request: #4006
Stack Trace
Relevant Project Code
For the sake of completeness, I'm including all of my project code that interacts with Charts below. This code seems to work fine during testing and I'm unable to replicate the crash, leading me to believe the underlying problem related to environment conditions such as low memory. Crash reports also seem to indicate that the devices that crashed were low on memory at the time.
The text was updated successfully, but these errors were encountered: