Send Gtkmm-forge mailing list submissions to
        [EMAIL PROTECTED]

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
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

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 559209] Gst::Element::get_factory() -
      Gst::ElementFactory refcount problem (gnomemm (bugzilla.gnome.org))
   2. [Bug 559209] Gst::Element::get_factory() -
      Gst::ElementFactory refcount problem (gnomemm (bugzilla.gnome.org))
   3. [Bug 559374] New: get_items_at shouldn't be const
      (gnomemm (bugzilla.gnome.org))
   4. [Bug 559374] get_items_at shouldn't be const
      (gnomemm (bugzilla.gnome.org))
   5. [Bug 559374] get_items_at shouldn't be const
      (gnomemm (bugzilla.gnome.org))
   6. [Bug 559209] Gst::Element::get_factory() -
      Gst::ElementFactory refcount problem (gnomemm (bugzilla.gnome.org))


----------------------------------------------------------------------

Message: 1
Date: Wed,  5 Nov 2008 04:28:30 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
        <[EMAIL PROTECTED]>
Subject: [gtkmm bugzilla] [Bug 559209] Gst::Element::get_factory() -
        Gst::ElementFactory refcount problem
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
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=559209

  gnomemm | gstreamermm | Ver: unspecified

Jos? Alburquerque changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[EMAIL PROTECTED]




------- Comment #4 from Jos? Alburquerque  2008-11-05 04:28 UTC -------
(In reply to comment #3)
> The function is incredibly simple:
> 
> GstElementFactory *
> gst_element_get_factory (GstElement * element)
> {
>   g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
> 
>   return GST_ELEMENT_GET_CLASS (element)->elementfactory;
> }
> 
> It does no referencing, so we must take a reference when creating a RefPtr 
> from
> its result. We then release that refernce in the RefPtr destructor. I don't 
> see
> how any different refcounting could happen the first or second time that this
> function is called.

Exactly.  There is no problem with how get_factory() is written.  What you're
seeing is probably a side effect of the floating reference functionality of
GstObject (see Description section of GstObject[1]).  We've opted not to
include this in gstreamermm at this point because we have automatic
referencing, but it's tricky thus the side effect.  Could you please try with
the following checked in change?

2008-11-04  Jos? Alburquerque  <[EMAIL PROTECTED]>

        * gstreamer/gstreamermm/object.cc: Fix the floating reference aversion
        code so that it checks that the GstObject is floating before
        referencing it and then sinking it.

Also, please try to create attachments in the report; they're easier to use. 
Thanks.

[1]
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html


-- 
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=559209.



------------------------------

Message: 2
Date: Wed,  5 Nov 2008 04:44:07 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
        <[EMAIL PROTECTED]>
Subject: [gtkmm bugzilla] [Bug 559209] Gst::Element::get_factory() -
        Gst::ElementFactory refcount problem
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
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=559209

  gnomemm | gstreamermm | Ver: unspecified




------- Comment #5 from RichardF  2008-11-05 04:44 UTC -------
Jos?, as it turns out I just came to the same conclusion as you about the use
of gst_object_ref() and gst_object_sink() in the Gst::Object constructor, and
made the same change as your patch - albeit with a G_LIKELY around the
GST_OBJECT_IS_FLOATING, as I guessed that is the most common case ;) - and was
about to add the details to this bug report when I saw your post. :)

Your change (along with Murray's previous change) works as desired, and the
test code I posted above now results in the underlying GstElementFactory only
having the required one remaining reference after all the RefPtrs have
destructed.

Thanks for your prompt attention to this problem.


-- 
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=559209.



------------------------------

Message: 3
Date: Wed,  5 Nov 2008 04:50:19 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
        <[EMAIL PROTECTED]>
Subject: [gtkmm bugzilla] [Bug 559374] New: get_items_at shouldn't be
        const
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]/>
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=559374

  gnomemm | goocanvasmm | Ver: unspecified
           Summary: get_items_at shouldn't be const
           Product: gnomemm
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: goocanvasmm
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]
     GNOME version: Unspecified
   GNOME milestone: Unspecified


I try to create a new item implementing the interface Goocanvas::Item, but I
can't find how to override get_items_at_vfunc correctly. When I try to add the
current object (this) to the list of found items, the compiler complains about
an invalid cast from "Goocanvas::Item* const" to "Goocanvas::Item*".


-- 
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=559374.



------------------------------

Message: 4
Date: Wed,  5 Nov 2008 04:51:39 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
        <[EMAIL PROTECTED]>
Subject: [gtkmm bugzilla] [Bug 559374] get_items_at shouldn't be const
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
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=559374

  gnomemm | goocanvasmm | Ver: unspecified




------- Comment #1 from Louis-Francis Ratt?-Boulianne  2008-11-05 04:51 UTC 
-------
Created an attachment (id=121990)
 --> (http://bugzilla.gnome.org/attachment.cgi?id=121990&action=view)
Test code

You can compile with :

g++ item.cpp -o item `pkg-config gtkmm-2.4 goocanvasmm-1.0 --cflags --libs`


-- 
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=559374.



------------------------------

Message: 5
Date: Wed,  5 Nov 2008 04:52:02 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
        <[EMAIL PROTECTED]>
Subject: [gtkmm bugzilla] [Bug 559374] get_items_at shouldn't be const
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
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=559374

  gnomemm | goocanvasmm | Ver: unspecified




------- Comment #2 from Louis-Francis Ratt?-Boulianne  2008-11-05 04:52 UTC 
-------
Created an attachment (id=121991)
 --> (http://bugzilla.gnome.org/attachment.cgi?id=121991&action=view)
Header file for test code


-- 
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=559374.



------------------------------

Message: 6
Date: Wed,  5 Nov 2008 04:58:49 +0000 (UTC)
From: "gnomemm (bugzilla.gnome.org)"
        <[EMAIL PROTECTED]>
Subject: [gtkmm bugzilla] [Bug 559209] Gst::Element::get_factory() -
        Gst::ElementFactory refcount problem
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
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=559209

  gnomemm | gstreamermm | Ver: unspecified




------- Comment #6 from Jos? Alburquerque  2008-11-05 04:58 UTC -------
(In reply to comment #5)
> Jos?, as it turns out I just came to the same conclusion as you about the use
> of gst_object_ref() and gst_object_sink() in the Gst::Object constructor, and
> made the same change as your patch - albeit with a G_LIKELY around the
> GST_OBJECT_IS_FLOATING, as I guessed that is the most common case ;) - and was
> about to add the details to this bug report when I saw your post. :)

I've done the same but will not check it in until a little later with some
other things I'm working on.  Thanks for the report.


-- 
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=559209.



------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

------------------------------

_______________________________________________
Gtkmm-forge mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtkmm-forge


End of Gtkmm-forge Digest, Vol 30, Issue 5
******************************************
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to