-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Crash on zoom #931
Comments
please paste the stack trace when crashing. It's better if we know how to reproduce with ChartsDemo |
I'm assuming it's because of the move to Swift 2.2. @calkinssean If you can point us to which line of code produces the exception - it could be easily fixed. |
People expect strides to allow zero size - like any traditional `for` loop that would have just skipped. Adding an additional condition just for that makes the code messier. But moreover - Xcode itself expects it to allow `0` length stride. As Xcode automatically converts old `for` loops to strides, it actually **breaks** code that may in some cases have zero-length strides. ChartsOrg/Charts#931
Well the stride I know crashes- and you can see it in Stride's source |
I see that. the stride cannot be 0, but old c loop will has infinite loop. |
Why an infinite loop?
|
oops, my bad. I mean <= when I said infinite loop |
Oops - it's actually my bad, as I didn't see that it's a case of I'll have to look at the code again to make sure that the extra axis line is not missing in cases where last-first is an exact multiplication of interval. I'll also need to make tests for Swift Stride to make sure that there are no infinite loop cases. |
After running some tests I'm writing for the PR - it looks like the Swift precondition is meant for checking the |
We evolved from crash/not responding after a few minutes to crash directly :) |
Hi, if I zoom in too fast and far my app crashes. The error I am getting is fatal error: stride must not be zero. I noticed on your demo apps there seems to be a max zoom which eliminates this crash. I am wondering how I can implement this.
The text was updated successfully, but these errors were encountered: