Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3227012
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:31:29+00:00 2026-05-17T16:31:29+00:00

Application : It has 3 views Views A,B,C. There is a Alert on View

  • 0

Application :

It has 3 views Views A,B,C.
There is a Alert on View B with 2 buttons on it.

What I do is:

I go from View A to View B. On B, I click on the Alert button to take me back on View A.

Problem:

When i click on the button to again go to View B then it gives an error related to “isValid” property of timer. Timer is declared and used in View B
In Other cases, when i use custom button to switch between A & B then it works fine.

The Line where i get Error:
BOOL dec = [timer isValid];

What could be Wrong??


THE CODE FOR ALERT VIEW BUTTON TO SWITCH VIEWS IS

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{

        if(buttonIndex == 0)
        {
             [self dismissModalViewControllerAnimated:YES];
          }
 }

THE CODE WHERE THE PROBLEM OCCURS WHEN SWITCHING BACK TO SAME VIEW IS

 -(void)viewWillAppear:(BOOL)animated
 {

        BOOL dec = [timer isValid];

        NSLog(@"TIMER CHECK");

       if (dec == YES)
       {
           [timer invalidate];
       }    
 }

ERROR THAT IS DISPLAYED IN NSLOG IS :

 -[__NSCFType isValid]: unrecognized selector sent to instance 0x5996870
2010-10-04 15:49:00.630 sqlite[5263:207] *** Terminating app due to uncaught exception     'NSInvalidArgumentException', reason: '-[__NSCFType isValid]: unrecognized selector sent to   instance 0x5996870'
 *** Call stack at first throw:
(
    0   CoreFoundation                      0x023e9919 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x025665de objc_exception_throw + 47
    2   CoreFoundation                      0x023eb42b -[NSObject(NSObject) does    NotRecognizeSelector:] + 187
    3   CoreFoundation                      0x0235b116 ___forwarding___ + 966
    4   CoreFoundation                      0x0235acd2 _CF_forwarding_prep_0 + 50
    5   sqlite                              0x0000393b -[sqliteViewController viewWillAppear:] + 622
    6   UIKit                               0x0055775d -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 5402
    7   UIKit                               0x0036e769 -[UIViewController presentModalViewController:withTransition:] + 2937
    8   UIKit                               0x00367a5e -[UIViewController _tryRecursivelyPresentModalViewController:withTransition:] + 134
    9   UIKit                               0x0036df42 -[UIViewController presentModalViewController:withTransition:] + 850
     10  sqlite                              0x00005d8a -[StartPageViewController startQuiz:] + 68
    11  UIKit                               0x002c2e14 -[UIApplication sendAction:to:from:forEvent:] + 119
    12  UIKit                               0x0034c6c8 -[UIControl sendAction:to:forEvent:] + 67
    13  UIKit                               0x0034eb4a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
    14  UIKit                               0x0034d6f7 -[UIControl touchesEnded:withEvent:] + 458
    15  UIKit                               0x002e62ff -[UIWindow _sendTouchesForEvent:] + 567
    16  UIKit                               0x002c81ec -[UIApplication sendEvent:] + 447
    17  UIKit                               0x002ccac4 _UIApplicationHandleEvent + 7495
    18  GraphicsServices                    0x02c04afa PurpleEventCallback + 1578
    19  CoreFoundation                      0x023cadc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    20  CoreFoundation                      0x0232b737 __CFRunLoopDoSource1 + 215
    21  CoreFoundation                      0x023289c3 __CFRunLoopRun + 979    
    22  CoreFoundation                      0x02328280 CFRunLoopRunSpecific + 208 
    23  CoreFoundation                      0x023281a1 CFRunLoopRunInMode + 97
    24  GraphicsServices                    0x02c032c8 GSEventRunModal + 217
    25  GraphicsServices                    0x02c0338d GSEventRun + 115
    26  UIKit                               0x002d0b58 UIApplicationMain + 1160
    27  sqlite                              0x00002910 main + 102
    28  sqlite                              0x000028a1 start + 53
)
 terminate called after throwing an instance of 'NSException'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:31:29+00:00Added an answer on May 17, 2026 at 4:31 pm

    Got the reason for it. I was trying to invalidate an already invalidated timer. Thanks Anyways

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application has a navigation view controller with 2 views : - a root
I have a Delphi 7 application that has two views of a document (e.g.
I have a plug-in to an Eclipse RCP application that has a view. After
My application has a need to let the user choose a date from a
I am working on a simple app tab-bar based application that has two views.
We´re developing an ASP MVC application witch the View (aspx) has a Flex embed.
My application has two views, a live mode and a preview mode. Both of
Application has an auxiliary thread. This thread is not meant to run all the
Our application has a file format similar to the OpenDocument file format (see http://en.wikipedia.org/wiki/OpenDocument
My application has no forms. It runs by calling Application.Run();

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.