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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:11:07+00:00 2026-05-31T11:11:07+00:00

Had this weird bug in my code and I was not able to solve

  • 0

Had this weird bug in my code and I was not able to solve it.

First I have this singelton class when I have a property called tempPassword.

 @private
NSString *_tempPassword;
 }

 @property (nonatomic, retain) NSString *tempPassword;

 +(User*)owner;
 -(void) setTempPassword:(NSString*)string;

The setTempPassword just takes this string and assigns it to tempPassword. The issue is that no matter what I did in the setTempPassword function, I always got BAD_ACCESS. Doest this have something to do with it being a predefined named and cant be used as I’m using it? Pulling my hair here…

  • 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-31T11:11:09+00:00Added an answer on May 31, 2026 at 11:11 am

    If you aren’t mucking around with the string further than just setting it and getting (pun intended) out of the way, then there is no need to override the setter for it. You mention that you already @synthesized the property, so overriding it is unnecessary anyways. Just call:

    [[MySingleton owner]setTempPassword:@"Password"];
    

    and all will be right as rain, provided you remove those overrides from your code.

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

Sidebar

Related Questions

I have this code in C++ which is giving weird output: #include<iostream> using namespace
I have this weird problem which I don't remember to ever had in XCode
I found this very weird bug that I can't understand. First of all inside
I had an if statement checking some value, And encountered a weird bug(Not sure!).
Ok this is a weird problem because I had it working before. So I
I had this nasty bug that disappeared in the past but now after quite
I had this working in an old code that I didn’t end up using...
I had this code: int foo(void){ return 1; } int main(void){ static const int
Recently I had a weird bug where I was concatenating a string with an
I have this weird crash that only happens when running the app on the

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.