-
Hello Michal,
Thanks for the patches. I'll apply them as soon as I can.
As for this other intriguing issue you've encountered he's what jumps out at me. I'm going through the code via sourceforge's CVS browser (because I don't have my Mac at work) which makes this a bit tricky.
For starters _processChangedObjects: returns at the top if the notification is from self, which implies that...
2009-05-13 16:23:50 UTC by mont_rothstein
-
The problem described in previous email is more complicated than i suspected. Adding simple retain / autorelease or even release at the end of the loop doesn't yield satisfying result. In both cases i get an exeption at some point:
Exception raised during posting of notification. Ignored. exception: *** NSMapInsert(): attempt to insert notAKeyMarker
with the folowing stack:
#0...
2009-05-13 14:18:02 UTC by emzyla
-
The diff file contains Changes made to following files
+++ ../AJRDatabase/EOControl/DataSources/EODataSource.m
- memleak fix
+++ ../AJRDatabase/EOControl/Object Stores/EOEditingContext.m !!!
- fixed bug causing objects to be released two times causing frequent crashes on editing context save by retaining and autoreleasing object before passing it to another function.
- possible...
2009-05-13 09:59:48 UTC by emzyla
-
Hi Mont,
Sorry for my disapearance. The fixes I made are working quite well (I haven't noticed any negative side of the changes so far). But I found a more serious error in editing context:
In the _processChangedObjects function of EditingContext there is a place where You extract the object around the 160 line
objectToRefault = [self objectForGlobalID: globalID]
without retaining it...
2009-05-13 09:46:38 UTC by emzyla
-
Michal,
I was just going to email you and ask how the last fix was working.
You can use diff to create a patch file and then submit it via Tracker->Patches->Add new.
Thanks for the work.
-Mont.
2009-03-12 16:09:20 UTC by mont_rothstein
-
Hello Mont
I have found some other minor problems / memory leaks in the software could please tell me how do I contribute my modifications so You can review them and hopefully include them in repository?
Regards
Michal.
2009-03-12 08:34:50 UTC by emzyla
-
Sorry, I missed that "length / 4".
That is odd and I think must be wrong.
I think to balance memory use with the cost of reallocation we should change line 88 to:
maxOutput += (length * 4) + 2;
as you suggested.
That way what we are saying is that memory use will be kept down unless the initial memory allocation is exceeded (or nearly so) in which case we go ahead...
2009-02-24 16:09:21 UTC by mont_rothstein
-
Hello Mont!
the change to
maxOutput = (length * 2) + 2;
will not cover the first if where You substitute a single character with 4 characters. For a string of length less then 4 the reallocation at the beginning always expands the table by 0: maxOutput += length / 4;
Do You think that a solution might be to allocate the whole buffer in a greedy manner like:
maxOutput = (length * 4...
2009-02-24 09:07:42 UTC by emzyla
-
Hello Michal,
I'll preface this by acknowledging that I haven't actively worked on this project in a while.
That said, looking at the code I see a couple of things.
I think if you change line 81 from:
maxOutput = length * 2;
to:
maxOutput = (length * 2) + 2;
And change line 87 from:
if (outputPos + 4 > maxOutput) {
to:
if (outputPos +...
2009-02-23 17:32:32 UTC by mont_rothstein
-
Basically the problem lies in the following code:
input = NSZoneMalloc(zone, sizeof(unichar) * length);
//maxOutput = length * 2;
[value getCharacters:input];
output = NSZoneMalloc(zone, sizeof(unichar) * maxOutput);
output[outputPos++] = '\'';
for (x = 0; x < length; x++) {
if (outputPos + 4 > maxOutput) {
maxOutput += length / 4;
if...
2009-02-23 12:24:18 UTC by emzyla