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

Command failed due to signal: Segmentation fault: 11 #2

Closed
ghost opened this issue Mar 23, 2015 · 5 comments
Closed

Command failed due to signal: Segmentation fault: 11 #2

ghost opened this issue Mar 23, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 23, 2015

Hi,

Firstly great initiative. I've been looking for a good charting library for sometime now. Highly appreciated. I tried testing this today and getting the above error. I'm trying this in Xcode Version 6.3 (6D520o).

It is happening at two files in the library. I'm posting the final error message for both of them

While emitting IR SIL function @_TFC6Charts21CombinedChartRenderer15createRenderersfS0_FT_T_ for 'createRenderers' at /ios-charts/Charts/Classes/Renderers/CombinedChartRenderer.swift:50:14

While emitting IR SIL function @_TFC6Charts19ChartLegendRenderer12renderLegendfS0_FT7contextCSo9CGContext6legendGSQCS_11ChartLegend__T_ for 'renderLegend' at /ios-charts/Charts/Classes/Renderers/ChartLegendRenderer.swift:104:12

Can you let me know how to get rid of those ?

Tried :

  1. When I comment out the switch cases in the respective functions (createRenderers, renderLegend) it compiles fine. Although I hardly think it's a solution.
PhilJay added a commit that referenced this issue Mar 23, 2015
@PhilJay
Copy link
Collaborator

PhilJay commented Mar 23, 2015

I tried applying a quick fix.
I think it has something to do with using the ? instead of the !.

In case it doesn't work now, try avoiding the ? whenever possible.
As far as I know Daniel will not be available until next week, so this issue will have to wait until then since I am not 100% familiar with his code and do not want to make any greater changes :-)

This is what I found on the web: http://stackoverflow.com/questions/24222644/swift-compiler-segmentation-fault-when-building

@ghost
Copy link
Author

ghost commented Mar 23, 2015

Thank you PhilJay. I'll try the suggestions.

@danielgindi
Copy link
Collaborator

Well actually sometimes the ? is necessary if you want to avoid a nil check, as ! unwraps and assumes there's a value, but the ? is an optional.

For me of course it compiled well, but Xcode currently crashes sometimes during compilation of Swift, which is what you are experiencing.
It is expected to be fixed when Swift 1.2 is final...
I hope so at least.

@danielgindi
Copy link
Collaborator

I'm training currently but will try to reproduce the crash when I come back. The iPhone can't run Xcode... yet

@danielgindi
Copy link
Collaborator

Compilations seem to pass through fine in latest Xcode with Phil's fix

bivanov added a commit to bivanov/Charts that referenced this issue Dec 14, 2018
kscheff pushed a commit to kscheff/Charts that referenced this issue Jul 16, 2021
…ght_fails

Fixes 4647 edge case resulting in OOB
mpujol pushed a commit to redfin/Charts that referenced this issue Aug 26, 2022
huy-ras pushed a commit to huy-ras/Charts that referenced this issue Feb 9, 2023
…r-refactored

refactor: support multiple bar items only displaying 1 marker in a mo…
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