Wireshark-bugs: [Wireshark-bugs] [Bug 5873] New: stat dialogs are leaking UI memory.
Date: Fri, 29 Apr 2011 10:54:16 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5873

           Summary: stat dialogs are leaking UI memory.
           Product: Wireshark
           Version: SVN
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: dgautheron@xxxxxxxx


Build Information:

TShark 1.5.2 (SVN Rev Unknown from unknown)

Copyright 1998-2011 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (32-bit) with GLib 2.26.1,...

--
Hi

it looks like wireshark is never freeing menu memory in stat dialog box.

Open a small file, Statistics/Conversations again and again, memory usage grows
by 3MB on each opening 

For testing I ran it with the following patch. no more leak.
I don't know enough of gtk for a proper fix.

--- gtk/conversations_table.c   2011-04-26 17:25:30 +0000
+++ gtk/conversations_table.c   2011-04-29 17:37:50 +0000
@@ -1927,10 +1927,12 @@
 static void
 ct_create_popup_menu(conversations_table *ct)
 {
+static GtkWidget *menu = NULL;
+
        GtkUIManager *ui_manager;
        GtkActionGroup *action_group;
        GError *error = NULL;
-
+if (menu == NULL) {
        action_group = gtk_action_group_new ("ConvActionGroup");
        gtk_action_group_add_actions (action_group,                            
                        /* the action group */
                                                               
conv_filter_menu_entries,                               /* an array of action
descriptions */
@@ -1948,7 +1950,11 @@
         error = NULL;
     }  
        ct->menu = gtk_ui_manager_get_widget(ui_manager,
"/ConversationFilterPopup");
-
+       menu = ct->menu;
+}
+else {
+    ct->menu = menu;
+}
        g_signal_connect(ct->table, "button_press_event",
G_CALLBACK(ct_show_popup_menu_cb), ct);

 }

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.