Hello, we've been working with the Swift Chart framework, and the BarMark chart has a memory problem/bug when using it on the iPhone with iOS 16.0 Developer Beta 3.
Problem
When using the BarMark chart on the simulator with fake values, the chart load, however if we try to load the data on the iPhone, the code breaks with this error: Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d153ff8).
This however does not happen when we change the chart type from BarMark to LineMark. Then all of the sudden, the chart loads on the iPhone.
Now, when the error hits, Xcode show that the memory usage is extremely high.
Working Code
High Memory usage and error
I've encountered the same problem (for BarMark, as well as some modifiers like chartYScale & chartPlotStyle). Turns out, the beta version on the device (iOS 16.0 beta 3) was ahead of Xcode-beta version (beta 1). Updating Xcode-beta to the latest beta 3 solved the issue.