Re: Gtk+-2.0 leaks memory
- From: Joël Krähemann <weedlight gmail com>
- To: Marcus Karlsson <mk acc umu se>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Gtk+-2.0 leaks memory
- Date: Sat, 25 Oct 2014 11:40:47 +0200
Am Samstag, den 25.10.2014, 11:07 +0200 schrieb Joël Krähemann:
Am Freitag, den 24.10.2014, 23:16 +0200 schrieb Marcus Karlsson:
On Fri, Oct 24, 2014 at 04:02:01PM +0200, Joël Krähemann wrote:
Hi
Hi.
Gtk+-2.0 leaks memory, please take a look at: http://ags.sourceforge.net
Is Gtk+-2.0 still maintained?
Yes it is. The latest point release happened just two weeks ago.
Or is migrating to Gtk+-3.0 the only choice? Or may someone could
explain me what's wrong about:
AgsAudioLoop *audio_loop;
AgsGuiThread *gui_thread;
auto void ags_gui_thread_do_gtk_iteration();
void ags_gui_thread_do_gtk_iteration(){
if(!g_main_context_acquire(main_context)){
gboolean got_ownership = FALSE;
while(!got_ownership){
got_ownership = g_main_context_wait(main_context,
&(gui_thread->cond),
&(gui_thread->mutex));
}
}
/* */
gdk_threads_enter();
gdk_threads_leave();
g_main_context_iteration(main_context, FALSE);
g_main_context_release(main_context);
}
gui_thread = AGS_GUI_THREAD(thread);
/* */
main_context = g_main_context_default();
ags_gui_thread_do_gtk_iteration();
Can you explain what the problem is and why you think that GTK+ leaks
memory? It's not apparent from the code snippet alone what you're having
problem with.
Marcus
Hi, the problematic part of my application is probably there's no
GMainLoop ...
How ever recent subversion tree uses GMainLoop and AgsGuiThread has a
GThread.
But I get the following errors:
Gdk:ERROR:/tmp/buildd/gtk
+2.0-2.24.10/gdk/gdkregion-generic.c:1306:miSubtractNonO1: assertion
failed: (y1<y2)
or
Gdk:ERROR:/tmp/buildd/gtk
+2.0-2.24.10/gdk/gdkregion-generic.c:1189:miUnionO: assertion failed:
(pNextRect[-1].x1<pNextRect[-1].x2)
or something like:
*** glibc detected *** ./ags: invalid fastbin entry (free):
0x0000000002872350 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x76a16)[0x7f230b3e5a16]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7f230b3ea7bc]
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0(gdk_region_destroy
+0x1b)[0x7f230cfdac5b]
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0(+0x3f9b8)[0x7f230cfe49b8]
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0(+0x3fc83)[0x7f230cfe4c83]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0xccf99)[0x7f230d324f99]
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0(+0x20327)[0x7f230cfc5327]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch
+0x135)[0x7f230e408355]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a688)[0x7f230e408688]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run
+0x72)[0x7f230e408a82]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x118db)[0x7f230e92e8db]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist
+0x6f6)[0x7f230e947006]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit
+0x82)[0x7f230e947852]
./ags(ags_thread_start+0x86)[0x4dfac6]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x119a7)[0x7f230e92e9a7]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist
+0x6f6)[0x7f230e947006]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit
+0x82)[0x7f230e947852]
./ags(ags_thread_start+0x86)[0x4dfac6]
./ags(main+0x396)[0x44ea56]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f230b38dead]
./ags[0x44eca9]
regards
Joël
Someone implementing g_main_context_get_owner() would be great.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]