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 980327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:21:52+00:00 2026-05-16T04:21:52+00:00

This is a weird one. On and off as I have been working on

  • 0

This is a weird one. On and off as I have been working on my application, this problem has popped up, and then it has always mysteriously vanished. Today it is refusing to vanish.

My app uses two view controllers to handle auto rotation. Sometimes, Objective-C can’t find my classes. For example [OneViewController alloc] will crash. I added a function to catch this state, and even if I call it before I run a single line of my own code, things are still broken. I take this to prove that whatever is wrong, it is not with any bad code I may have written.

Anyone have any idea why universalGoodness would not be a constant?

void verifyUniversalGoodness()
{
 id portrait_class, landscape_class;

 portrait_class = NSClassFromString(@"OneViewController");
 landscape_class = NSClassFromString(@"OtherViewController");
 NSLog(@"CHECKING GOODNESS: portrait %@, landscape %@", portrait_class, landscape_class);
 if (portrait_class == nil || landscape_class == nil)
  exit(0);
}

int main( int argc, char *argv[] )
{
    verifyUniversalGoodness();

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;

}

Here’s what a stack trace looks like if I let it run to call of alloc …

#1  0x3356296c in _class_initialize ()
#2  0x33567dfe in prepareForMethodLookup ()
#3  0x33565168 in lookUpMethod ()
#4  0x33562914 in _class_lookupMethodAndLoadCache ()
#5  0x3356264a in objc_msgSend_uncached ()
#6  0x000de704 in -[MyAppDelegate finishStartup] (self=0x61c9a0, _cmd=0x303117) at /Users/michael.toy/PROJECT/MyAppDelegate.mm:180
#7  0x32b77904 in __NSFireDelayedPerform ()
#8  0x32c23d22 in CFRunLoopRunSpecific ()
#9  0x32c234e0 in CFRunLoopRunInMode ()
#10 0x30d620da in GSEventRunModal ()
#11 0x30d62186 in GSEventRun ()
#12 0x314d54c8 in -[UIApplication _run] ()
#13 0x314d39f2 in UIApplicationMain ()
#14 0x000e13a8 in main (argc=1, argv=0x2ffff5a8) at /Users/michael.toy/PROJECT/main.mm:38
  • 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-16T04:21:52+00:00Added an answer on May 16, 2026 at 4:21 am

    Thank you for all your responses. It got me looking closer at the problem. It turns out that the class I care about is in one library, and the main is in another library, and both libraries are linked into my final binary.

    I needed to add -Wl,-ObjC to my link line, and that seems to have fixed things and universalGoodness is now restored. I have no idea what triggered the state where this was needed, but I am happy to be back in business.

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

Sidebar

Related Questions

Hello every one. I'm faced with a weird problem. My application has a simple
This one is weird, I have a page that consists of a html table
Okay, I have this weird problem in Firefox. I type in Firebug's console $
Ok, this is a weird one. The junk data isn't random either, it appears
This is a bit of a weird one, and I could well be coding
I've got this weird problem - I'm calling ChangeServiceConfig on a newly installed service
I'm experiencing this weird problem which my scrollbar jumps by itself to somewhere that
Today, I ran into this weird problem with a user using Mac OS X.
I'm new to Ruby, so I'm having some trouble understanding this weird exception problem
This is weird. It is a trivial problem: A std::string with bits with length

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.