Re: Balsa crashes after sending message



On 2001.08.30 03:30 Ismas Suraya wrote:
> Hi there,
> 
> I'm a new user and I'm not sure if anyone has detected this problem.
> If i delete the email address under Identity window(leave the field
> blank),
> whenever I tried to send messages balsa will crash.
> I've tried Balsa version 1.1.4 even the new version 1.2 pre2 on RH7.1,
> but it
> still crashes after I deleted the email address.
> This is the error message before it crashes:
> 
> ** CRITICAL **: file address.c: line 190 (libbalsa_address_to_gchar):
>  assertion `LIBBALSA_IS_ADDRESS(address)' failed.
> 
> Can anyone tell me on how to solve this problem? Thanks very much for
> your help!

I have spotted the buggy point : in src/sendmsg-window.c, around line 1928,
here it is

static LibBalsaMessage *
bsmsg2message(BalsaSendmsg * bsmsg, gboolean dup_filenames)
{
    LibBalsaMessage *message;
    LibBalsaMessageBody *body;
    GList *list;
    gchar *tmp;
    gchar recvtime[50];
    struct tm *footime;

    g_assert(bsmsg != NULL);
    message = libbalsa_message_new();

    message->from = 
        libbalsa_address_new_from_string(gtk_entry_get_text
                                         (GTK_ENTRY(bsmsg->from[1])));

We don't test for message->from to be NULL (and it is when you make the
manip you describe, and when libmutt is not happy with the address given in
general). We should test message->from not being NULL and exit if it is
with a explanation message. Perhaps we should do that even when editing the
identity, to prevent bad identity settings.
So for now possible fix is to add the lines

if (message->from==NULL) {
g_free(message);
return NULL;
}

AND anywhere bsmg2message is called, we must add the test of the returned
value being NULL and take decision there on what to do. Sorry I can't help
more than that.
Bye
Manu




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]