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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:56:13+00:00 2026-06-15T23:56:13+00:00

I am getting this error: exc_bad_access (code=1, address=0x2012 when I try to receive a

  • 0

I am getting this error:

exc_bad_access (code=1, address=0x2012 

when I try to receive a value from a singleton in this way:

Draggable* sharedSingleton = [Draggable sharedManagerDraggable];
NSLog(@"%@", sharedSingleton.namePassedToDraggable);

The code above is placed in the Draggable.m of type UIImageView, which also has:

+ (Draggable *)sharedManagerDraggable
{
static Draggable *sharedManagerDraggable = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
    sharedManagerDraggable = [[Draggable alloc] init];
});
return sharedManagerDraggable;
}

I assign a value to namePassedToDraggable in this way (from view controller.m):

#import Draggable.h

Draggable* sharedSingleton = [Draggable sharedManagerDraggable];
    sharedSingleton.namePassedToDraggable = txt.text;
        NSLog(@"%@", sharedSingleton.namePassedToDraggable);
    dragger.tag = img.tag;

And in Draggable.h I have:

+ (Draggable *) sharedManagerDraggable;

@property (nonatomic, assign) NSString* namePassedToDraggable;

Why do I get the error causing the app to crash? I use the same method in other viewcontorllers and it works just fine!

  • 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-06-15T23:56:14+00:00Added an answer on June 15, 2026 at 11:56 pm
    @property (nonatomic, assign) NSString* namePassedToDraggable;
    

    should be

    @property (nonatomic, strong) NSString* namePassedToDraggable;
    

    If the property is not strong, it’s not retained and it’s released at the end of the scope of the function in which you’re assigning it.

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

Sidebar

Related Questions

I want to fix an error of thread 1 EXC_BAD_ACCESS(code=2,address=0x30) i m getting this
Here is the error I am getting Thread 1:EXC_BAD_ACCESS (code=2, address=0xb7ffffc) On this line
I'm getting a EXC_BAD_ACCESS error when this code gets called NSLog(@Count: %@, [fetchedObjects count]);
My iPhone app is crashing and getting EXC_BAD_ACCESS error when using this code: NSError
I am getting a EXC_BAD_ACCESS (code=2, address=0x8) error when trying to post a notification.
Getting this error when try to add an item to my repositories/context: Collection has
Am getting this error for my code: Undefined symbols for architecture x86_64: _spendDollars, referenced
I am getting this error from eway token payment API, soap:ReceiverServer was unable to
I am getting the EXC_BAD_ACCESS error when trying to set a value inside a
im getting a EXC_BAD_ACCESS error on this line. [(CCMenuItemSprite*)[profileSelectionMenu getChildByTag:333] setNormalImage:normalSprite3]; Basically im just

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.