Overreleased objects

Sep 7, 2010 at 10:09 AM
Edited Sep 7, 2010 at 12:00 PM

In some cases objects created by the library are overreleased. In the application I am writing, it happens in 2 cases:

The first case:

There is a "Configuration" class in our application. Its code is generated by odatagen tool:

 

@interface Configuration : ODataObject
{
// ...

NSMutableArray *m_Modules;

// ...
}

@property ( nonatomic , retain , getter=getModules , setter=setModules )NSMutableArray *m_Modules;

// ...

@end

 

I execute the following query: "Configurations('MyConfigurationId')/?$expand=Modules". The configuration object is returned, and the m_Modules collection is filled with appropriate entities. I store the instance of Configuration in a property of one of my classes. When I access the stored object later, I see that m_Modules collection is of type _NSZombie_CFArray (I run the application with NSZombieEnabled option).

The second case:

There is a class in my application that interacts with the oData library:

 

@interface ODataClient : NSObject {
RsiDataSource *dataSource;
}

@property (nonatomic, retain) RsiDataSource *dataSource;

-(void) getTrackers;

@end

 

RsiDataSource is a class generated by odatagen. In the "init" method of my class, I instantiate RsiDataSource and store it in a property. The "getTrackers" method of my class contains the following code:

 

DataServiceQuery *query = [self.dataSource usertrackers];
QueryOperationResponse *response = [query execute];

 

While [query execute] is running, it encounters an overreleased object (ObjectContext.m, line 1113):


ResourceBox * resourceBox = (ResourceBox*)[m_identityToResource objectForKey:uri];

m_identityToResource is of type _NSZombie_CFDictionary.

I suppose that it happens because m_identityToResource is autoreleased, while it is not necessary (ObjectContext.m, line 145):


m_identityToResource    = [[[NSMutableDictionary alloc] init]autorelease];

 

Sep 7, 2010 at 6:43 PM

Thanks for reporting this issue.

It is a known issue that is already fixed in the latest version of the code that we plan to release soon.

We would like to run some additional tests so if the service is accessible we would like to run some tests to make sure the problem is fixed. (you can contact me directly via the CodePlex site for the details). Otherwise please check the code when we release it and let me know if you still see issues with your service.

Thanks

Claudio