Johnny [Life & Code]

Semper Exploro!

The Best work i’v done till now .. .. .. .

leave a comment »

Bug 330955 – ‘Click to add a memo entry’ missing in UI

We are  in a UI Freeze and a feature is missing …
So chen asked me to work on it. I took a look at the code and found that "tasks" and "memos" are smiliar and sometimes they even have the same var names. Looking the code i understood that they use e-tables. Found the hierarchy. Then there was this xml file *.etspec – etables-spec. Implies that it says how the table should be created. Took a look into it and found that it pretty readable.
"Click to add memo" feature was simply turned off. Ithought this would be a easy fix. So i changed it to "on". Hurrah i got the bar . now tried entering the values and pressed enter … Yes. it crashed …
Took a look at the stack trace in bug buddy. Launched GDB within emacs. Reproduced the crash.

#10 0x40b030a2 in ORBit_c_stub_invoke () from /opt/gnome/lib/libORBit-2.so.0
#11 0x403ef39c in GNOME_Evolution_Calendar_Cal_createObject (_obj=0x45201458, calobj=0x0, ev=0xbfa199a8)
    at Evolution-DataServer-Calendar-stubs.c:171
#12 0x403f7cab in e_cal_create_object (ecal=0x4044ddc4, icalcomp=0x0, uid=0x0, error=0x0) at e-cal.c:4293
#13 0x44846483 in ecm_append_row (etm=0x8362210, source=0x84581d8, row=0) at e-cal-model.c:765
#14 0x4014cd45 in e_table_model_append_row (e_table_model=0x8362210, source=0x84581d8, row=0) at e-table-model.c:102
#15 0x4014db78 in e_table_one_commit (one=0x84581d8) at e-table-one.c:240

Hmmm, that looks suspicious. How can that return null. The nest thing about GDB inside EMACS is that i can directly use etags on the trace. Took a look into the code and found that VJOURNAL is not handled there. So added code there to handle that. Ok looks like everything is fixed. strange i’m able to add data , but cannot save it. I lose it all the time. Hmmm, So i wanted to know how they save and retrive the values in memo-page. haha.. The caption says summary but they are actually put in ‘description’ and also added in summary.
Opened etspec again and changed the column to be used to description. Every thing looks fine. .. .. Now wen i add data, it again crashes or doesnt add "summary". again GDB *within* EMACS. took a look at the trace.

#0  0x41508dc3 in strlen () from /lib/tls/libc.so.6
#1  0x40126709 in ect_load_state (ecell_view=0x8485d50, model_col=4, view_col=1, row=0, edit_context=0x0, save_state=0x8309e90) at e-cell-text.c:1270
#2  0x401219af in e_cell_load_state (ecell_view=0x8485d50, model_col=4, view_col=1, row=0, edit_context=0x0, save_state=0x8309e90) at e-cell.c:405
#3  0x4014688c in eti_event (item=0x8423288, e=0x80f8110) at e-table-item.c:2867
#4  0x40bc5d50 in gnome_canvas_marshal_BOOLEAN__BOXED () from /opt/gnome/lib/libgnomecanvas-2.so.0
#5  0x41174637 in g_cclosure_new_swap () from /opt/gnome/lib/libgobject-2.0.so.0

yup, somewhere i’m loosing the data. But when summary is used, it works perfect, So compared how summary and description are handled. Almost same … But in a function *duplicate_value* Description was missed out. Great. found that actually returns a NULL which is the reason for the crash. Added code there…

And tada … It works 🙂

But it wasnt as easy it sounds.. But loved what i did. Learnt a lot.

Advertisements

Written by Johnny

February 16, 2006 at 3:20 pm

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: