[OT] i miss java because i'm not doing WO but iPhone
[OT] i miss java because i'm not doing WO but iPhone
- Subject: [OT] i miss java because i'm not doing WO but iPhone
- From: Baiss Eric Magnusson <email@hidden>
- Date: Thu, 29 Jan 2009 19:20:58 -0800
So, I miss this list and thought I'd chime in on what I'm doing in
the form of my current problem description, I'm converting my WO TYF
to run on the iPhone, and am debugging my own ORM starting from Alex
Raftis AJRDatabase.
On Jan 10, 2009, at 11:12 PM, j o a r wrote:
Hello,
Attempting to fix memory management problems without really
understanding what's wrong is typically a bad idea - they tend to
just start showing up elsewhere...
I would only expect to see retain calls in the copy methods of
immutable classes, not otherwise. Not sure if that's appropriate in
your case or not without more information.
For problems like this, messages to deallocated objects, I'd
recommend using NSZombieEnabled (see: Google) to figure out which
type of object that's being messaged.
That was the source of the stack crawl I posted with the message. All
objects which pass through some path of the ORM assume this error as
I have commented out the Categories object creation and gotten the
same error reported from the objects coming from the Expense Table.
Once you know that you can either use ObjectAlloc in Instruments,
or code inspection, to figure out why it's either being deallocated
prematurely, or why someone still keeps a reference to this object
and try to message it after it's been deallocated.
j o a r
# Category Event Type Timestamp Address Size Responsible Library
Responsible Caller
0 CFString (store) Malloc 00:17.589 0x10a9a40 48 Foundation -
[NSCFString mutableCopyWithZone:]
1 CFString (store) Free 00:17.589 0x10a9a40 -48 Foundation -
[NSCFString appendString:]
2 CFDictionary (value-store) Malloc 00:17.589 0x10a9a40 16 Foundation
NSLogv
3 CFDictionary (value-store) Free 00:17.590 0x10a9a40 -16 Foundation
NSLogv
4 GeneralBlock-32 Malloc 00:17.590 0x10a9a40 32 Foundation NSLogv
5 GeneralBlock-32 Free 00:17.592 0x10a9a40 -32 Foundation NSLogv
6 Categories Malloc 00:17.592 0x10a9a40 32 EOAccess -
[EOEntityClassDescription
createInstanceWithEditingContext:globalID:zone:]
7 Categories Retain 00:17.592 0x10a9a40 0 EOAccess -
[EOEntityClassDescription
createInstanceWithEditingContext:globalID:zone:]
8 Categories Retain 00:17.592 0x10a9a40 0 Foundation -[NSCFArray
insertObject:atIndex:]
9 Categories Retain 00:17.628 0x10a9a40 0 TYF -[IphoneSession
setLastCategory:]
10 Categories Retain 00:17.628 0x10a9a40 0 TYF -[EntryViewController
setCurCategory:]
Is the above stack, which I got after the call below, what I need to
understand?
<Categories> is a complex object of course, an EOGenericRecord sub-
class, why is <CFString> a part of the above reference stack?
(gdb) shell malloc_history 3014 0x4909bf0
**********************************************************************
*******************
2009-01-08 13:57:54.854 TYF[5798:20b] *** -[Categories
copyWithZone:]: unrecognized selector sent to instance 0x4a47610
*** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '*** -[Categories
copyWithZone:]: unrecognized selector sent to instance 0x4a47610'
self.curCategory = [session lastCategory];
[[self session] setCategories: [ec objectsMatchingValue:
primaryKeyOfDbOwner forKey: @"loginId" entityNamed: kCategories]];
return [[[[entity _objectClass] allocWithZone:zone]
initWithEditingContext:anEditingContext classDescription:self
globalID:globalID] retain]; // bem, was autorelease
-[EntryViewController viewDidLoad] |
-[EOEditingContext(EOUtilities)
objectsMatchingValue:forKey:entityNamed:] |
-[EOEditingContext(EOUtilities) objectsMatchingValues:entityNamed:] |
-[EOEditingContext objectsWithFetchSpecification:] |
-[EOEditingContext objectsWithFetchSpecification:editingContext:] |
-[EOObjectStoreCoordinator
objectsWithFetchSpecification:editingContext:] |
-[EODatabaseContext objectsWithFetchSpecification:editingContext:] |
-[EODatabaseChannel fetchObject] |
-[EOEntityClassDescription
createInstanceWithEditingContext:globalID:zone:] | +[NSObject
allocWithZone:] | _internal_class_createInstance |
_internal_class_createInstanceFromZone | calloc | malloc_zone_calloc
**********************************************************
2009-01-26 17:03:33.598 TYF[555:20b] *** -[ExpenseType
copyWithZone:]: unrecognized selector sent to instance 0x490ea30
*** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '*** -[ExpenseType
copyWithZone:]: unrecognized selector sent to instance 0x490ea30'
---
Baiss Eric Magnusson
<http://www.CascadeWebDesign.com>
Seattle, WA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden