ChartsOrg / ChartsOrg/Charts

A lot of exceptions and crashes on iOS 14

Open
#4,415 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Hi! I am using Charts for my mood tracking app Moodline. The app has a big scrollable chart which is made using `CATiledLayer`, `ScrollView` and `LineChart`. Everything works fine on iOS 13 but after updating to iOS 14 beta my app became super unstable: if you scroll a chart for some time it will crash. It is also hard for me to find out what exactly causes crashing: when I try debugging it crashes in many different places with different exceptions. Here are some of them:

**File**: AxisRendererBase.swift
**Line**: axis.entries.removeAll(keepingCapacity: true)
**Exception**: Thread 3: Fatal error: UnsafeMutablePointer.moveAssign(from:) with negative count

**File**: AxisRendererBase.swift
**Line**: axis.entries.reserveCapacity(labelCount)
**Exception**: Thread 2: EXC_BAD_ACCESS (code=1, address=0x10)
**Console**: 2020-07-13 10:14:45.656774+0300 Moodline[31178:3406517] libMobileGestalt MobileGestaltCache.c:166: Cache loaded with 4563 pre-cached in CacheData and 52 items in CacheExtra.

**File**: AxisRendererBase.swift
**Line**: axis.entries.append(Double(f))
**Exception**: Thread 12: Fatal error: UnsafeMutablePointer.initialize overlapping range

**File**: Platform+Accessibility.swift
**Line**: super.accessibilityFrame = containerView.convert(newValue, to: UIScreen.main.coordinateSpace)
**Exception**: Thread 21: signal SIGABRT

**File**: Platform+Accessibility.swift
**Line**: super.accessibilityFrame = containerView.convert(newValue, to: UIScreen.main.coordinateSpace)
**Exception**: Thread 21: signal SIGABRT

**File**: AxisBase.swift
**Line**: return valueFormatter?.stringForValue(entries[index], axis: self) ?? ""
**Exception**: Thread 7: Fatal error: Index out of range

If needed I can create an Xcode project to replicate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.