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

  • Home
  • SEARCH
  • 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 6817629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:04:45+00:00 2026-05-26T21:04:45+00:00

I am getting a crash the second time I attempt to add a certain

  • 0

I am getting a crash the second time I attempt to add a certain view as a subview. The crash happens here:

-(void)AddAsScrollableSubContext:(UIView*)view {
    [pExtendedScrollableSubContextBounds addSubview: view]; //CRASH HERE
    pSubScroll.userInteractionEnabled = true;
}

the second time I call…

[mSongContext AddAsScrollableSubContext:pEQRoot];

The flow is something along the lines of

[mSongContext AddAsScrollableSubContext:pEQRoot];
...Load a lot of stuff
...Press a Button
...Unload a lot of stuff
[pEQRoot removeFromSuperview];
...Press a Button
[mSongContext AddAsScrollableSubContext:pEQRoot];

When I get the bad access the callstack looks like the following:
Callstack

Both objects (pExtendedScrollableSubContextBounds and pEQRoot) appear to be valid. Adding other subview to pExtendedScrollableSubContextBounds works fine and calling other operations on pEQRoot (subview, frame) also work.

I read the in objsend r0 was the object and r1 was the selector so I looked at the memory address for r1 and saw…

memdump

This feels like I am trashing memory somewhere around isKindOfClass: but I am not quite sure. Could anyone point me to more info on iOS obj_msgsend? is there a way I can setup a watch point to catch when this memory trash is occurring?

  • 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-26T21:04:45+00:00Added an answer on May 26, 2026 at 9:04 pm

    Use NSZombies to fix the problem.

    On a slightly unrelated note, there’s a rule of thumb – NARC which stands for new, allocate, retain, copy. If a method call includes any of these keywords, then we have ownership of the object and we are then supposed to release the object.

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

Sidebar

Related Questions

ten.textValue = [[NSMutableString alloc]init]; ten.textValue = [NSMutableString stringWithString:textField.text]; I am getting crash at second
I seem to be getting a crash after a long period of time on
XCode 3.1.2 using built-in OCTest unit testing. I'm getting a crash when unit tests
I'm getting a crash when loading dsound.dll from another DLL in Windows 7. The
I am getting a crash with following values :- Poll is the system call
In my application i am getting random crash at any location, i have used
I am getting a crash when I popToRootViewController , this is the way I
I am getting a crash inside win32 fn:: SHBrowseForFolder(). The code is as follows:
I am getting a crash report back that says OutOfMemoryError in my call to
In my Android application I am getting a very strange crash, when I press

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.