sentry-demos / ios

iOS Empower Plant
1 stars 4 forks source link

fix: dont compute so many fibonacci numbers #90

Closed armcknight closed 3 months ago

armcknight commented 6 months ago

I tried running the demo on an iPhone 14, and it crashes with an arithmetic overflow when computing around the 650th fibonacci number. It is probably due to running an optimized build? Doubt it's due to the different device, since both my phone and mac are running an apple silicon arm chip.

Just dialing down the limit from 4000 to 500 fib numbers fixed it.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 39.526%. Comparing base (75800b2) to head (598f80c).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/sentry-demos/ios/pull/90/graphs/tree.svg?width=650&height=150&src=pr&token=2LCMV5RRHY&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos)](https://app.codecov.io/gh/sentry-demos/ios/pull/90?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos) ```diff @@ Coverage Diff @@ ## master #90 +/- ## ============================================= + Coverage 37.655% 39.526% +1.870% ============================================= Files 10 10 Lines 802 802 Branches 255 255 ============================================= + Hits 302 317 +15 + Misses 492 476 -16 - Partials 8 9 +1 ``` | [Files](https://app.codecov.io/gh/sentry-demos/ios/pull/90?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos) | Coverage Δ | | |---|---|---| | [EmpowerPlant/EmpowerPlantViewController.swift](https://app.codecov.io/gh/sentry-demos/ios/pull/90?src=pr&el=tree&filepath=EmpowerPlant%2FEmpowerPlantViewController.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos#diff-RW1wb3dlclBsYW50L0VtcG93ZXJQbGFudFZpZXdDb250cm9sbGVyLnN3aWZ0) | `61.172% <0.000%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/sentry-demos/ios/pull/90/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/sentry-demos/ios/pull/90?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/sentry-demos/ios/pull/90?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos). Last update [75800b2...598f80c](https://app.codecov.io/gh/sentry-demos/ios/pull/90?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sentry-demos).