GNOME Bugzilla – Bug 679487
Huge memory leaks
Last modified: 2012-07-11 22:08:24 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.
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 ?
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
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
Cool, thanks for your time and work. Much appreciated!