Le lundi 16 novembre 2009 Ã 11:17 +0100, Philip Van Hoof a Ãcrit :
On Sun, 2009-11-15 at 17:18 +0100, Laurent Aguerreche wrote:Hi! tracker-store crashes if I use Unac. First, I provide you a patch to set the path for Unac include files: --- a/src/libtracker-fts/Makefile.am +++ b/src/libtracker-fts/Makefile.am @@ -11,6 +11,10 @@ INCLUDES = \ $(DBUS_CFLAGS) \ $(SQLITE3_CFLAGS) +if HAVE_UNAC +INCLUDES += $(UNAC_CFLAGS) +endif + noinst_LTLIBRARIES = libtracker-fts.la Now, the crash... First, it only happens with Unac. Second, it does not happen if I build tracker with "-O0".Well you can probably imagine that I too, like you did as you apparently looked at that variable too, why parser suddenly turns into NULL for you. Perhaps try to nonetheless reproduce with -O0 because as far as I can see is that parser=0x0 a GDB quirk. Perhaps set a break point on 445 and test 'parser' with gdb, then step into 447 and see what happens with it?
Well I do not see anything relevant (Tracker is built with -O0):
Tracker-Message: Registering D-Bus object...
Tracker-Message:
Path:'/org/freedesktop/Tracker1/Resources/Classes/mfo/FeedMessage'
Tracker-Message:   Type:'TrackerResourceClass'
Tracker-Message: Waiting for D-Bus requests...
Breakpoint 2, parser_next (parser=0xa96800,
byte_offset_start=0x7fffffffc2a4, byte_offset_end=0x7fffffffc2a0) at
tracker-parser.c:445
445                     parser->cursor = g_utf8_next_char (parser->txt +
*byte_offset_end);
(gdb) print parser
$1 = (TrackerParser *) 0xa96800
(gdb) print *parser
$2 = {txt = 0xa9c980 "Test ", txt_size = 5, language = 0xa96760,
enable_stemmer = 1, enable_stop_words = 1, max_words_to_index = 0,
max_word_length = 30, min_word_length = 3, delimit_words = 0, 
  parse_reserved_words = 0, word = 0x0, word_length = 0, word_position =
0, encoding = TRACKER_PARSER_ENCODING_ASCII, cursor = 0x0, attrs = 0x0,
attr_length = 0, attr_pos = 0}
(gdb) print parser->cursor
$3 = (const gchar *) 0x0
(gdb) b 447
Breakpoint 3 at 0x7ffff7de6cb4: file tracker-parser.c, line 447. (2
locations)
(gdb) c
Continuing.
Breakpoint 3, parser_next (parser=0xa96800,
byte_offset_start=0x7fffffffc2a4, byte_offset_end=0x7fffffffc2a0) at
tracker-parser.c:447
447                     processed_word = tracker_parser_process_word (parser, utf8, bytes,
do_strip);
(gdb) print *parser
$4 = {txt = 0xa9c980 "Test ", txt_size = 5, language = 0xa96760,
enable_stemmer = 1, enable_stop_words = 1, max_words_to_index = 0,
max_word_length = 30, min_word_length = 3, delimit_words = 0, 
  parse_reserved_words = 0, word = 0x0, word_length = 0, word_position =
0, encoding = TRACKER_PARSER_ENCODING_ASCII, cursor = 0xa9c985 "", attrs
= 0x0, attr_length = 0, attr_pos = 0}
(gdb) print parser->cursor
$5 = (const gchar *) 0xa9c985 ""
(gdb) c
Continuing.
Tracker-Message: Statistics cache has expired, updating...
Tracker-Message: Requesting statistics from database for an accurate
signal
...
Valgrind is also not being very helpful, claiming that it might be a stackoverflow. But then I'm sure it wouldn't consistently happen at the same location. Perhaps also try with another version of libunac?
When I reported the first crash I was using unac 1.7. I also have crashes with unac 1.5. I cannot build unac 1.4 because I use a 64 bits platform. To be honest, I will not be able to dig into unac code because it is too complicated for the time I have. Laurent.
You will find in attachments a valgrind log, a GDB backtrace and the build log of Tracker where I see many warnings that seem to be quite easy to fix. Perhaps I see some of them because I use a 64 bits platform. For each trace, I used the following environment variables : export G_SLICE=always-malloc export G_DEBUG=gc-friendly For each trace, I first launched tracker-store, then tracker-miner-fs. Tracker has been built with default cflags. Just a question about Unac: it seems to be unmaintained and I have been unable to build it directly without hacking parts of its test suite. So is this library a good choice for Tracker? Moreover I would add that it is not shipped with Fedora 11 and I am not sure it will be in next versions... Laurent. _______________________________________________ tracker-list mailing list tracker-list gnome org http://mail.gnome.org/mailman/listinfo/tracker-list
Attachment:
signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=