crash in toggle_top_level()

Bug #954312 reported by Kent Baxley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

ubiquity-2.9.27

I am working on a ubiquity plugin for oem-config and I ran into a problem when calling "self.controller.toggle_top_level()"

The installer will crash and message I get from the oem-config.log is:

  File "/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py", line 126, in toggle_top_level
    if self._wizard.live_installer.get_property('visible'):
AttributeError: Wizard instance has no attribute 'live_installer'

The plugin is supposed play a video during oem-config at first boot, and it was recommended to use toggle_top_level before and after the video plays. I can't tell if the plugin works due to the crash above.

I was told that this might have been something that broke in ubiquity when converting to GTK3 that wasn't noticed since no plugins are currently taking advantage of that function (except this one).

I will attach my plugin sample code as well as the oem-config log.

Revision history for this message
Kent Baxley (kentb) wrote :
Revision history for this message
Kent Baxley (kentb) wrote :
description: updated
Revision history for this message
Stéphane Graber (stgraber) wrote :

Can you try this fix: http://paste.ubuntu.com/882213/ ?

Revision history for this message
Stéphane Graber (stgraber) wrote :

Actually I think there are a few problems with your plugin, I'm having a look now.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Right, it's actually not an ubiquity bug, marking as Invalid.

You can't use gobject or gst in an ubiquity plugin because they won't mix with pygi.
Instead you should use "from gi.repository import Gst, Gobject" or something along those lines.

Also, PageGtk should only be doing the initialisation of the UI, not run anything at this point.
You should instead move the code actually starting the video and doing the toggle_top_level to the Prepare() function of the "Page" class.

self.page of PageGtk also needs to be set to the UI of your step or it'll be skipped.

I tend to use ubi-prepare.py as an example for other steps.

Changed in ubiquity (Ubuntu):
status: New → Invalid
Revision history for this message
Kent Baxley (kentb) wrote :

Thanks, Stefan. The 'fix' you proposed earlier did stop the crashes from occuring, but, I will look at your recommendations instead for my plugin. Thank you for the tips!

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.