Re: [Evolution-hackers] valgrind error in evolution-addressbook-factory + libdb

2012-03-07 Thread Patrick Ohly
On Tue, 2012-03-06 at 14:33 +0100, Patrick Ohly wrote:
 Hello!
 
 Checking the EDS daemons from master under valgrind found this:
 
 # ==23596== Conditional jump or move depends on uninitialised value(s)
 # ==23596==at 0x9A404E7: ??? (in /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x9A41CB1: __log_put (in 
 /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x9A42F2D: ??? (in /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x9A43D9F: __log_put_record (in 
 /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x9986B1B: __ham_add_el (in 
 /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x997E1FD: ??? (in /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x99F5548: __dbc_iput (in 
 /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x99F314F: __db_put (in 
 /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x9A04EBA: __db_put_pp (in 
 /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 # ==23596==by 0x103CC953: do_create (e-book-backend-file.c:915)
 # ==23596==by 0x103CCBFC: e_book_backend_file_create_contacts 
 (e-book-backend-file.c:988)
 # ==23596==by 0x4E4AC31: e_book_backend_sync_create_contacts 
 (e-book-backend-sync.c:85)
 # ==23596==by 0x4E4D3D7: book_backend_create_contacts 
 (e-book-backend-sync.c:493)
 # ==23596==by 0x4E4ED2A: e_book_backend_create_contacts 
 (e-book-backend.c:465)
 # ==23596==by 0x4E513D3: operation_thread (e-data-book.c:157)
 # ==23596==by 0x83E9D07: ??? (in 
 /lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.2)
 # ==23596==by 0x83E77E5: ??? (in 
 /lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.2)
 # ==23596==by 0x8678B4F: start_thread (pthread_create.c:304)
 # ==23596==by 0x896690C: clone (clone.S:112)
 # ==23596==  Uninitialised value was created by a stack allocation
 # ==23596==at 0x994DB80: ??? (in /usr/lib/x86_64-linux-gnu/libdb-5.1.so)
 
 That is with libdb 5.1.29-1 from Debian Testing, in 64 bit mode.
 
 At first glance it doesn't look like EDS can be causing this. I don't
 have time to investigate by compiling libdb from source right now, but
 at least I wanted to point out that there might be a cause for random
 crashes.

It's not bad as I thought. Am I too pessimistic? ;-)

I've tracked it down and filed a bug against Debian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662917

From the report:
-
I've tracked the root cause in __ham_add_el() in src/hash/hash_page.c:

if (is_databig) {
doff.type = H_OFFPAGE;
===UMRW_SET(doff.unused[0]);
===UMRW_SET(doff.unused[1]);
===UMRW_SET(doff.unused[2]);

UMRW_SET is a NOP unless --enable-umrw is used during
configure. Compiling with --enable-umrw avoids the valgrind warning.

The unitialized value is used in a comparison of a checksum with 0.
I can convince myself that this is probably okay, because it doesn't
matter whether some of the data the checksum was calculated over
was uninitialized as long as it doesn't change later on.

But nevertheless, having to deal with such random valgrind errors
while debugging other code isn't nice. Please consider using
--enable-umrw when compiling libdb.



-- 
Bye, Patrick Ohly
--  
patrick.o...@gmx.de
http://www.estamos.de/


___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] listening to signals from the message list

2012-03-07 Thread David Roguin
On Tue, Mar 6, 2012 at 6:57 PM, Matthew Barnes mbar...@redhat.com wrote:
 On Tue, 2012-03-06 at 17:06 -0300, David Roguin wrote:
 I'm writing a simple evolution extension. I've arleady have access to
 the mail shell_window, but the problem I have is I can't find a way to
 receive an event whenever the user select a message from the mail
 list.
 I've unsuccesfully tried to look for a GtkTreeView on the ui_manager
 and I couldn't find anything in the EShell* docs.

 If anyone could point me into the right direction I'd be grateful.

 If you need the selected CamelMimeMessage as shown in the preview pane,
 I recently added an EMailReader::message-loaded signal that you can tap.

 See the mdn module for an example of connecting to this signal:
 http://git.gnome.org/browse/evolution/tree/modules/mdn/evolution-mdn.c

 Hope this helps,
 Matthew Barnes


It helped, but not quite the way I needed. Maybe I should explain a
little more what I am doing. First, I need to get the EShellWindow
because I'm adding a new button to the toolbar (Maybe there's another
way to do it, but using the UiManager is the only way I know). And
then I want to know when the user is selecting a message from the
message list so I know to which message the user is working on.

By the way, do you know how the message list is called?

Thanks!

-- 
David
___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers