-
Notifications
You must be signed in to change notification settings - Fork 77
EXC_BAD_ACCESS #82
Comments
I should say that I'm using the master branch of Classy from git. |
Seems to happen when I use the "iPhone 4s", "iPhone 5", and "iPad 2" simulators, but not "iPhone 5s", "iPhone 6 Plus", or "iPhone 6". |
I get a similar EXC_ACCESS error on line 118
It happens when I tap the "Cancel" button on a
makes the error go away. Only on iOS8 |
The same issue affect Classy 0.2.4 on iOS7/8 version.
|
It appears to me that the crash is caused by cas_alternativeParent
That said, I'm not sure how it got into this state. |
OK, I think I know what happened for me. The currentItem is a view that comes from another view controller. That view controller sets the cas_alternativeParent on the view to itself. Then I add the view to my view hierarchy. The view controller goes away because the cas_alternativeParent is a weak property. Later when trying to style the view there's a bad reference to its original view controller. |
Has anyone found a fix? If so please submit a PR and I will try merge into master. thanks! |
It's unclear with a good fix is. The issue is that cas_alternativeParent isn't safe. If the view controller that it refers to goes away then it becomes a bad reference. What I did to deal with it was to manually set my view's cas_alternativeParent to nil when I know that its original view controller is going away. |
Im seeing this only when a user dismisses a UIAlertView. The implementation of this has changed in iOS8. the offending controller seems to be _UIAlertShimPresentingViewController. If I switch to the new UIAlertController the issue goes away. The issue does not occur on iOS 7 |
Current crash logs reports that issue is only for iOS 7 devices. |
Hi guys, the issue exists on iOS 7 & 8. I just fixed it, hope it will be merged into master. https://www.dropbox.com/s/dkmzp8x4ymxdjz4/Classy-ios8-patch.zip?dl=0 |
@imoreapps can you create a pull request for your changes? This would be very helpful EDIT: did it for you |
Thanks mikeger. |
@latteier , a solution was merged into Classy. Can you close this issue? |
Glad to hear that it's fixed. |
I'm sometimes getting a crash with Classy
Not sure what other information you need.
line 122 of CAStyleSelector.m is higlighted
The text was updated successfully, but these errors were encountered: