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

Crashing on sharedQueue #4

Closed
wedgemartin opened this issue Nov 6, 2013 · 3 comments
Closed

Crashing on sharedQueue #4

wedgemartin opened this issue Nov 6, 2013 · 3 comments

Comments

@wedgemartin
Copy link

Bad access on sharedQueue shows as cause of crash. I was able to fix this by changing the sharedQueue method to alloc and init the NSMutableArray. The nextAlertView in CXAlertView.m also causes a problem when there's not a next alert view because it's not initialized at all, just declared as CXAlertView *nextAlertView, so this also throws a bad access error unless it's allocated. When I resolved both of those things, there is no more crashing and the alert is dismissed properly when I hit the cancel button.

Here's my change to the sharedQueue method:

pragma mark - CXAlertView PV

  • (NSMutableArray *)sharedQueue
    {
    if (!__cx_pending_alert_queue) {
    NSMutableArray *array = [[NSMutableArray alloc] init];
    __cx_pending_alert_queue = array;
    }
    return __cx_pending_alert_queue;
    }
@wedgemartin
Copy link
Author

Btw, it's very likely that this has to do with whether or not ARC is enabled or disabled. I am running with it completely disabled.

@ChrisXu
Copy link
Owner

ChrisXu commented Nov 7, 2013

Wedgemartin,

Thanks. I will check it ASAP. And I also consider to support non-arc this few days.

Chris.

@wedgemartin
Copy link
Author

Hey Chris! Thanks for the update. After we fixed the non-ARC issues, we ran into an issue where when we dispelled the alert view, there was a window overlapping the app, so we couldn’t interact with the app anymore. We were able to fix that by calling the setHidden on the alert window and the background window. Thanks for your support! Great SDK, Chris!

Wedge Martin
Co-Founder & Purveyor of Fine Cheese
wedge@arqetype.com
@wedgemartin
650-862-5520

On Nov 6, 2013, at 4:24 PM, Chris Xu notifications@github.com wrote:

Wedgemartin,

Thanks. I will check it ASAP. And I also consider to support non-arc this few days.

Chris.


Reply to this email directly or view it on GitHub.

@ChrisXu ChrisXu closed this as completed Apr 17, 2016
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

2 participants