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

Another Command failed due to signal: Segmentation fault: 11 #260

Closed
liuxuan30 opened this issue Jul 31, 2015 · 3 comments
Closed

Another Command failed due to signal: Segmentation fault: 11 #260

liuxuan30 opened this issue Jul 31, 2015 · 3 comments

Comments

@liuxuan30
Copy link
Member

Today I was trying to upgrade to 2.1.2 from 2.1.0. When I tried to build, it throws:
Command failed due to signal: Segmentation fault: 11

1.  While emitting IR for source file /Users/xuan/Development/Charts/BDPLineChartView.swift
2.  While emitting class metadata for 'BDPLineChartView' at /Users/xuan/Development/Charts/BDPLineChartView.swift:12:8

It directs me to a function getHighlightByTouchPoint in BDPLineChartView. Below code works good in 2.1.0, I am not sure what goes wrong. I simply subclass LineChartView and override this function.

    public override func getHighlightByTouchPoint(var pt: CGPoint) -> ChartHighlight?
    {
        //judge is point in chart
        if (viewPortHandler.contentRect.origin.x > pt.x) {
            return nil
        } else {
            return super.getHighlightByTouchPoint(pt)
        }
    }
@danielgindi
Copy link
Collaborator

It's just not defined as "var" anymore...

@liuxuan30
Copy link
Member Author

maybe a silly mistake, but I don't get it yet... what var you are saying? I just try to add a small check before call super. The compiler don't complain it but throw segmentation fault while building...

@liuxuan30
Copy link
Member Author

Oh lord, I finally realize you are saying the 'var' in the parameters.... I didn't ever see it for the whole time.

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

2 participants