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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:19:28+00:00 2026-05-23T18:19:28+00:00

The writing of array data to nsmarrHeader and nsmarrData work fine. When I write

  • 0

The writing of array data to nsmarrHeader and nsmarrData work fine.
When I write those “2D” NSMutableArrays to the structure I get: Program received signal: “EXC_BAD_ACCESS”.

struct typeFile structFile;

[structFile.nsmarrHeader addObjectsFromArray: nsmarrHeader];
[structFile.nsmarrData addObjectsFromArray: nsmarrData];

this gets the same error:

[structFile.nsmarrHeader addObject: nsmarrHeader];
[structFile.nsmarrData addObject: nsmarrData];

So I am not sure what is wrong with writing to the structure or what I should do differently then?

thanks

  • 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-23T18:19:28+00:00Added an answer on May 23, 2026 at 6:19 pm

    if you have objective-c objects as plain structure fields then they are not initialized by default and so in your code you’re trying to send message to uninitialized object and thus get EXC_BAD_ACCESS error.

    Before using your structure fields you should explicitly initialize them, but I think if that’s possible better use objective-c objects instead of plain structs – that will make things much easier for you (e.g. memory management)

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

Sidebar

Related Questions

I'm writing a program that passes data from a file into an array, but
I am writing the data to the output browser using Response.write(some byte arrary) Response.ContentType
I'm writing a program that creates a 2D array from a integer n. I
I'm writing a C program but I keep having problems with my array of
Suppose I have an array of data, can 2 threads safely write to different
I've been writing a program that can determine any and every data about an
In a program I'm writing, I've decided to use my own data types instead
I'm currently trying to write data from an array of objects to a range
Overview I am writing a Ruby program that uses data from mysql queries to
I'm writing a custom structure manipulation program, and I've got the following types: type

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.