After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679487 - Huge memory leaks
Huge memory leaks
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
3.12.x
Other Linux
: Normal major
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-06 03:16 UTC by ribemont.francois
Modified: 2012-07-11 22:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the glade file (152.97 KB, application/x-glade)
2012-07-06 03:16 UTC, ribemont.francois
Details

Description ribemont.francois 2012-07-06 03:16:03 UTC
Created attachment 218145 [details]
the glade file

My glade file contains 2793. But when I remove a widget, and add a TextView instead, glade starts filling up my memory at an incredible speed. I have 4Gib of memory, and 2 for the Swap partition. I killed glade before the swap was full. I tried again and the bug occurred again too.
I attached the glade file. If you want to reproduce the bug, do as follow:
1) Remove the widgets in the Playlists and Streams tab (one button in each tab)
2) Add a TextView instead

You'll see that glade starts filling up your memory.

Thanks in advance.
Comment 1 Tristan Van Berkom 2012-07-06 22:51:31 UTC
Thanks for the report.

For the record, yes it's of importance to us to be efficient
when people throw huge ui files at Glade, we want to optimise
and yada yada.. but I would also recommend you keep your UI files
down to less than 100 widgets.

Is there something about your project that implies that splitting
it up makes no sense ?

For instance, I imagine your application is some huge sound mixer of
sorts... or a user interface to a panel on your space ship controlling
the temperature and gravity of every single compartiment of your
space craft...

In this case, can't the individual control style/layout for the
gravity and temperature control for a specific capsule be defined
in it's own builder file ? and then re-included in the master control
panel ? (or even design a row of controls, one for each flight deck;
and stack them in the main control panel).

This way you would still get 2793 widgets built... but only less then like
50 widgets defined in Glade... right ?
Comment 2 ribemont.francois 2012-07-06 23:03:31 UTC
Thanks for the reply.
I know what you mean. But there aren't 2793 widgets ! There is just a main window containing some widgets, and a couple of dialog windows. I don't think this is that much. The 2793 lines I was taking about are the lines in the glade files which also contains a lot of static data (the about dialog information for example). And glade works fine until I do as I described (it takes over than 3Gib in the memory while the glade file is about 150Kib).
So yes, I can split the file into 2 files at least, but it wouldn't fix galde's bug, and as I said, I don't think my "small" application should be a problem for a software such as glade.
Regards
Comment 3 Juan Pablo Ugarte 2012-07-11 21:59:53 UTC
Fixed in master and glade-3-12
The problem was in glade_project_check_reordered() when called with a child not in a project which led to a call to gtk_tree_model_rows_reordered() with less order indexes than children thus the crash/leak
I also added a better check in glade_widget_child_set_property() to make sure we do not call glade_project_check_reordered() is child in not in a project
Comment 4 ribemont.francois 2012-07-11 22:08:24 UTC
Cool, thanks for your time and work. Much appreciated!