View Issue Details

IDProjectCategoryView StatusLast Update
0003943SOGoActiveSyncpublic2017-01-09 15:49
ReporterSirTobi Assigned Toludovic  
PriorityhighSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSCentOSOS Version7.2.1511
Product Version3.2.4 
Fixed in Version3.2.5 
Summary0003943: Crash with active sync from version 3.2.2 to 3.2.4 and propably higher
Description

I have build SOGO from Source on CentOS 7, 64 Bit. I also build the dependencies from source. All goes to /opt/SOGo-${version}. (It was a real mess to compile, but now it seems to work and is very useful for the fallback I need now)

GNUSTEP_MAKE=gnustep-make-2.6.8.tar.gz
GNUSTEP_BASE=gnustep-base-1.24.9.tar.gz
SOPE=SOPE-${SOGO_VERSION}.tar.gz
SOGO=SOGo-${SOGO_VERSION}.tar.gz
LIBXML2=libxml2-2.9.4.tar.gz
LIBWBXML=libwbxml-0.11.4.tar.bz2

The script to compile is attached for information. Feel free to optimize ;-)

All went fine up to version 3.2.1, from 3.2.2 on I got the following error when doing activesync with the Outlook App on Windows Mobile 10, version 14393.479 (lumia 640xl, insider release preview). When falling back to 3.2.1, all is fine again, so for now, no updates for me, not very satisfying ;-)

I use two accounts:

"sirtobi" for mail, contacts, calender and "familie" for contacts and calender.
As user sirtobi I have subscribed to familie via webfrontend.

EXCEPTION: <NSException: 0x7f7653708760> NAME:NSRangeException REASON:Index 5 is out of range 5 (in 'removeObjectAtIndex:') INFO:{Array = ("<0x7f76536e9620[SOGoAppointmentFolder]: name=personal container=0x7f76536e8790/Calendar ocs=/Users/sirtobi/Calendar/personal>", "<0x7f76536e9ec0[SOGoAppointmentFolder]: name=familie_personal container=0x7f76536e8790/Calendar ocs=/Users/familie/Calendar/personal>", "<0x7f76536ef1d0[SOGoContactGCSFolder]: name=personal container=0x7f76536eb950/Contacts ocs=/Users/sirtobi/Contacts/personal>", "<0x7f76536eebf0[SOGoContactGCSFolder]: name=4D0D-57ACD900-5-324ED340 container=0x7f76536eb950/Contacts ocs=/Users/sirtobi/Contacts/4D0D-57ACD900-5-324ED340>", "<0x7f76536eeeb0[SOGoContactGCSFolder]: name=collected container=0x7f76536eb950/Contacts ocs=/Users/sirtobi/Contacts/collected>"); Count = 5; Index = 5; }

I don't speak webcal via telnet, so don't know how to debug... Any ideas? More Information needed?

greetings and thank you very much,

Tobias

TagsNo tags attached.

Activities

SirTobi

SirTobi

2016-12-12 14:11

reporter  

compile (2,760 bytes)   
#!/bin/bash

if [ "$1" == "" ]
then
	echo "Usage: $0 <sogo_version>"
	exit
fi

#SOGO_VERSION=3.2.3
SOGO_VERSION=$1

#GNUSTEP_MAKE=gnustep-make-2.6.8.tar.gz
#GNUSTEP_BASE=gnustep-base-1.24.9.tar.gz
SOPE=SOPE-${SOGO_VERSION}.tar.gz
SOGO=SOGo-${SOGO_VERSION}.tar.gz
#LIBXML2=libxml2-2.9.4.tar.gz
LIBWBXML=libwbxml-0.11.4.tar.bz2
BASEDIR=/opt/SOGo-${SOGO_VERSION}

if [ ! -d $BASEDIR ]
then
	echo "$BASEDIR does not exist!"
	exit
fi

wget -nc http://packages.inverse.ca/SOGo/sources/SOGo-${SOGO_VERSION}.tar.gz
wget -nc http://packages.inverse.ca/SOGo/sources/SOPE-${SOGO_VERSION}.tar.gz

GNUSTEP_MAKE=`lynx -dump http://wwwmain.gnustep.org/resources/downloads.php?site=ftp%3A%2F%2Fftp.gnustep.org%2Fpub%2Fgnustep%2F | grep gnustep-make | awk '{ print $2 }'`
GNUSTEP_BASE=`lynx -dump http://wwwmain.gnustep.org/resources/downloads.php?site=ftp%3A%2F%2Fftp.gnustep.org%2Fpub%2Fgnustep%2F | grep gnustep-base | awk '{ print $2 }'`

wget -nc ${GNUSTEP_MAKE}
wget -nc ${GNUSTEP_BASE}
GNUSTEP_MAKE=`basename ${GNUSTEP_MAKE}`
GNUSTEP_BASE=`basename ${GNUSTEP_BASE}`

LIBXML2=`ncftpls ftp://xmlsoft.org/libxml2/ | grep LATEST_LIBXML2_IS | cut -d_ -f4 | cut -d@ -f1`
LIBXML2=libxml2-${LIBXML2}.tar.gz
wget -nc ftp://xmlsoft.org/libxml2/${LIBXML2}

wget -nc http://downloads.sourceforge.net/project/libwbxml/libwbxml/0.11.4/${LIBWBXML}


echo ${GNUSTEP_MAKE}
echo ${GNUSTEP_BASE}
echo ${SOPE}
echo ${SOGO}
echo ${LIBXML2}
echo ${LIBWBXML}


rm -rf `basename $GNUSTEP_MAKE .tar.gz`
tar xzf $GNUSTEP_MAKE
cd `basename $GNUSTEP_MAKE .tar.gz`
./configure --prefix=$BASEDIR
make
make install
cd ..

source $BASEDIR/share/GNUstep/Makefiles/GNUstep.sh

export PATH=$BASEDIR/bin:$PATH
export LD_LIBRARY_PATH=$BASEDIR/lib:$BASEDIR/lib64:$LD_LIBRARY_PATH

rm -rf `basename $LIBXML2 .tar.gz`
tar xzf $LIBXML2
cd `basename $LIBXML2 .tar.gz`
./configure --prefix=$BASEDIR --without-python
make
make install
cd ..

rm -rf `basename $LIBWBXML .tar.bz2`
tar xjf $LIBWBXML
cd `basename $LIBWBXML .tar.bz2`
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$BASEDIR 
make
#make DESTDIR=$BASEDIR install
make install
cd ..
cd ..

rm -rf `basename $GNUSTEP_BASE .tar.gz`
tar xzf $GNUSTEP_BASE
cd `basename $GNUSTEP_BASE .tar.gz`
./configure --prefix=$BASEDIR 
make
#make check 
make install
cd ..

rm -rf SOPE
tar xzf $SOPE
cd SOPE
ln -s /usr/lib64/mysql/libmysqlclient.so $BASEDIR/lib/
./configure --with-gnustep --enable-strip --enable-mysql
make
make install
cd ..

rm -rf `basename $SOGO .tar.gz`
tar xzf $SOGO
cd `basename $SOGO .tar.gz`
./configure --enable-strip --disable-debug --gsmake=$BASEDIR/share/GNUstep/Makefiles/
export ADDITIONAL_INCLUDE_DIRS="-I$BASEDIR/include"
export ADDITIONAL_LIB_DIRS="-L$BASEDIR/lib64"
make
make install
cd ActiveSync
make
make install
cd ..
cd ..

compile (2,760 bytes)   
tfu

tfu

2016-12-13 02:39

reporter   ~0010987

It seems that you haven't set the synchronize flag for the subscribed contact folder AND the owner has not granted the "This person can read the cards of this addressbook." privilege. Both settings are required to synchronize the folder.

Can you try attached patch, it should handle this situation and avoid the crash.

tfu

tfu

2016-12-13 02:40

reporter  

3943.diff (928 bytes)   
diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m
index 68f5117..8bd7333 100644
--- a/ActiveSync/SOGoActiveSyncDispatcher.m
+++ b/ActiveSync/SOGoActiveSyncDispatcher.m
@@ -1165,6 +1165,7 @@ NSLog(@"tfu blocked %@", [[[context activeUser] domainDefaults] blockedDeviceTyp
                      command_count++;
                    }
                  [o destroy];
+                 continue;
                }
 
              // Remove the folder from device if it is a contact folder and we have no SOGoRole_ObjectViewer.
@@ -1316,6 +1317,7 @@ NSLog(@"tfu blocked %@", [[[context activeUser] domainDefaults] blockedDeviceTyp
            ![currentFolder synchronize])
          {
            [folders removeObjectAtIndex: count];
+           continue;
          }
 
        // Remove the folder from the device if it is a contact folder and we have no SOGoRole_ObjectViewer access right.
3943.diff (928 bytes)   
SirTobi

SirTobi

2016-12-13 13:43

reporter   ~0010993

The patch does the trick. Thank you very much.

Also you were right with your guess, I had no synchronize flag and no reading-rights. (btw. Why had it worked before?)

If this patch would be applied to the source, the ticket could be closed.

Thank you very much!

Related Changesets

sogo: master d8eae96d

2016-12-14 13:42:22

ludovic

Details Diff
(fix) properly skip folders we don't want (fixes 0003943) Affected Issues
0003943
mod - ActiveSync/SOGoActiveSyncDispatcher.m Diff File

sogo: v2 eff34463

2016-12-14 13:42:22

ludovic

Details Diff
(fix) properly skip folders we don't want (fixes 0003943) Affected Issues
0003943
mod - ActiveSync/SOGoActiveSyncDispatcher.m Diff File

sogo: maint 84820185

2016-12-14 13:42:22

ludovic


Committer: francis Details Diff
(fix) properly skip folders we don't want (fixes 0003943) Affected Issues
0003943
mod - ActiveSync/SOGoActiveSyncDispatcher.m Diff File

Issue History

Date Modified Username Field Change
2016-12-12 14:11 SirTobi New Issue
2016-12-12 14:11 SirTobi File Added: compile
2016-12-13 02:39 tfu Note Added: 0010987
2016-12-13 02:40 tfu File Added: 3943.diff
2016-12-13 13:43 SirTobi Note Added: 0010993
2016-12-14 13:43 ludovic Changeset attached => sogo master d8eae96d
2016-12-14 13:43 ludovic Assigned To => ludovic
2016-12-14 13:43 ludovic Resolution open => fixed
2016-12-14 13:43 ludovic Changeset attached => sogo v2 eff34463
2016-12-14 13:45 ludovic Status new => resolved
2016-12-14 13:45 ludovic Fixed in Version => 3.2.5
2017-01-09 15:49 francis Changeset attached => sogo maint 84820185