Hi Quincey

This is a document based app. 
And it's the same table view that is affected each time.  I doubt it's a hidden 
UI element issue. 

I'll have a look around the dangling pointer area. 

All strange as the code involved has been running happily for a long time and 
is quite straightforward. 

Also, the break point is so predictable. And I find it strange that the table 
view address should become exactly the same as it had in a previous document 
that has been closed. Usually dangling pointer problems yield erratic results 
with forever changing values. 

Peter

> On 27 Apr 2017, at 23:04, Quincey Morris 
> <[email protected]> wrote:
> 
>> On Apr 27, 2017, at 13:26 , Peter Hudson <[email protected]> wrote:
>> 
>> I open I file in my application, do a few typical operations in it - and 
>> then shut the file.
> 
> I assume you mean this is a data file whose contents are displayed (for the 
> moment) in your UI, not an actual NIB file containing a table view?
> 
>> The problem occurs when I go to a table view to find the indexes of the rows 
>> selected in the table view by the user.  On opening the second file, for the 
>> first few passes through the code, the pointer to the table view is correct 
>> and I access the table view correctly.  Then suddenly the pointer changes.  
>> Its an oulet set in IB.  
> 
> You have more than one table view because … why? Is this a document-based app 
> where the tables are in different windows for different documents? Or is the 
> value of the outlet supposed to change when the second file is opened (and 
> then incorrectly changing back again)?
> 
> This kind of weirdness “smells” like a bit like a scenario where you have 
> multiple copies of a UI element, but you don’t know because they’re 
> superimposed in the UI. If it’s not that, then my guess would be an unowned 
> or unsafe_unretained pointer somewhere, and that what’s changed is the timing 
> of some deallocation or release that previously left a memory management bug 
> uncovered. If it’s not that, it might indicate that you’re sometimes 
> supplying the wrong value for “File’s Owner” when reloading a NIB file for 
> the second table view, or something like that.
> 
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to