Skip to content
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

Swift-2.0 branch runtime crashes after distributed on the TestFlight #390

Closed
reeyan opened this issue Sep 18, 2015 · 4 comments
Closed

Swift-2.0 branch runtime crashes after distributed on the TestFlight #390

reeyan opened this issue Sep 18, 2015 · 4 comments

Comments

@reeyan
Copy link

reeyan commented Sep 18, 2015

First of all thanks for the wonderful framework.
I have been using this framework since April and before to migrate swift-2.0 branch for to distribute using Xcode 7, there was no issue however after I switched and distributed for internal testing App just got crash as soon as try to open the view.
Funny thing is that there is no issue if I build from Xcode.
Do I need specific configuration on Xcode before to upload iTunes connect for swift2.0?
I'm using cocoapods however adding Charts project into my project have the same issue.
Crash log in the Xcode organizer doesn't give any clue.

@reeyan
Copy link
Author

reeyan commented Sep 18, 2015

For your information, I have tried with master branch however issue still persist.

@liuxuan30
Copy link
Member

sounds like a common issue other people had, the chart library is not bundled, could you try more? Like gather the device logs.

@reeyan
Copy link
Author

reeyan commented Sep 19, 2015

Hi Thanks for your comment.
I found the issue and solution. Short answer is that please turn Swift Optimization to "None" otherwise you will have an exception at the very last line of the code below.
Seems like there is Swift optimization bug in the Swift compiler.

public class CombinedChartView: BarLineChartViewBase
{
    /// the fill-formatter used for determining the position of the fill-line
    internal var _fillFormatter: ChartFillFormatter!

    /// enum that allows to specify the order in which the different data objects for the combined-chart are drawn
    @objc
    public enum CombinedChartDrawOrder: Int
    {
        case Bar
        case Bubble
        case Line
        case Candle
        case Scatter
    }

    public override func initialize()
    {
        super.initialize()

        _fillFormatter = BarLineChartFillFormatter(chart: self)
     }
}

Exception Message - Charts was compiled with optimization - stepping may behave oddly; variables may not be available.

@danielgindi
Copy link
Collaborator

Please file a bugreport to apple (bugreport.apple.com) about the optimization failure.
The optimization probably fails with the very specific combination of your code + Charts.framework.
It happens that the Swift compiler has bugs...

Also - you can try different optimization levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants