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

Library crashes when example is run with release build configuration (Xcode 11.4) #63

Closed
pepejeria opened this issue Apr 6, 2020 · 8 comments

Comments

@pepejeria
Copy link

pepejeria commented Apr 6, 2020

I was seeing this issue as well with my app, but have now found an easy way to reproduce:

  1. Check that you have the latest Xcode version, which currently is 11.4, earlier versions are fine
  2. Download sample project
  3. Edit the scheme ProgressRingExample to use the "release" build configuration (see screenshot)
  4. Connect an iPhone to your computer and select that device to run the app on

This will result in a crash: GradientGenerator.swift line 113:
let img = ctx.makeImage()!

Screen Shot 2020-04-06 at 16 26 07

@AndroidGecko
Copy link

I have the same issue

@AndroidGecko
Copy link

AndroidGecko commented Apr 7, 2020

The problem is within gradients. When not using gradients e.g.

let useGradient = startColor != endColor

in MKRingProgressLayer then crash does not occur.
so a temporary fix is to disable gradients by using the same start/end color.

@pepejeria pepejeria changed the title Library crashes when example is run with release build configuration Library crashes when example is run with release build configuration (Xcode 11.4) Apr 7, 2020
@adam-redboxmobile
Copy link

Setting the ring to have the same start and end colour fixed the crash for me.

@jzsoccer
Copy link

jzsoccer commented Apr 8, 2020

Thanks for the work around. Has anyone found a way to maintain the gradient? It drastically changes the look of my app without the gradient.

@pepejeria
Copy link
Author

pepejeria commented Apr 17, 2020

If you use this library in your app and want to push a new release: use Xcode 11.3.1

@filipjakubowski
Copy link

filipjakubowski commented Apr 20, 2020

If you use this library in your app and want to push a new release: use Xcode 11.3.1

It is not the best approach. I had high hopes for this but struggled with recompiling some external dependencies in older version of Swift :(

Maybe anyone have a fork that is fixed?

@ShMax92
Copy link

ShMax92 commented Apr 20, 2020

Guys, confirm bug on Xcode 11.4 && 11.4.1, the same problem. And that's so disappointing :(

If you use this library in your app and want to push a new release: use Xcode 11.3.1

Seems like an option for now.
Anyway look forward to be fixed soon.

@maxkonovalov
Copy link
Owner

Hi guys! The issue was caused by compiler optimizations in Xcode 11.4 - this is now fixed in version 2.2.3 🎉

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

7 participants