On Sep 15, 2011, at 11:56 , Patrick Ohly wrote:
> The sync then aborts and during flushing the current state for a suspend
> segfaults when trying to read the bogus 0x20 local ID pointer.
This is because of TCustomImplDS::implProcessItem():
===> augmentedItemP = (TMultiFieldItem
====> delete augmentedItemP; augmentedItemP = NULL;
The 207 code path goes through the two marked lines. I suppose setting
augmentedItemP in the first line is wrong? It's not needed and must not
Exactly, thanks for finding this.
I am a bit spoilt by retain/release mechanism in ObjC ;-)
In the meantime, I have consolidated my repositories and merged your branches into luz and
updated it with what was pending from my side so far, including this one now.
From d649138efc02e959cb1197a58afa7a6b5c1e959f Mon Sep 17 00:00:00 2001
From: Lukas Zeller <luz(a)plan44.ch>
Date: Thu, 15 Sep 2011 14:51:18 +0200
Subject: [PATCH] engine: fixed bad object delete case (Patrick found it) -
SendDBVersionOfItemAsServer() does not pass ownership for
src/sysync/customimplds.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/sysync/customimplds.cpp b/src/sysync/customimplds.cpp
index 888cde0..f790b05 100755
@@ -2903,7 +2903,8 @@ bool TCustomImplDS::implProcessItem(
// augmented version was created in backend, fetch it now and add to list
of items to be sent
- augmentedItemP = (TMultiFieldItem
+ // Note: item remains owned by list of items to be sent, so we don't
need to dispose it.
sta = LOCERR_OK; // otherwise, treat as ok