Re: Garbage collected and non-garbage collected
Re: Garbage collected and non-garbage collected
- Subject: Re: Garbage collected and non-garbage collected
- From: Robert Mullen <email@hidden>
- Date: Tue, 10 Mar 2009 13:17:08 -0700
The framework is open source. It is the SM2DGraphView Framework. I
have posted on the Snowmint forum but not getting anything. I think
that is understandable as the original author built this for his own
purpose and released it to the world out of generosity. I have made
some minor mods to the code base already and don't mind making others
but not sure what the quality of the changes will be given my
inexperience. If this were .NET I would have no hesitation as I am
fluent and experienced. I simply don't have that confidence yet with
Cocoa and Objective-C. In the debugging I am doing right now I have
noticed that there is a struct with "private" data the framework uses
and one element of this struct is an NSMutableDictionary of text
attributes. This is definitely one source of problems as reading from
this element causes bad access. I insert some logging to look at this
element and it has so far contained <com.apple.disk-imagp >,
<NSCFType: 0x186f4a0>, and <NSExtraMIData: 0x186f7e0> but not an
NSMutableDictionary. Pretty clearly I am not getting the memory that
is expected but my first glance at the code exposes no holes that are
obvious to me. This was addressed once before on the Snowmint forum
with that poster exhibiting the same crash symptoms but the thread
went silent after the framework author asked specific questions about
what is not working. Any pointers (bad pun intended) would be
appreciated. I wouldn't mind debugging this myself with the help of a
few more experienced coders. I do understand the basic tenets of
memory management but am also not greatly experienced there.
On Mar 10, 2009, at 12:56 PM, Bill Bumgarner wrote:
On Mar 10, 2009, at 12:21 PM, I. Savant wrote:
On Tue, Mar 10, 2009 at 3:07 PM, Robert Mullen <email@hidden>
wrote:
I also have the option of abandoning the framework and functionality
although that is not an appealing option. I am enjoying the
process of
determining the course to rectify GC in this framework (in a
perverse sort
of way) but I am not sure how long that will last. Every time I
run into a
persistent problem it is an opportunity to learn Cocoa, X-Code, and
Objective-C a little better and that is fun in a challenging way.
I know
from experience though that this can turn from an enjoyably
challenging
diversion into a frustratingly endless cycle of refactoring. Wish
me luck...
Luck!
Consider also, though, that learning the Retain / Release memory
management approach is just as much an opportunity to learn. For your
project, it sounds like the odds tip in favor of getting everything
GC-compliant, but as you said, time and (bad) experience may change
that view ... ;-)
So... is the framework open source? Got a pointer? Any kind of test
case? Can you post more information about the crash? What does
the stack trace look like? Got an address? What does
malloc_history say? Can..? Got..? Have you tried..?
Let's pull this post back to a technical analysis of the OP's
problem. More likely than not, we can fix his framework and,
hopefully, that'll be one less barrier to entry for everyone.
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden