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

Problem with fadeOutTimer invalidate #84

Closed
kayzee opened this issue Jun 19, 2012 · 3 comments
Closed

Problem with fadeOutTimer invalidate #84

kayzee opened this issue Jun 19, 2012 · 3 comments

Comments

@kayzee
Copy link

kayzee commented Jun 19, 2012

I get an exception with the following line:

if(fadeOutTimer) {
[fadeOutTimer invalidate], fadeOutTimer = nil;
}

-[CALayer invalidate]: unrecognized selector sent to instance 0xad85fb0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayer invalidate]: unrecognized selector sent to instance 0xad85fb0'
*** First throw call stack: (0x1ad0022 0x1f67cd6 0x1ad1cbd 0x1a36ed0 0x1a36cb2 0x2ed49 0x2f9fd 0x17c7330 0x17c9509 0x1a07803 0x1a06d84 0x1a06c9b 0x22677d8 0x226788a 0x3d5626 0x298d 0x28f5)
terminate called throwing an exception(lldb)

EXC_BAD_ACCESS.

I believe the timer is already invalidated, but I'm not 100% certain.

I am calling:
[SVProgressHUD showSuccessWithStatus:@"File Transfer Complete"];
in my MainView
and then after opening a second view, I call
[SVProgressHUD showSuccessWithStatus:@"Preparing Environment"];
on viewDidAppear and then I get the exception.

If I comment out the lines:
if(fadeOutTimer) {
[fadeOutTimer invalidate], fadeOutTimer = nil;
}
the second showSuccessWithStatus will appear, but will not have any text.

Any ideas? I was using an old version of your project from pre-April 9 and upgraded to the latest version today.

@samvermette
Copy link
Contributor

@kayzee are you getting this crash using the latest version or the old version? Is your project using ARC? If not, did you add the proper compiler flags to SVProgressHUD.m?

@kayzee
Copy link
Author

kayzee commented Jun 20, 2012

@samvermette I am using the latest version of the source and my project is ARC. I will try the old version just to be sure it still works and is not something else in my project.

Otherwise I'm out of ideas for now.

@kayzee
Copy link
Author

kayzee commented Jun 20, 2012

I figured it out. Sorry but it was a dumb mistake on my part. My project is ARC, but I had the "-fno-objc-arc" flag set for this module so the previous version would work. I forgot to remove this flag.

@kayzee kayzee closed this as completed Jun 20, 2012
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