https://bugs.freedesktop.org/show_bug.cgi?id=76375
Patrick Ohly <patrick.ohly(a)gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Patrick Ohly <patrick.ohly(a)gmx.de> ---
First, some general comments.
The --import operation is not what happens during a normal sync and therefore
cannot be used to debug data handling issues encountered during syncing. The
difference is that during syncing, the Synthesis engine parses individual
items, transforms each one for the storage and only then sends it to the
storage. --import on the other hand handles multiple items (separated by blank
lines by default) and sends the individual items directly to the backend,
without conversion.
When using the command line, it is easier for debugging to use --daemon=no,
because then the actual execution happens inside the current process instead of
getting moved to syncevo-dbus-server.
So in this case, --import should indeed not crash, but it also can't be used
like this to import directly from the phone. You need to disable splitting at
the empty line, like this:
syncevolution --daemon=no database=test backend=evolution-contacts --import
/tmp/address-lines.vcf --delimiter none
That works because EDS happens to support vCard 2.1 in addition to vCard 3.0.
Now regarding the crash: this seems be a bug in the EDS vCard parser when
passed incomplete items. The first "item" can be imported:
$ cat /tmp/address-lines.vcf
BEGIN:VCARD
VERSION:2.1
FN:My name
N:My name
pohly@pohly-mobl1:~/work/syncevolution/src$ ./syncevolution --daemon=no
database=test backend=evolution-contacts --import /tmp/address-lines.vcf
#0: pas-id-532AAB1700000006
pohly@pohly-mobl1:~/work/syncevolution/src$ ./syncevolution --daemon=no
database=test backend=evolution-contacts --export - --luids
pas-id-532AAB1700000006
BEGIN:VCARD
VERSION:3.0
UID:pas-id-532AAB1700000006
FN:My name
N:My name
REV:2014-03-20T08:47:19Z
END:VCARD
The second one can't:
$ cat /tmp/address-lines.vcf
END:VCARD
$ GLIBCXX_FORCE_NEW=1 G_SLICE=always-malloc G_DEBUG=gc-friendly
SYNCEVOLUTION_DEBUG=1 valgrind --num-callers=20 ./syncevolution --daemon=no
database=test backend=evolution-contacts --import /tmp/address-lines.vcf
==29516== Memcheck, a memory error detector
==29516== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==29516== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==29516== Command: ./syncevolution --daemon=no database=test
backend=evolution-contacts --import /tmp/address-lines.vcf
==29516==
[DEBUG 00:00:00] checking password property 'password' in config
'@default'
with user identity ''
[DEBUG 00:00:00] checking password property 'databasePassword' in config
'@default' with user identity ''
[DEBUG 00:00:01] : slow sync or testing, do full item scan to detect changes
[DEVELOPER 00:00:02] libebook: vcard began without a BEGIN:VCARD
==29516== Invalid read of size 8
==29516== at 0xA70C6B6: e_vcard_get_attribute (in
/usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0xA702019: ??? (in /usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0x745FBD3: g_object_set_valist (gobject.c:1352)
==29516== by 0x74603E6: g_object_set (gobject.c:2053)
==29516== by 0xBECF04:
SyncEvo::EvolutionContactSource::insertItem(std::string const&, std::string
const&, bool) (EvolutionContactSource.cpp:1037)
==29516== by 0xF8612F:
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&,
bool>::operator()(SyncEvo::TrackingSyncSource*, std::string const&, std::string
const&, bool) const (mem_fn_template.hpp:393)
==29516== by 0xF8605E: SyncEvo::SyncSourceRaw::InsertItemResult
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool>
>::operator()<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list0>(boost::_bi::type<SyncEvo::SyncSourceRaw::InsertItemResult>,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&,
bool>&,
boost::_bi::list0&, long) (bind.hpp:447)
==29516== by 0xF85F82:
boost::_bi::bind_t<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool> > >::operator()() (bind_template.hpp:20)
==29516== by 0xF85C46:
boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool> > >,
SyncEvo::SyncSourceRaw::InsertItemResult>::invoke(boost::detail::function::function_buffer&)
(function_template.hpp:132)
==29516== by 0xDF1624:
boost::function0<SyncEvo::SyncSourceRaw::InsertItemResult>::operator()() const
(function_template.hpp:759)
==29516== by 0xF84062:
SyncEvo::TrackingSyncSource::continueInsertItem(boost::function<SyncEvo::SyncSourceRaw::InsertItemResult
()()> const&, std::string const&) (TrackingSyncSource.cpp:148)
==29516== by 0xF84428: SyncEvo::TrackingSyncSource::doInsertItem(std::string
const&, std::string const&, bool) (TrackingSyncSource.cpp:162)
==29516== by 0xF84614:
SyncEvo::TrackingSyncSource::insertItemRaw(std::string const&, std::string
const&) (TrackingSyncSource.cpp:174)
==29516== by 0xF84796: virtual thunk to
SyncEvo::TrackingSyncSource::insertItemRaw(std::string const&, std::string
const&) (TrackingSyncSource.cpp:180)
==29516== by 0xD1E1E3: SyncEvo::Cmdline::insertItem(SyncEvo::SyncSourceRaw*,
std::string const&, std::string const&) (Cmdline.cpp:1732)
==29516== by 0xD1614B: SyncEvo::Cmdline::run() (Cmdline.cpp:1510)
==29516== by 0xB7197B: main (syncevolution.cpp:531)
==29516== Address 0x991db08 is 8 bytes inside a block of size 48 free'd
==29516== at 0x4C27D4E: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29516== by 0xA70AEC8: ??? (in /usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0xA70C6A3: e_vcard_get_attribute (in
/usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0xA702019: ??? (in /usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0x745FBD3: g_object_set_valist (gobject.c:1352)
==29516== by 0x74603E6: g_object_set (gobject.c:2053)
==29516== by 0xBECF04:
SyncEvo::EvolutionContactSource::insertItem(std::string const&, std::string
const&, bool) (EvolutionContactSource.cpp:1037)
==29516== by 0xF8612F:
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&,
bool>::operator()(SyncEvo::TrackingSyncSource*, std::string const&, std::string
const&, bool) const (mem_fn_template.hpp:393)
==29516== by 0xF8605E: SyncEvo::SyncSourceRaw::InsertItemResult
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool>
>::operator()<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list0>(boost::_bi::type<SyncEvo::SyncSourceRaw::InsertItemResult>,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&,
bool>&,
boost::_bi::list0&, long) (bind.hpp:447)
==29516== by 0xF85F82:
boost::_bi::bind_t<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool> > >::operator()() (bind_template.hpp:20)
==29516== by 0xF85C46:
boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool> > >,
SyncEvo::SyncSourceRaw::InsertItemResult>::invoke(boost::detail::function::function_buffer&)
(function_template.hpp:132)
==29516== by 0xDF1624:
boost::function0<SyncEvo::SyncSourceRaw::InsertItemResult>::operator()() const
(function_template.hpp:759)
==29516== by 0xF84062:
SyncEvo::TrackingSyncSource::continueInsertItem(boost::function<SyncEvo::SyncSourceRaw::InsertItemResult
()()> const&, std::string const&) (TrackingSyncSource.cpp:148)
==29516== by 0xF84428: SyncEvo::TrackingSyncSource::doInsertItem(std::string
const&, std::string const&, bool) (TrackingSyncSource.cpp:162)
==29516== by 0xF84614:
SyncEvo::TrackingSyncSource::insertItemRaw(std::string const&, std::string
const&) (TrackingSyncSource.cpp:174)
==29516== by 0xF84796: virtual thunk to
SyncEvo::TrackingSyncSource::insertItemRaw(std::string const&, std::string
const&) (TrackingSyncSource.cpp:180)
==29516== by 0xD1E1E3: SyncEvo::Cmdline::insertItem(SyncEvo::SyncSourceRaw*,
std::string const&, std::string const&) (Cmdline.cpp:1732)
==29516== by 0xD1614B: SyncEvo::Cmdline::run() (Cmdline.cpp:1510)
==29516== by 0xB7197B: main (syncevolution.cpp:531)
==29516==
[ERROR 00:00:02] GLib: g_ascii_strcasecmp: assertion `s1 != NULL' failed
==29516== Invalid read of size 8
==29516== at 0xA709830: e_vcard_attribute_remove_values (in
/usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0xA701D51: ??? (in /usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0x745FBD3: g_object_set_valist (gobject.c:1352)
==29516== by 0x74603E6: g_object_set (gobject.c:2053)
==29516== by 0xBECF04:
SyncEvo::EvolutionContactSource::insertItem(std::string const&, std::string
const&, bool) (EvolutionContactSource.cpp:1037)
==29516== by 0xF8612F:
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&,
bool>::operator()(SyncEvo::TrackingSyncSource*, std::string const&, std::string
const&, bool) const (mem_fn_template.hpp:393)
==29516== by 0xF8605E: SyncEvo::SyncSourceRaw::InsertItemResult
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool>
>::operator()<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list0>(boost::_bi::type<SyncEvo::SyncSourceRaw::InsertItemResult>,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&,
bool>&,
boost::_bi::list0&, long) (bind.hpp:447)
==29516== by 0xF85F82:
boost::_bi::bind_t<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool> > >::operator()() (bind_template.hpp:20)
==29516== by 0xF85C46:
boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool> > >,
SyncEvo::SyncSourceRaw::InsertItemResult>::invoke(boost::detail::function::function_buffer&)
(function_template.hpp:132)
==29516== by 0xDF1624:
boost::function0<SyncEvo::SyncSourceRaw::InsertItemResult>::operator()() const
(function_template.hpp:759)
==29516== by 0xF84062:
SyncEvo::TrackingSyncSource::continueInsertItem(boost::function<SyncEvo::SyncSourceRaw::InsertItemResult
()()> const&, std::string const&) (TrackingSyncSource.cpp:148)
==29516== by 0xF84428: SyncEvo::TrackingSyncSource::doInsertItem(std::string
const&, std::string const&, bool) (TrackingSyncSource.cpp:162)
==29516== by 0xF84614:
SyncEvo::TrackingSyncSource::insertItemRaw(std::string const&, std::string
const&) (TrackingSyncSource.cpp:174)
==29516== by 0xF84796: virtual thunk to
SyncEvo::TrackingSyncSource::insertItemRaw(std::string const&, std::string
const&) (TrackingSyncSource.cpp:180)
==29516== by 0xD1E1E3: SyncEvo::Cmdline::insertItem(SyncEvo::SyncSourceRaw*,
std::string const&, std::string const&) (Cmdline.cpp:1732)
==29516== by 0xD1614B: SyncEvo::Cmdline::run() (Cmdline.cpp:1510)
==29516== by 0xB7197B: main (syncevolution.cpp:531)
==29516== Address 0x991db18 is 24 bytes inside a block of size 48 free'd
==29516== at 0x4C27D4E: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29516== by 0xA70AEC8: ??? (in /usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0xA70C6A3: e_vcard_get_attribute (in
/usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0xA702019: ??? (in /usr/lib/libebook-1.2.so.13.3.1)
==29516== by 0x745FBD3: g_object_set_valist (gobject.c:1352)
==29516== by 0x74603E6: g_object_set (gobject.c:2053)
==29516== by 0xBECF04:
SyncEvo::EvolutionContactSource::insertItem(std::string const&, std::string
const&, bool) (EvolutionContactSource.cpp:1037)
==29516== by 0xF8612F:
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&,
bool>::operator()(SyncEvo::TrackingSyncSource*, std::string const&, std::string
const&, bool) const (mem_fn_template.hpp:393)
==29516== by 0xF8605E: SyncEvo::SyncSourceRaw::InsertItemResult
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool>
>::operator()<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list0>(boost::_bi::type<SyncEvo::SyncSourceRaw::InsertItemResult>,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&,
bool>&,
boost::_bi::list0&, long) (bind.hpp:447)
==29516== by 0xF85F82:
boost::_bi::bind_t<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool> > >::operator()() (bind_template.hpp:20)
==29516== by 0xF85C46:
boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<SyncEvo::SyncSourceRaw::InsertItemResult,
boost::_mfi::mf3<SyncEvo::SyncSourceRaw::InsertItemResult,
SyncEvo::TrackingSyncSource, std::string const&, std::string const&, bool>,
boost::_bi::list4<boost::_bi::value<SyncEvo::TrackingSyncSource*>,
boost::_bi::value<std::string>, boost::_bi::value<std::string>,
boost::_bi::value<bool> > >,
SyncEvo::SyncSourceRaw::InsertItemResult>::invoke(boost::detail::function::function_buffer&)
(function_template.hpp:132)
==29516== by 0xDF1624:
boost::function0<SyncEvo::SyncSourceRaw::InsertItemResult>::operator()() const
(function_template.hpp:759)
==29516== by 0xF84062:
SyncEvo::TrackingSyncSource::continueInsertItem(boost::function<SyncEvo::SyncSourceRaw::InsertItemResult
()()> const&, std::string const&) (TrackingSyncSource.cpp:148)
==29516== by 0xF84428: SyncEvo::TrackingSyncSource::doInsertItem(std::string
const&, std::string const&, bool) (TrackingSyncSource.cpp:162)
==29516== by 0xF84614:
SyncEvo::TrackingSyncSource::insertItemRaw(std::string const&, std::string
const&) (TrackingSyncSource.cpp:174)
==29516== by 0xF84796: virtual thunk to
SyncEvo::TrackingSyncSource::insertItemRaw(std::string const&, std::string
const&) (TrackingSyncSource.cpp:180)
==29516== by 0xD1E1E3: SyncEvo::Cmdline::insertItem(SyncEvo::SyncSourceRaw*,
std::string const&, std::string const&) (Cmdline.cpp:1732)
==29516== by 0xD1614B: SyncEvo::Cmdline::run() (Cmdline.cpp:1510)
==29516== by 0xB7197B: main (syncevolution.cpp:531)
...
That looks like libebook produces an invalid EContact instance. Do you want to
investigate that further or may I close it as "NOTOURBUG"?
Regarding syncing with the phone, what issue do you see there? Also a crash?
To debug that, run the sync with loglevel=4 and then check the
syncevolution-log.html. It should show in great detail how the incoming vCard
is handled.
Note that empty lines in vCard and iCalendar are dubious. The specs do not
cover the case. I just checked it the other day because KDE also inserts an
empty line in iCalendar items. The consensus seems to be that parsers should
handle it, but generators should avoid it, because some parsers fail on empty
lines.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.