Gtkmm-forge Digest, Vol 22, Issue 8

From: gtkmm-forge-request lists sourceforge net

To: gtkmm-forge lists sourceforge net

Subject: Gtkmm-forge Digest, Vol 22, Issue 8

Date: Mon, 24 Mar 2008 12:52:25 -0700

Send Gtkmm-forge mailing list submissions to
gtkmm-forge lists sourceforge net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/gtkmm-forge
or, via email, send a message with subject or body 'help' to
gtkmm-forge-request lists sourceforge net
You can reach the person managing the list at
gtkmm-forge-owner lists sourceforge net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gtkmm-forge digest..."
gtkmm-forge is the mailing list that receives gtkmm bug reports from bugzilla. A daily digest is sent to gtkmm-main, to encourage people to help fixing the bugs. Do not try to unsubscribe gtkmm-forge from gtkmm-list.
Today's Topics:
1. [Bug 520778] [PATCH] GNode wrapper implementation
(glibmm (bugzilla.gnome.org))
2. [Bug 524128] Gtk::TextView widget doesn't like being updated
from other threads (gtkmm (bugzilla.gnome.org))
3. [Bug 524128] Gtk::TextView widget doesn't like being updated
from other threads (gtkmm (bugzilla.gnome.org))
4. [Bug 524128] Gtk::TextView widget doesn't like being updated
from other threads (gtkmm (bugzilla.gnome.org))
5. [Bug 520778] [PATCH] GNode wrapper implementation
(glibmm (bugzilla.gnome.org))
6. [Bug 524128] Gtk::TextView widget doesn't like being updated
from other threads (gtkmm (bugzilla.gnome.org))
7. [Bug 524128] Gtk::TextView widget doesn't like being updated
from other threads (gtkmm (bugzilla.gnome.org))
8. [Bug 147342] managed child widget not deleted when used with
bonobo_control_new() (gtkmm (bugzilla.gnome.org))
----------------------------------------------------------------------
Message: 1
Date: Mon, 24 Mar 2008 15:49:38 +0000 (UTC)
From: "glibmm (bugzilla.gnome.org)"
<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 520778] [PATCH] GNode wrapper
implementation
To: gtkmm-forge lists sourceforge net
Message-ID: <20080324154938 1EED423F504 label gnome org>
Content-Type: text/plain; charset=utf-8
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=520778
glibmm | general | Ver: 2.15.x
Levi Bard changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #107524|0 |1
is obsolete| |
------- Comment #7 from Levi Bard 2008-03-24 15:49 UTC -------
Created an attachment (id=107926)
--> (http://bugzilla.gnome.org/attachment.cgi?id=107926&action=view)
Updated per comment #6
This will require value types to have a working operator=. Hopefully this isn't
too high a price to pay for more C++iness.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=520778.
------------------------------
Message: 2
Date: Mon, 24 Mar 2008 16:30:39 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 524128] Gtk::TextView widget doesn't
like being updated from other threads
To: gtkmm-forge lists sourceforge net
Message-ID: <20080324163039 E888F23F503 label gnome org>
Content-Type: text/plain; charset=utf-8
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=524128
gtkmm | build | Ver: 2.10.x
VAnhTu1987 gmail com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |VAnhTu1987 gmail com
------- Comment #3 from VAnhTu1987 gmail com 2008-03-24 16:30 UTC -------
Thank you for the reply, I tried g_thread_* functions since that seems to
easily integrate with existing applications.
The program barely crashes anymore (although perhaps I was just lucky), but the
TextView still got messed up when being updated from other threads, despite the
fact that I've surrounded Gtk::Main within a enter() and leave() pair like
this:
=========
gdk_threads_enter();
m_gtk_kit.run();
gdk_threads_leave();
=========
g_thread_init() and gdk_threads_init() were called before those above. It also
didn't work when I surrounded all Gtk::TextBuffer::insert_at_cursor() calls
with enter()/leave() pairs.
I've got lots of other threads other than this one (although only one of them
could be running at a time), and some timeout callbacks. Do I need to surround
the pair with every single one of them or do it like the illustrated example of
gdk-Threads is enough?.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=524128.
------------------------------
Message: 3
Date: Mon, 24 Mar 2008 16:35:15 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 524128] Gtk::TextView widget doesn't
like being updated from other threads
To: gtkmm-forge lists sourceforge net
Message-ID: <20080324163515 4D87923F503 label gnome org>
Content-Type: text/plain; charset=utf-8
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=524128
gtkmm | build | Ver: 2.10.x
------- Comment #4 from VAnhTu1987 gmail com 2008-03-24 16:35 UTC -------
Actually I can make it crash by scrolling the text view up and down a bit
harder :s . The errors were still random.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=524128.
------------------------------
Message: 4
Date: Mon, 24 Mar 2008 16:46:59 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 524128] Gtk::TextView widget doesn't
like being updated from other threads
To: gtkmm-forge lists sourceforge net
Message-ID: <20080324164659 198C023F503 label gnome org>
Content-Type: text/plain; charset=utf-8
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=524128
gtkmm | build | Ver: 2.10.x
------- Comment #5 from Jonathon Jongsma (jonner) 2008-03-24 16:46 UTC -------
according to the documentation, you need to protect every use of gtk-related
functions from a timeout or idle callback:
"Idles, timeouts, and input functions from GLib, such as g_idle_add(), are
executed outside of the main GTK+ lock. So, if you need to call GTK+ inside of
such a callback, you must surround the callback with a
gdk_threads_enter()/gdk_threads_leave() pair or use gdk_threads_add_idle_full()
which does this for you. However, event dispatching from the mainloop is still
executed within the main GTK+ lock, so callback functions connected to event
signals like GtkWidget::button-press-event, do not need thread protection.
In particular, this means, if you are writing widgets that might be used in
threaded programs, you must surround timeouts and idle functions in this
matter.
As always, you must also surround any calls to GTK+ not made within a signal
handler with a gdk_threads_enter()/gdk_threads_leave() pair."
So basically, you'll need to protect a lot of calls with enter/leave pairs.
This is why it's generally not recommended to use gtk+ from multiple threads,
it becomes a pain. Usually it's recommended to have one thread to *all* of the
gtk-related stuff and have the others just send messages to the UI thread (with
e.g. Glib::Dispatcher) when it needs to do ui-related things. But I actually
don't have a lot of experience doing threaded UI programming, I'm just passing
on things I've heard regularly from others.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=524128.
------------------------------
Message: 5
Date: Mon, 24 Mar 2008 19:33:37 +0000 (UTC)
From: "glibmm (bugzilla.gnome.org)"
<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 520778] [PATCH] GNode wrapper
implementation
To: gtkmm-forge lists sourceforge net
Message-ID: <20080324193337 AA33F23F503 label gnome org>
Content-Type: text/plain; charset=utf-8
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=520778
glibmm | general | Ver: 2.15.x
------- Comment #8 from Murray Cumming 2008-03-24 19:33 UTC -------
Oh, that's much nicer.
> This will require value types to have a working operator=.
Just as a std container would.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=520778.
------------------------------
Message: 6
Date: Mon, 24 Mar 2008 19:35:25 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 524128] Gtk::TextView widget doesn't
like being updated from other threads
To: gtkmm-forge lists sourceforge net
Message-ID: <20080324193525 120A823F4F7 label gnome org>
Content-Type: text/plain; charset=utf-8
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=524128
gtkmm | build | Ver: 2.10.x
------- Comment #6 from VAnhTu1987 gmail com 2008-03-24 19:35 UTC -------
I was ready to use Glib::Dispatcher but noticed something odd: My TextView is
wrapped inside a ScrolledWindow and whenever a new message is printed, the
ScrolledWindow scrolls to the bottom using this code:
===================
Gtk::Adjustment *const vadj = m_gtk_output_scroll->get_vadjustment();
vadj->set_value( vadj->get_upper() );
===================
Commenting out this code and the crashy behavior went away. So the problem is
probably not one of my threads (there is only one thread running at any given
time, aside from the main thread, and it worked properly when I replaced the
TextView with a Label).
- Is the above code to scroll the view to the bottom correct?.
- Glib::Dispatcher doesn't allow passing data between threads, is there a
documented way to do it (I've been searching around a lot but the only question
about this one went unanswered)?.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=524128.
------------------------------
Message: 7
Date: Mon, 24 Mar 2008 19:50:35 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 524128] Gtk::TextView widget doesn't
like being updated from other threads
To: gtkmm-forge lists sourceforge net
Message-ID: <20080324195035 7E5C823F510 label gnome org>
Content-Type: text/plain; charset=utf-8
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=524128
gtkmm | build | Ver: 2.10.x
Murray Cumming changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |murrayc murrayc com
------- Comment #7 from Murray Cumming 2008-03-24 19:50 UTC -------
You should not call GTK+ functions from multiple threads. I suggest that you
ask on gtkmm-list for advice. The "Is gtkmm thread-safe" question here might
also be useful:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/FAQ/html/index.html#id2552475
> So the problem is probably not one of my threads
Then please provide a simple test case that does not use threads, in a new bug
report, please.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=524128.
------------------------------
Message: 8
Date: Mon, 24 Mar 2008 19:52:26 +0000 (UTC)
From: "gtkmm (bugzilla.gnome.org)"
<bugzilla-daemon bugzilla gnome org>
Subject: [gtkmm bugzilla] [Bug 147342] managed child widget not
deleted when used with bonobo_control_new()
To: gtkmm-forge lists sourceforge net
Message-ID: <20080324195226 1EB1B23F510 label gnome org>
Content-Type: text/plain; charset=utf-8
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=147342
gtkmm | general | Ver: 2.4
Murray Cumming changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |murrayc murrayc com
Status|UNCONFIRMED |RESOLVED
Resolution| |OBSOLETE
------- Comment #5 from Murray Cumming 2008-03-24 19:52 UTC -------
libbonobo*mm are deprecated, so there isn't much chance that this bug will ever
get any attention.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=147342.
------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------
_______________________________________________
Gtkmm-forge mailing list
Gtkmm-forge lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gtkmm-forge
End of Gtkmm-forge Digest, Vol 22, Issue 8
******************************************