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

OS X crash. #136

Closed
VladislavShchegolev opened this issue Oct 26, 2018 · 7 comments
Closed

OS X crash. #136

VladislavShchegolev opened this issue Oct 26, 2018 · 7 comments

Comments

@VladislavShchegolev
Copy link

Steps to reproduce the issue

  1. Just create an instance of SVGImageView

let svgImageView = SVGImageView()

From the crash report:
Crashing on exception: Views must return a valid layer from -makeBackingLayer.

Specifications

  • PocketSVG Version: 2.4.1 - newest
  • Xcode Version: 9.2
  • macOS Version: 10.14
@arielelkin
Copy link
Collaborator

Hi @VladislavShchegolev

I'm unable to reproduce this. I have the same Xcode and PocketSVG versions, tried running the Demo-macOS target in PocketSVG/Demos/Demos.xcworkspace which also creates an instance of SVGImageView.

Are you getting the same crash when running Demo-macOS?

@arielelkin
Copy link
Collaborator

closing due to inactivity. feel free to reopen.

@VladislavShchegolev
Copy link
Author

screenshot 2018-12-04 at 09 51 40
It is not crashing now (2.4.2) but the error is the same

Views must return a valid layer from -makeBackingLayer.

@arielelkin
Copy link
Collaborator

Again, I'm unable to reproduce this. Can you reproduce it from a clean clone of the project?

@gabor-nemeth
Copy link

I also experience this issue, even with a clean clone. It gets fixed, if you change the order of these lines. makeBackingLayer is called by self.wantsLayer = YES and _svgLayer is nil at this time.
The same is true for the initWithCoder method.

I use XCode 10.1 on OS X 10.14.

@arielelkin
Copy link
Collaborator

@gabor-nemeth @VladislavShchegolev

I am able to reproduce it now.

I'm submitting a PR with the fix, you're welcome to review and comment:
#149

@arielelkin
Copy link
Collaborator

closed via #149

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

3 participants