ubiquity crashed with TypeError: argument of type 'NoneType' is not iterable in ubi-partman.py

Bug #939450 reported by Jean-Baptiste Lallement
102
This bug affects 20 people
Affects Status Importance Assigned to Milestone
pygobject
Fix Released
Medium
pygobject (Ubuntu)
Fix Released
Medium
Martin Pitt
Precise
Fix Released
Medium
Martin Pitt
ubiquity (Ubuntu)
Fix Released
Critical
Stéphane Graber
Precise
Fix Released
Critical
Stéphane Graber

Bug Description

TEST CASE
1. Boot from a Live CD
2. At ubiquity-dm select 'Install Ubuntu'
3. Proceed to partman and select 'Something else' (manual partitioning)

ACTUAL RESULT
The partition list is empty and ubiquity crash with:

 Traceback (most recent call last):
   File "/usr/lib/ubiquity/plugins/ubi-partman.py", line 593, in partman_column_name
     if 'id' not in partition:
 TypeError: argument of type 'NoneType' is not iterable

EXPECTED RESULT
The partition list is displayed.

Tested with ubiquity 2.9.20

Related branches

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Changed in ubiquity (Ubuntu):
importance: Undecided → High
assignee: nobody → Canonical Foundations Team (canonical-foundations)
description: updated
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
  • dm Edit (6.8 KiB, text/plain)
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
tags: added: rls-mgr-p-tracking
tags: added: testcase
tags: added: ubiquity-2.9.20
Steve Langasek (vorlon)
Changed in ubiquity (Ubuntu Precise):
assignee: Canonical Foundations Team (canonical-foundations) → Stéphane Graber (stgraber)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Marking Triaged as I reproduced it with a recent ISO, will have a look this weekend or on Monday.

Changed in ubiquity (Ubuntu Precise):
status: New → Triaged
Revision history for this message
Stéphane Graber (stgraber) wrote :

The bug is caused by atk-bridge, if it's present in GTK_MODULES, the bug happens.

Not sure where to re-assign the bug though but it seems to me like that's an atk bug and not an ubiquity bug (as ubi-partman didn't have any change related to accessibility in months).

Revision history for this message
Luke Yelavich (themuso) wrote :

Likely a bug in GTK's recently refactored treeview model a11y code. There may be a recent atk patch to fix it, but I need to test.

Changed in ubiquity (Ubuntu Precise):
assignee: Stéphane Graber (stgraber) → Luke Yelavich (themuso)
Changed in ubiquity (Ubuntu Precise):
milestone: none → ubuntu-12.04-beta-2
Revision history for this message
Vlad Paul Paval (wladypauly) wrote :

This bug is present in today's build, just tried on two machines, a Toshiba laptop and an older desktop.

Luke Yelavich (themuso)
Changed in ubiquity (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Twisted Lucidity (lucidlytwisted) wrote :

I hit this today with the amd64 iso (although the bug submitter took me to #912031 initially).

If anyone wants to do a custom install, simply boot to a live session first and do it from there.

Revision history for this message
amay82 (andimayer82-deactivatedaccount) wrote :

Present in 12.04 beta1 for AMD64, not possible to install.

Changed in ubiquity (Ubuntu Precise):
importance: High → Critical
Revision history for this message
elatllat (elatllat) wrote :

Thanks jibel :)

linking to mis linked bug (testing):
#912031
https://bugs.launchpad.net/ubuntu/+source/partman-auto/+bug/912031
<a href="https://bugs.launchpad.net/ubuntu/+source/partman-auto/+bug/912031">link_01</a>
<a href="/ubuntu/+source/partman-auto/+bug/912031">link_02</a>

Revision history for this message
Luke Yelavich (themuso) wrote :

Still debugging this, as its a GTK bug. WIll be filing an upstrea bug once the bad commit is found and will link this bug to upstream bugzilla.

affects: ubiquity (Ubuntu Precise) → gtk+3.0 (Ubuntu Precise)
Revision history for this message
Bob (rjbell4) wrote :

Is there a work-around available? I'm setting up a new system, and REALLY wanted to start with 12.04, even though it's still in Beta. I've got a partition on the disk I want to save, which is why I selected "Something else".

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 939450] Re: ubiquity crashed with TypeError: argument of type 'NoneType' is not iterable in ubi-partman.py

Yes there is a work-around. Boot the live CD, choose "Try Ubuntu", and launcht e installer from the desktop. THis bug is accessibility related, so if you follow those instructions, no accessibility will be enabled, allowing the advanced partitioner to work.

Revision history for this message
Bob (rjbell4) wrote :

To anyone else who checks, the work-around suggested in #14 is indeed working. Thanks!

Revision history for this message
anatoly techtonik (techtonik) wrote :

Seems like Ubuntu badly needs installer tests with Sikuli or something similar. Just run into the same problem. Looking forward to try workaround #14.

Changed in gtk:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Luke Yelavich (themuso) wrote :

THe problem is explained in the upstream bug. It has been suggested several times that the problem be worked around in the ubiquity code itself to prevent the problem, hwoever I don't know enough of that partman code to fix it myself, and I don't have the time to learn it and fix it. Passing back to the ubiquity devs for further action.

Changed in gtk+3.0 (Ubuntu Precise):
assignee: Luke Yelavich (themuso) → nobody
status: In Progress → Triaged
Revision history for this message
Stéphane Graber (stgraber) wrote :

Subscribing Martin to evaluate the pygi override from the linked bug report.

I don't necessarily mind patching ubiquity to deal with the None value but I'm guessing we aren't the only one in this situation, so a pygi workaround/fix sounds better to me.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Martin Pitt (pitti)
affects: ubiquity (Ubuntu Precise) → pygobject (Ubuntu Precise)
Changed in pygobject (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Wishlist
status: New → Triaged
Changed in pygobject (Ubuntu Precise):
status: New → Confirmed
Changed in pygobject (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Reassigning back to Ubiquity. The GtkListStore documentation makes it quite clear (section "Atomic Operations") that list insertion is not atomic, and that there might be signals with None/NULL values in between. So I think for robustness this ought to be fixed in ubiquity.

That said, I'm happy to change the pygobject overrides to be atomic, as that was the recommended approach in the documentation anyway. So if you want to wait for another day or two, and I get this in soon enough, you can get away with leaving the code as it is.

Changed in pygobject (Ubuntu Precise):
importance: Wishlist → Medium
affects: gtk → pygobject
Revision history for this message
Martin Pitt (pitti) wrote :

Err, except that I'm unable to reassign to ubiquity -- LP says

  'None' is a binary package. This bug has been assigned to its source package 'gtk+3.0' instead.

Revision history for this message
Martin Pitt (pitti) wrote :

I had a closer look at the overrides in pygobject, and it's quite some effort to rewrite them using the atomic API. I can't guarantee that I'll have them ready this week. So you could either use Gtk.ListStore.insert_with_valuesv() yourself instead of using the override API, or make the signal handlers cope with None rows.

no longer affects: gtk+3.0 (Ubuntu)
no longer affects: gtk+3.0 (Ubuntu Precise)
Changed in ubiquity (Ubuntu Precise):
milestone: none → ubuntu-12.04-beta-2
status: New → Triaged
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Stéphane Graber (stgraber) wrote :

I did the needed changes to ubiquity to use insert_with_valuesv() but I hit https://bugzilla.gnome.org/show_bug.cgi?id=671610

Are you planning on fixing that one this week or should I revert my ubiquity change so we still have a working manual partitioner when started from the live session? (it's currently in ubiquity's trunk but not release)

Changed in ubiquity (Ubuntu Precise):
status: Triaged → Fix Committed
Revision history for this message
Stéphane Graber (stgraber) wrote :
Changed in ubiquity (Ubuntu Precise):
importance: Undecided → Critical
Changed in pygobject:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Stéphane,

Stéphane Graber [2012-03-14 20:09 -0000]:
> Are you planning on fixing that one this week

Yes, I'm working on the "empty strings in GValue arrays" bug right
now, and I'm close to a solution. Once that's fixed, I'll continue
working on the "atomic list store append" patch, which is blocked by
the former.

> should I revert my ubiquity change so we still have a working manual
> partitioner when started from the live session? (it's currently in
> ubiquity's trunk but not release)

I still recommend just getting along with None values. There will be
another signal shortly after with the actual values.

But it now seems to me that making .append() atomic (in terms of sent
signals) is realistic after all, working on it as fast as I can.

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, I now have patches for both the "double signal" problem (this bug), as well as the underlying problem of being unable to use insert_with_valuesv(). Both are sent upstream for peer review.

Changed in pygobject (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.9.29

---------------
ubiquity (2.9.29) precise; urgency=low

  [ Oliver Grawert ]
  * disable gnome-settings-daemon power management plugin during install to
    make sure things like lid closing or accidential pressing of power or
    suspend buttons do not put us into suspend mode (LP: #948163)

  [ Stéphane Graber ]
  * ubi-partman: Ignore None cell values, we'll get another event
    when they actually contain something anyway. (LP: #939450)
  * Fix set_indicator_keymaps to always send an array of strings to
    gsettings and also go through more of the possible language codes as
    Xkl doesn't seem to always work with part2_code (LP: #955844)
  * Restrict the list of keyboard layouts added to the indicator to 4
    and try to be clever as to which one to select.
  * Only use the keyboard indicator when in greeter mode, otherwise it'd
    override any previously selected keyboard layout (from gfxboot or from
    the user session)
  * Update indicator tests to match the new code, ensuring we don't have
    more than 4 entries and that languages with variants work fine.
  * Automatic update of included source packages: console-setup
    1.70ubuntu3, partman-auto 93ubuntu22, partman-efi 24ubuntu3.
 -- Stephane Graber <email address hidden> Thu, 15 Mar 2012 18:12:41 -0400

Changed in ubiquity (Ubuntu Precise):
status: Fix Committed → Fix Released
tags: added: rls-p-tracking
Revision history for this message
Martin Pitt (pitti) wrote :

pygobject patch committed upstream. I'll release 3.1.92 upstream today and will upload to Debian/Ubuntu afterwards.

Changed in pygobject (Ubuntu Precise):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.1.92-1

---------------
pygobject (3.1.92-1) experimental; urgency=low

  * New upstream release.
    - Fix Gtk override API for tree models to send out only one signal after
      the data is set. (LP: #939450)
 -- Martin Pitt <email address hidden> Mon, 19 Mar 2012 17:29:07 +0100

Changed in pygobject (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in pygobject:
status: Confirmed → 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.