• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie question: chrash on [tableview reloadData]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question: chrash on [tableview reloadData]


  • Subject: Re: Newbie question: chrash on [tableview reloadData]
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 21 Nov 2002 13:25:21 -0600

Seeing your document's source code would be helpful, but my guess would be that when the NSTableView tries to redisplay your data, your NSMutableArray has been released, and the pointer is noo longer valid.

Is it possible you are getting the NSMutableArray by one of the convenience methods like [NSMutableArray arrayWithObjects:...] or [NSMutableArray arrayWithCapacity:...]? If so, the resulting pointer is autoreleased, and will become invalid when the call chain in which it was created returns. You should either retain that pointer, or obtain a retained pointer with initializers like [[NSMutableArray alloc] initWithObjects:...], etc.

-- F

On Thursday, November 21, 2002, at 11:14 AM, Terje Tjervaag wrote:

I am working through Aron Hillegass' book Cocoa Programming for Mac OS X
...
I have made my own little file class, containing two strings, the file name and a description. The application is a document application and in my document init method I can create a new file and insert it into the NSMutableArray I use as the datasource for the tableview. When the application loads it displays this row fine, but when I try to call reloadData AFTER that, even though I have not added any objects to my array, the application crashes with a "due to signal 10 (SIGBUS)".
Does anyone have ANY clue as to what can be causing this? I would give you more details, but I haven't got a clue whats going on here.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Newbie question: chrash on [tableview reloadData]
      • From: Terje Tjervaag <email@hidden>
References: 
 >Newbie question: chrash on [tableview reloadData] (From: Terje Tjervaag <email@hidden>)

  • Prev by Date: setAccessoryView not responding
  • Next by Date: Re: Newbie question: chrash on [tableview reloadData]
  • Previous by thread: Re: Newbie question: chrash on [tableview reloadData]
  • Next by thread: Re: Newbie question: chrash on [tableview reloadData]
  • Index(es):
    • Date
    • Thread