Notification callback causes exception in gi

Bug #1268578 reported by Michał Sawicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pygobject
Fix Released
Medium
pygobject (Ubuntu)
Fix Released
High
Martin Pitt
unity8 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

With the latest python-gi the Notify callback causes an exception being thrown:

$ python test.py
TypeError: expected tuple for callback user_data

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python-gi 3.11.3-0ubuntu1
Uname: Linux 3.4.0-3-mako armv7l
ApportVersion: 2.12.7-0ubuntu6
Architecture: armhf
Date: Mon Jan 13 14:19:09 2014
InstallationDate: Installed on 2014-01-10 (3 days ago)
InstallationMedia: Ubuntu Trusty Tahr (development branch) - armhf (20140110)
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
SourcePackage: pygobject
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Michał Sawicz (saviq) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Quick workaround, in case this is blocking you:

    notification.add_action(
        "action_id",
        "action_label",
        action_callback,
        (None,),
        None
    )

Changed in pygobject (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in pygobject:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

15:28 < asac> pitti: is it better from your perspective to implement a workaround in unity8 for the pygi
              regression (compared to just backout pygi changes?)? whats the real fix?
15:28 < pitti> asac: if you need to fix it right now, you can add the workaround (it won't hurt after the fix)
15:29 < pitti> asac: I need to catch simon feltman about this, but he's asleep, so will need to wait until tomorrow
15:30 < asac> pitti: so just reverting the pygi isnt feasible technically? point is that unity8 would have to land
              with a workaround and unity8 is pretty big beast
15:31 < asac> we can do that, but from outside perspective i see both options as valid and would choose whatever
              is less work :)
15:31 < asac> (assuming that we solve this problem upstream anyway)
15:31 < pitti> asac: certainly it's feasible
15:32 -!- pmcgowan [~pat@91.189.91.3] has joined #ubuntu-touch
15:34 < asac> pitti: so is the change/workaround in unity8 the right thing to do? if its the right thing anyway, i
              would go the unity8 route; otherwise only if its more work than a revert upload ..
15:34 * asac still wonders how python is hitting us at all in phone
15:34 < asac> thought we dont do python there :/
15:34 < pitti> yeah, I thought that, too
15:34 < pitti> asac: currently testing a reversion of the corresponding commit in pygobject
15:35 < asac> cool

Martin Pitt (pitti)
Changed in pygobject (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Martin Pitt (pitti)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.11.3-0ubuntu2

---------------
pygobject (3.11.3-0ubuntu2) trusty; urgency=medium

  * Add revert_userdata_varargs.patch: Revert upstream commit 9456e83 to fix
    regression with "None" userdata callback arguments in some cases.
    (LP: #1268578)
 -- Martin Pitt <email address hidden> Mon, 13 Jan 2014 15:39:58 +0100

Changed in pygobject (Ubuntu):
status: Fix Committed → Fix Released
Martin Pitt (pitti)
Changed in unity8 (Ubuntu):
status: New → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :

This has been fixed properly in pygobject 3.11.4, and I just committed a test case for this to pygobject upstream master.

Changed in pygobject:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.4 KiB)

This bug was fixed in the package unity8 - 7.84+14.04.20140128-0ubuntu1

---------------
unity8 (7.84+14.04.20140128-0ubuntu1) trusty; urgency=low

  [ Michal Hruby ]
  * Added unity-scope-tool, which will help when developing scopes.

  [ Michał Sawicz ]
  * Added unity-scope-tool, which will help when developing scopes.
  * Use full DashContent, not just GenericScopeView in ScopeTool.qml.
  * Bring Card and CardHeader over from new-scopes.
  * Work around bug #1268578. (LP: #1268578)
  * Drop unnecessary version dependencies.
  * Return null instead of undefined from findChild and
    findInvisibleChild.
  * Fix CardHeader and Card heights (empty Label does have non-zero
    height apparently). Also improve test robustness and reduce future
    diffs.

  [ Albert Astals ]
  * Do not assert if the item we are removing was not created yet
    (because e.g. it's not in the viewport).
  * Position correctly the pointer of the search history box .
  * Make test_filter_expand_expand less unstable in CI VMs Make sure
    header0 is the header0 we want to click On the CI VM stuff is a bit
    slower than on real hw and we were clicking in the wrong place.
  * Add TabBar to the Dash header navigation Changes this comes with: *
    DashBar at the bottom is gone * PageHeader doesn't have a Label
    anymore, it has the childItem property where you add which thing it
    has to contain * New: PageHeaderLabel mimics the old behaviour of
    PageHeader * The header of the LVWPH of GenericScopeView is now fake
    and only used for positioning. There is a single global floating
    header in DashContent (which is a PageHeader with a TabBar as
    childItem) * The GenericScopeView previewLoader and OpenEffect have
    been also moved to the DashContent so that the openEffect includes
    the floating header in the "animation" .
  * Introduce the HorizontalJournal.
  * If there are no items m_firstVisibleIndex has to be -1 .
  * Add some more documentation about tests to the CODING file.
  * Fixes to the journal cmake tests code * Output to the correct
    filename for the test * Don't output stuff from the tryXYZ targets.
  * Adapt to findChild return value changes .
  * Organic Grid for the Dash View.
  * Misc journal fixes Don't init *modelIndex to INT_MAX Makes no sense
    since we're not doing any qMin and the calling function also accepts
    any index >= 0 as valid so in some cases it may end up wanting to
    create an index that doesn't exist Don't refill if height() < 0,
    that gives bad ranges for from/to and the code gets confused .

  [ Michał Karnicki ]
  * Fix grid view column count.
  * Add test for minimum number of items in a carousel.

  [ Allan LeSage ]
  * Add stubs for indicators autopilot tests.

  [ Andrea Cimitan ]
  * Avoid input falling through notifications onto surfaces below, thus
    fixing LP: #1257312. (LP: #1257312)

  [ Leo Arias ]
  * Close the Touch devices after the tests. (LP: #1267600)
  * Added methods to scroll to other scopes on autopilot tests.
  * Added autopilot helpers for the app scope and the app preview.
    Install the fake scopes in order to use them on the tests. (LP:
    #1269114)
  * On autopilot hel...

Read more...

Changed in unity8 (Ubuntu):
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.