Re: How to confirm a memory leak

2016-08-01 Thread Emmanuele Bassi
an Goldstein <norm...@telus.net> wrote: >> I'd like to understand how to confirm a potential memory leak in gtk3. >> Valgrind shows a definite leak, and "top" shows a steadily increasing >> resident set size (RES). However, as I have come to understand, due to how >

Re: How to confirm a memory leak

2016-08-01 Thread Emmanuele Bassi
--suppressions=libvips.supp --leak-check=yes >> ./myprogram >> >> And hopefully you'll see "0 bytes definitely lost". >> >> John >> >> >> >> >> On 28 July 2016 at 17:18, Norman Goldstein <norm...@telus.net> wrote: >&g

Re: How to confirm a memory leak

2016-08-01 Thread Norman Goldstein
program with: valgrind --suppressions=libvips.supp --leak-check=yes ./myprogram And hopefully you'll see "0 bytes definitely lost". John On 28 July 2016 at 17:18, Norman Goldstein <norm...@telus.net> wrote: I'd like to understand how to confirm a potential memory leak in

Re: How to confirm a memory leak

2016-07-30 Thread jcupitt
tand how to confirm a potential memory leak in gtk3. > Valgrind shows a definite leak, and "top" shows a steadily increasing > resident set size (RES). However, as I have come to understand, due to how > gtk/glib uses slices for memory management, and how the m

How to confirm a memory leak

2016-07-30 Thread Norman Goldstein
I'd like to understand how to confirm a potential memory leak in gtk3. Valgrind shows a definite leak, and "top" shows a steadily increasing resident set size (RES). However, as I have come to understand, due to how gtk/glib uses slices for memory management, and how the main lo

Re: Help with GtkBuilder memory leak

2016-06-02 Thread Giovanni Panozzo
Yes, various libraries in the stack perform one-off allocations; these are *NOT* leaks, since they do not grow unbounded and are collected by the OS at the end of the process. Yes! I modified builderleak.c allocating 1000 times GtkBuilder and deallocating it just after. The leak reported by

Re: Help with GtkBuilder memory leak

2016-06-02 Thread Emmanuele Bassi
Hi; On 2 June 2016 at 16:45, Giovanni Panozzo wrote: > I tryied to unref it, but memory leaks are still here. Almost all are > indicating something allocated inside libfontconfig and never freed :( Yes, various libraries in the stack perform one-off allocations; these are

Re: Help with GtkBuilder memory leak

2016-06-02 Thread Giovanni Panozzo
Thank you for answering. Use Valgrind, instead. I will try. g_object_unref (b); It's good to know that I can destroy the GtkBuilder object early in the application. I didn't know it. I tryied to unref it, but memory leaks are still here. Almost all are indicating something

Re: Help with GtkBuilder memory leak

2016-06-02 Thread Emmanuele Bassi
Hi; you're missing a `g_object_unref()` inside the `activate` handler: On 2 June 2016 at 16:03, Giovanni Panozzo wrote: > > I'm trying to identify some memory leaks of my application using > -fsanitize=address of GCC. Use Valgrind, instead. > static void > activate

Help with GtkBuilder memory leak

2016-06-02 Thread Giovanni Panozzo
I'm trying to identify some memory leaks of my application using -fsanitize=address of GCC. But really I came to a point where all seems to be inside GTK. Here is my small test program, compile - builderleak.c - #include GtkApplicationWindow *w;

Re: GTK 2.24.10 memory leak on win32?

2012-07-03 Thread Gabriele Greco
code (that I think is correct) do not leak in linux (ubuntu 12.04, gtk 2.24.10) nor on win32 (GTK 2.16) while it leaks about 12kbyte/sec with GTK 2.24.10 on win32. G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck --num-callers=32 src/your-binary I had already tested

Re: GTK 2.24.10 memory leak on win32?

2012-07-03 Thread jcupitt
On 2 July 2012 15:44, Gabriele Greco gabriele.gr...@darts.it wrote: I'm posting the code here before creating a bugzilla entry for it since I'm not sure I can use g_idle_add to notify a new frame is available without freeing the source, that works in linux and in older WIN32 versions and it

Re: GTK 2.24.10 memory leak on win32?

2012-07-03 Thread Gabriele Greco
... on win32 with gtk 2.24.10 (20120208 bundle from gtk.org) the program leaks about 10kb per sec, and as I said there is no leak also on win32 with 2.16.6 (20100207 bundle from gtk.org) Filed bug 679312 https://bugzilla.gnome.org/show_bug.cgi?id=679312 -- Bye, Gabry

Re: GTK 2.24.10 memory leak on win32?

2012-07-03 Thread Gabriele Greco
Your code looks a bit strange, but I agree it should work with no leaks. Probably a bug. In the real code there are 1 to X (up to 12) GdkImage(s) that are semaphore protected and filled by h264 decoders in different threads. Once the thread fills his GdkImage with the frame data it uses

Re: GTK 2.24.10 memory leak on win32?

2012-07-02 Thread Olivier Sessink
On 07/02/2012 04:44 PM, Gabriele Greco wrote: We have found a regression that block us to migrate our existing apps from GTK 2.16.x to GTK 2.24.10 (20120208), it seems there is a memory leak in g_idle_add() use or something related to queue_draw(), anyway the following code (that I think

Is this a memory leak?

2011-11-14 Thread Traktor Toni
Hi, I'm using librsvg-2. Just calling rsvg_init() rsvg_term() tells bytes possibly lost in valgrind at line g_type_init_with_debug_flags inside rsvg_init(). Also, why is it still calling g_type_init_with_debug_flags even though I'm not compiling with any -g flag? Thanks guys, this is

Re: Is this a memory leak?

2011-11-14 Thread Emmanuele Bassi
no, a one-off memory allocation is not a memory leak. there have been multiple threads regarding using Valgrind with Glib and Gtk+; I suggest you look at the Gnome wiki and the archives of this list. ciao, Emmanuele. sent from my phone, sorry for the formatting. On 14 Nov 2011 19:03, Traktor

Re: Is this a memory leak?

2011-11-14 Thread David Nečas
On Wed, Nov 09, 2011 at 02:38:44PM +0100, Traktor Toni wrote: Hi, I'm using librsvg-2. Just calling rsvg_init() rsvg_term() tells bytes possibly lost in valgrind at line g_type_init_with_debug_flags inside rsvg_init(). Do you use nip2.supp? Also, why is it still calling

Re: gtk_widget_destroy(my_window) memory leak

2011-05-04 Thread Allin Cottrell
On Wed, 4 May 2011, jessonel wrote: Have ever reported the memory leak of gtk_widget_destroy? Yes, hundreds of people. Have you heard of a useful tool called google? 99.9 percent of such leak reports are bogus, reflecting lack of knowledge of how memory management works in the GTK stack. Allin

How Test Gtk GUI application memory leak and Property Chages

2009-11-04 Thread Balakrishnan V
HI, I need to test GUI gtk program. this Include following requirements * Capture and Replay X events... here we have some tools (Xnee) ** Test Heap usage only GTK lib using (not include other lib heap usage like pango)* *Problem here all libs using same heap ... information providing in smaps

Re: valgrind reports memory leak on g_main_loop_run

2008-12-17 Thread Alexander Semenov
Sune Ahlgren wrote: Hi, I use 1 GMain event loop in my main context for monitoring of events on file descriptors. I shut down my program by receiving a SIGTERM. In this signal handler I do the following: g_main_loop_quit(loop); g_main_loop_unref(loop); loop = NULL; I've also tried to

Re: Confusing about memory leak and GtkTreeView, GtkCellRendererCombo GtkCellRendererSpin

2008-12-11 Thread Yu Feng
-ref_count = 1 adj-is_floating = -1 the remaining ref_count of adj shouldn't be freed by you. It will be freed in GObjectClass-dispose of renderer. (that's why that reference is owned by renderer: who frees, who owns) Yu On Fri, 2008-12-12 at 14:10 +0900, Keedi Kim wrote: HI, :-) Memory leak

Re: Confusing about memory leak and GtkTreeView, GtkCellRendererCombo GtkCellRendererSpin

2008-12-11 Thread Keedi Kim
-dispose of renderer. (that's why that reference is owned by renderer: who frees, who owns) Yu On Fri, 2008-12-12 at 14:10 +0900, Keedi Kim wrote: HI, :-) Memory leak and reference counts are very confused. I am using GtkTreeView with GtkCellRendererCombo and GtkCellRenderSpin. So, I

Re: {Spam?} Re: memory leak in gtk

2007-11-25 Thread Emmanuele Bassi
On Sat, 2007-11-24 at 10:09 +0100, Vincent Torri wrote: From what I've heard about memory leaking, this is not unique to the GTK library. If the rumours are correct, applications like `ls` are notorious for leaking memory, safe in the knowledge that the OS will clean up after them.

Re: {Spam?} Re: memory leak in gtk

2007-11-24 Thread Vincent Torri
On Sat, 24 Nov 2007, Michael Lamothe wrote: From what I've heard about memory leaking, this is not unique to the GTK library. If the rumours are correct, applications like `ls` are notorious for leaking memory, safe in the knowledge that the OS will clean up after them. and if someone

Re: {Spam?} Re: memory leak in gtk

2007-11-24 Thread Junior Polegato - GTK+ GTKmm
Vincent Torri escreveu: On Sat, 24 Nov 2007, Michael Lamothe wrote: From what I've heard about memory leaking, this is not unique to the GTK library. If the rumours are correct, applications like `ls` are notorious for leaking memory, safe in the knowledge that the OS will clean

Re: {Spam?} Re: {Spam?} Re: memory leak in gtk

2007-11-24 Thread Junior Polegato - GTK+ GTKmm
Vincent Torri escreveu: On Sat, 24 Nov 2007, Junior Polegato - GTK+ GTKmm wrote: Vincent Torri escreveu: On Sat, 24 Nov 2007, Michael Lamothe wrote: From what I've heard about memory leaking, this is not unique to the GTK library. If the rumours are correct, applications like `ls` are

Re: is there a memory leak problem with gtk_widget_queue_draw()?

2007-09-09 Thread okty
Does the profiler report the problem is inside gtk_widget_queue_draw code? Actually, Glib's memory profiling does not show the exact place where memory leak occurs, it just shows how much memory allocated. it is not as comprehensive as Valgrind. May be it is better to check with Valgrind

is there a memory leak problem with gtk_widget_queue_draw()?

2007-09-07 Thread okty
Hi, I am using GLib's memory profiling to check memory usage of my program. I noticed that for each refresh in my screen with gtk_widget_queue_draw(), I am checking my allocated memory and each refresh increases the size of allocated memory. Do you know any memory leak problem

Re: is there a memory leak problem with gtk_widget_queue_draw()?

2007-09-07 Thread Jim George
know any memory leak problem in gtk_widget_queue_draw()? The page http://live.gnome.org/Valgrind has some info on providing flags to glib, making it use less efficient (but memcheck-friendly) memory allocation code. Also, try writing a bare-bones program that does nothing except call

Re: is there a memory leak problem with gtk_widget_queue_draw()?

2007-09-07 Thread Fernando Apesteguía
know any memory leak problem in gtk_widget_queue_draw()? I've never used Glib's memory profiling, but sometimes other programs like Valgrind (you could use this as well) report false positives in memory leaks. It has something to do with the way the memory is allocated (GAllocator is specially

how do I plug this glib main loop memory leak?

2006-07-25 Thread Sebastian Kuzminsky
I'm not understanding something about the glib main loop and reference counting. I've got this trivial program that does nothing: - begin - #include signal.h #include stdio.h #include glib.h GMainLoop* main_loop = NULL; void signal_handler(int signo) {

Re: how do I plug this glib main loop memory leak?

2006-07-25 Thread Tristan Van Berkom
time; ensures that glib has a default GMainContext, that GMainContext is used for every consecutive call to g_main_loop_new(). I dont think that the internal default context counts as a memory leak... Cheers, -Tristan ___ gtk

Is this TreeModel memory leak or something wrong in my code???

2006-05-18 Thread Viktors Petrovs
Hello, i'm trying to use GtkListStore. I'm calling this function many times (i use timer) and i see growing memory used by my program in Gnome System Monitor. What am i doing wrong? void test_add_delete_line (void) { GtkWidget *TreeView = lookup_widget (GTK_WIDGET (MainWindow),

Is this TreeModel memory leak or something wrong in my code???

2006-05-18 Thread Viktors Petrovs
Hello, i'm trying to use GtkListStore. I'm calling this function many times (i use timer) and i see growing memory used by my program in Gnome System Monitor. What am i doing wrong? void test_add_delete_line (void) { GtkWidget *TreeView = lookup_widget (GTK_WIDGET (MainWindow),

Re: GLib/GModule Memory Leak? [now also GThread]

2006-04-25 Thread Nathaniel McCallum
I reran after implementing my app using GThreads and still got the attached results after using: env G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind --leak-check=full --show-reachable=yes. Notice also that there may be a small leak with g_thread_create(). Of course this could also be how I'm

Re: GLib/GModule Memory Leak?

2006-04-16 Thread Kalle Vahlman
On 4/15/06, Nathaniel McCallum [EMAIL PROTECTED] wrote: I hope this is the right list to ask this on. I ran valgrind on an application I'm developing with glib using gmodule. Results attached. I'm under the impression that valgrind and the new slice allocator code do not really mix. There is

RE: Will this create a memory leak? Can't determine from top.

2005-07-01 Thread Freddie Unpenstein
As I understand it string = g_strdup_printf(... produces a copy and points string towards that copy, the adress of the copy is then passed on by g_signal_connect as the data pointer, hence freeing string destroys the string and should not be done (and doing it produces random output in the

Re: Will this create a memory leak? Can't determine from top.

2005-06-28 Thread Tristan Van Berkom
Bartek Kostrzewa wrote: Should I define an array of char pointers *message[TABLE_SIZE][TABLE_SIZE] to hold the pointers created by g_strdup_printf or would that just be a waste of memory? I guess you want to free the string when the object emmiting the signal is finalized, in that case you

Re: Will this create a memory leak? Can't determine from top.

2005-06-28 Thread Tristan Van Berkom
Tristan Van Berkom wrote: Bartek Kostrzewa wrote: Should I define an array of char pointers *message[TABLE_SIZE][TABLE_SIZE] to hold the pointers created by g_strdup_printf or would that just be a waste of memory? I guess you want to free the string when the object emmiting the signal is

RE: How to deal with a possible Memory Leak when using GdkPixMap

2005-06-02 Thread Freddie Unpenstein
I have written a program pretty much by re-adjusting the scribble example from the GTK Tutorial, instead of creating my own PixMap in the configure_event I called the following function which creates a pixmap from file: pixbuf = gdk_pixbuf_new_from_file(filename,NULL); There's yor