Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Dev Wireshark crash after create new profile/quit; Related t

From: Kovarththanan Rajaratnam <kovarththanan.rajaratnam@xxxxxxxxx>
Date: Wed, 02 Sep 2009 21:59:48 +0200
Kovarththanan Rajaratnam wrote:
Hey Bill,

Bill Meier wrote:
Recent Wireshark SVN versions have been crashing as follows:

1. Run Wireshark
2. Create a new profile (Edit ! Configuration Profiles ...)
3. Quit Wireshark

Looking at the crash, it turns out that write_profile_recent() in recent.c is dying when attempting to write a time-format text value
because recent.gui_time_format has a value of -1.

This works in 1.2.0.

Could this issue be related to all the recent
"GTK2-based packet list" changes ??

I can't work out which change that caused this issue. I'd had a look in menu_recent_read_finished() and found the following:

.....
/* set_active will not trigger the callback when activating an active item! */
    recent.gui_time_format = -1;
    gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), FALSE);
    gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), TRUE);
.....

But some of the case statements only contains the following:

    recent.gui_time_format = -1;
    gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), TRUE);

Is this an error? I've attached a patch. I don't think this is the correct fix because it used to work so we properly need to address the real problem and not the symptom.

I've submitted the proposed fix:

http://anonsvn.wireshark.org/viewvc?view=rev&revision=29678