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

Wireshark-dev: [Wireshark-dev] Crash in gtk_stats_tree_cb()

From: Gisle Vanem <gvanem@xxxxxxxxxxxx>
Date: Tue, 23 Aug 2011 18:58:08 +0200
When right after statup and before I choose any interface, I get a crash
when I enter the "Statistics | Packet Lengths.." menu. From WinDbg:

wireshark!gtk_stats_tree_cb(struct _GtkAction * action = 0x63a57e95, void * user_data = 0x03fb63f0)+0x44
WARNING: Stack unwind information not available. Following frames may be wrong.
libgobject_2_0_0!g_closure_invoke+0x115
libgobject_2_0_0!g_signal_has_handler_pending+0xf45
libgobject_2_0_0!g_signal_emit_valist+0x7b1
libgobject_2_0_0!g_signal_emit+0x26
...

Looks like the offending line is:

cfg = stats_tree_get_cfg_by_abbr(abbr);
if(cfg){
 tap_param_dlg_cb(action, cfg->pr->stat_dlg);    << !!
}else{
       simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
                     "Failed to find the stat tree named %s",
                     abbr);

I.e. 'cfg' is != NULL, but 'cfg->pr' is.

--gv