Cubic crashes with error 'Vte.Terminal.feed_child() takes exactly 2 arguments (3 given)'.

Bug #1779015 reported by Cubic PPA
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cubic
Fix Released
Critical
Cubic PPA
Classic-development
Fix Released
Critical
Cubic PPA
Release-2018-07-34
Fix Released
Critical
Cubic PPA

Bug Description

As reported by Binu Kuriakose...

Cubic (Custom Ubuntu ISO Creator) is a graphical user interface application and should be run using the application launcher. See "man cubic" for more information.

    Using Vte version...................... 2.91
    The user name is....................... issac
    The home directory is.................. /home/issac
    The user id is......................... 1000
    The group id is........................ 1000
    The current GTK theme is............... Ambiance
    The working directory is............... /usr/share/cubic
    The builder is......................... <Gtk.Builder object at
                                            0x7f8841da4af8 (GtkBuilder at
                                            0x259cd00)>

(cubic.py:3098): Gtk-WARNING **: 08:41:47.740: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.740: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.761: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.761: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.782: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.782: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.802: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.803: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.823: Content added to the action area of a dialog using header bars

(cubic.py:3098): Gtk-WARNING **: 08:41:47.823: Content added to the action area of a dialog using header bars
    The current page name is............... project_directory_page

Created new thread
    Current page........................... project_directory_page__project_dire
                                            ctory_filechooser
    New page............................... project_directory_page
    Running thread with id................. 140223147566848
    Interrupting previous thread with id... No previous thread to interrupt

Performing requested transition action
    Transition from........................ project_directory_page__project_dire
                                            ctory_filechooser
    Transition to.......................... project_directory_page
    Finished running thread with id........ 140223147566848
    The project directory is............... /home/issac/Cubic
    The configuration filepath is.......... /home/issac/Cubic/cubic.conf
    The original ISO image mount point
    is..................................... /home/issac/Cubic/original-iso-mount
    The custom squashfs directory is....... /home/issac/Cubic/squashfs-root
    The custom live ISO directory is....... /home/issac/Cubic/custom-live-iso
    Is project directory page, original
    section, valid?........................ True
    Button clicked......................... Next

Created new thread
    Current page........................... project_directory_page
    New page............................... new_project_page
    Running thread with id................. 140223147566848
    Interrupting previous thread with id... No previous thread to interrupt

Performing requested transition action
    Transition from........................ project_directory_page
    Transition to.......................... new_project_page
    Propagate assigned values to
    calculate dependant values?............ False
    The original ISO image release name
    The custom ISO image version number
    Is success copy boot files............. False
    Is success extract squashfs?........... False
    Hiding old page........................ project_directory_page
    Showing new page....................... new_project_page
    The current page name is............... new_project_page
    Is new project page, original
    section, valid?........................ False
    Is new project page, custom section,
    valid?................................. False
    Propagate assigned values to
    calculate dependant values?............ True
    Finished running thread with id........ 140223147566848

Created new thread
    Current page........................... existing_project_page
    New page............................... existing_project_page
    Previous thread id..................... 140223147566848
    Running thread with id................. 140223147566848
    Interrupting previous thread with id... No previous thread to interrupt

Created new thread

Performing requested transition action
    Current page........................... existing_project_page
    Transition from........................ existing_project_page
    New page............................... existing_project_page
    Transition to.......................... existing_project_page
    Previous thread id..................... 140223147566848
    Running thread with id................. 140222867142400
    Is existing project page, original
    section, valid?........................ False
    Is existing project page, custom
    section, valid?........................ False
    Finished running thread with id........ 140223147566848

Performing requested transition action
    Transition from........................ existing_project_page
    Transition to.......................... existing_project_page
    Is existing project page, original
    section, valid?........................ False
    Is existing project page, custom
    section, valid?........................ False
    Finished running thread with id........ 140222867142400

Created new thread
    Current page........................... original_iso_image_filepath_filechoo
                                            ser
    New page............................... new_project_page
    Previous thread id..................... 140222867142400
    Running thread with id................. 140223155959552
    Interrupting previous thread with id... No previous thread to interrupt

Performing requested transition action
    Transition from........................ original_iso_image_filepath_filechoo
                                            ser
    Transition to.......................... new_project_page
    Propagate assigned values to
    calculate dependant values?............ False
    The original ISO image filepath is..... /home/issac/ubuntu-18.04-desktop-
                                            amd64.iso
    The original ISO image filename is..... ubuntu-18.04-desktop-amd64.iso
    The original ISO image directory is.... /home/issac
  Check if ISO image is mounted
    ISO image.............................. /home/issac/ubuntu-18.04-desktop-
                                            amd64.iso
    Mount point............................ /home/issac/Cubic/original-iso-mount
    Execute synchronously.................. mount
    Is mounted?............................ False
  Mount ISO image
    ISO image.............................. /home/issac/ubuntu-18.04-desktop-
                                            amd64.iso
    Mount point............................ /home/issac/Cubic/original-iso-mount
    Create the mount point if it does
    not exist.............................. /home/issac/Cubic/original-iso-mount
    Execute synchronously.................. mkdir "/home/issac/Cubic/original-
                                            iso-mount"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3146
    Mount.................................. /home/issac/ubuntu-18.04-desktop-
                                            amd64.iso
    Execute synchronously.................. mount --options loop
                                            "/home/issac/ubuntu-18.04-desktop-
                                            amd64.iso"
                                            "/home/issac/Cubic/original-iso-
                                            mount"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3147
  Check if ISO image is mounted
    ISO image.............................. /home/issac/ubuntu-18.04-desktop-
                                            amd64.iso
    Mount point............................ /home/issac/Cubic/original-iso-mount
    Execute synchronously.................. mount
    Is mounted?............................ True
    Execute synchronously.................. isoinfo -d -i
                                            "/home/issac/ubuntu-18.04-desktop-
                                            amd64.iso"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3160
    The original ISO image volume id is.... Ubuntu 18.04 LTS amd64
    Execute synchronously.................. cat "/home/issac/Cubic/original-iso-
                                            mount/README.diskdefines"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3161
    The original ISO image release name
    is..................................... Bionic Beaver
    Execute synchronously.................. cat "/home/issac/Cubic/original-iso-
                                            mount/README.diskdefines"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3162
    The original ISO image disk name is.... Ubuntu 18.04 LTS "Bionic Beaver" -
                                            Release amd64
    Get directory for
    filesystem.squashfs in................. /home/issac/Cubic/original-iso-mount
    filesystem.squashfs is in.............. /home/issac/Cubic/original-iso-
                                            mount/casper
    The casper relative directory is....... casper
    The custom ISO image version number
    is..................................... 2018.06.26
  Create custom ISO image filename
    The original ISO image filename is..... ubuntu-18.04-desktop-amd64.iso
    The custom ISO image version number
    is..................................... 2018.06.26
    • text a............................... ubuntu-
    • release.............................. 18.04
    • point release........................ None
    • text b............................... -desktop-amd64
    • new point_release.................... .0
    The custom iso image filename is....... ubuntu-18.04.0-2018.06.26-desktop-
                                            amd64.iso
    The custom ISO image filename is....... ubuntu-18.04.0-2018.06.26-desktop-
                                            amd64.iso
    The custom ISO image directory is...... /home/issac/Cubic
    The custom ISO image filepath is....... /home/issac/Cubic/ubuntu-18.04.0-201
                                            8.06.26-desktop-amd64.iso
  Create custom ISO image volume id
    The original ISO image volume id is.... Ubuntu 18.04 LTS amd64
    The custom ISO image version number
    is..................................... 2018.06.26
    • text a............................... Ubuntu
    • release.............................. 18.04
    • point release........................ None
    • text b............................... LTS amd64
    • new point_release.................... .0
    The custom iso image volume id is...... Ubuntu 18.04.0 2018.06.26 LTS amd64
    The custom ISO image volume id is...... Ubuntu 18.04.0 2018.06.26 LTS amd64
    The custom ISO image release name is... Custom Bionic Beaver
    The custom ISO image disk name is...... Ubuntu 18.04.0 2018.06.26 LTS amd64
                                            "Custom Bionic Beaver"
    The custom ISO image md5 filename is... ubuntu-18.04.0-2018.06.26-desktop-
                                            amd64.md5
    The custom ISO image md5 filepath is... /home/issac/Cubic/
  Check if ISO image is mounted
    ISO image.............................. /home/issac/ubuntu-18.04-desktop-
                                            amd64.iso
    Mount point............................ /home/issac/Cubic/original-iso-mount
    Execute synchronously.................. mount
    The custom ISO image version number
    is..................................... 2018.06.26
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image filename is....... ubuntu-18.04.0-2018.06.26-desktop-
                                            amd64.iso
    The custom ISO image filepath is....... /home/issac/Cubic/ubuntu-18.04.0-201
                                            8.06.26-desktop-amd64.iso
    The custom ISO image md5 filename is... ubuntu-18.04.0-2018.06.26-desktop-
                                            amd64.md5
    The custom ISO image md5 filepath is... /home/issac/Cubic/ubuntu-18.04.0-201
                                            8.06.26-desktop-amd64.md5
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image directory is...... /home/issac/Cubic
    The custom ISO image filepath is....... /home/issac/Cubic/ubuntu-18.04.0-201
                                            8.06.26-desktop-amd64.iso
    The custom ISO image md5 filepath is... /home/issac/Cubic/ubuntu-18.04.0-201
                                            8.06.26-desktop-amd64.md5
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... Ubuntu 18.04.0 2018.06.26 LTS am
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image release name is... Custom Bionic Beaver
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... Ubuntu 18.04.0 2018.06.26 LTS amd64
                                            "Custom Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    Is mounted?............................ True
    Is new project page, original
    section, valid?........................ True
    Is new project page, custom section,
    valid?................................. True
    Propagate assigned values to
    calculate dependant values?............ True
    Finished running thread with id........ 140223155959552
    The custom ISO image filename is....... ubuntu-18.04-desktop-amd64.iso
    The custom ISO image filepath is....... /home/issac/Cubic/ubuntu-18.04-deskt
                                            op-amd64.iso
    The custom ISO image md5 filename is... ubuntu-18.04-desktop-amd64.md5
    The custom ISO image md5 filepath is... /home/issac/Cubic/ubuntu-18.04-deskt
                                            op-amd64.md5
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... ubuntu-18.04-desktop-amd64.iso
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04-desktop-amd64.iso
                                            "Custom Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... ubuntu-18.04-desktop-amd64.is
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04-desktop-amd64.is
                                            "Custom Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... ubuntu-18.04-desktop-amd64.i
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04-desktop-amd64.i "Custom
                                            Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... ubuntu-18.04-desktop-amd64.
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04-desktop-amd64. "Custom
                                            Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... ubuntu-18.04-desktop-amd64
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04-desktop-amd64 "Custom
                                            Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image filename is....... ubuntu-18.04.-desktop-amd64.iso
    The custom ISO image filepath is....... /home/issac/Cubic/ubuntu-18.04.-desk
                                            top-amd64.iso
    The custom ISO image md5 filename is... ubuntu-18.04.-desktop-amd64.md5
    The custom ISO image md5 filepath is... /home/issac/Cubic/ubuntu-18.04.-desk
                                            top-amd64.md5
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image filename is....... ubuntu-18.04.0-desktop-amd64.iso
    The custom ISO image filepath is....... /home/issac/Cubic/ubuntu-18.04.0-des
                                            ktop-amd64.iso
    The custom ISO image md5 filename is... ubuntu-18.04.0-desktop-amd64.md5
    The custom ISO image md5 filepath is... /home/issac/Cubic/ubuntu-18.04.0-des
                                            ktop-amd64.md5
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image filename is....... ubuntu-18.04.01-desktop-amd64.iso
    The custom ISO image filepath is....... /home/issac/Cubic/ubuntu-18.04.01-de
                                            sktop-amd64.iso
    The custom ISO image md5 filename is... ubuntu-18.04.01-desktop-amd64.md5
    The custom ISO image md5 filepath is... /home/issac/Cubic/ubuntu-18.04.01-de
                                            sktop-amd64.md5
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... ubuntu-18.04.-desktop-amd64
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04.-desktop-amd64 "Custom
                                            Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... ubuntu-18.04.0-desktop-amd64
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04.0-desktop-amd64 "Custom
                                            Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image volume id is...... ubuntu-18.04.01-desktop-amd64
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04.01-desktop-amd64
                                            "Custom Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image release name is... Bionic Beaver
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... ubuntu-18.04.01-desktop-amd64
                                            "Bionic Beaver"
    Is new project page, custom section,
    valid?................................. True
    The custom ISO image disk name is...... Ubuntu 18.04 LTS "Bionic Beaver" -
                                            Release amd64
    Is new project page, custom section,
    valid?................................. True
    Button clicked......................... Next

Created new thread
    Current page........................... new_project_page
    New page............................... terminal_page
    Running thread with id................. 140223155959552
    Interrupting previous thread with id... No previous thread to interrupt

Performing requested transition action
    Transition from........................ new_project_page
    Transition to.......................... terminal_page
    Save configuration..................... None
    Hiding old page........................ new_project_page
    Showing new page....................... unsquashfs_page
    The current page name is............... unsquashfs_page
  Copy the original ISO files
    The source path is..................... /home/issac/Cubic/original-iso-
                                            mount/
    The target path is..................... /home/issac/Cubic/custom-live-iso/
    filesystem.manifest-remove not found
    in..................................... /home/issac/Cubic/custom-live-
                                            iso/casper
    Include filesystem.manifest-remove?.... True
    filesystem.manifest-minimal-remove
    not found in........................... /home/issac/Cubic/custom-live-
                                            iso/casper
    Include filesystem.manifest-minimal-
    remove?................................ True
    Execute asynchronously................. rsync --delete --archive
                                            --exclude="md5sum.txt" --exclude="/c
                                            asper/filesystem.squashfs --exclude=
                                            "/casper/filesystem.squashfs.gpg
                                            --progress
                                            "/home/issac/Cubic/original-iso-
                                            mount/" "/home/issac/Cubic/custom-
                                            live-iso/"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3175
    Is success copy boot files............. True
  Extract squashfs
    The target path is..................... /home/issac/Cubic/squashfs-root
    Delete file............................ /home/issac/Cubic/squashfs-root
    /home/issac/Cubic/squashfs-root does
    not exist.............................. Cannot delete
    The source path is..................... /home/issac/Cubic/original-iso-
                                            mount/casper/filesystem.squashfs
    Execute asynchronously................. unsquashfs -force -dest
                                            "/home/issac/Cubic/squashfs-root"
                                            "/home/issac/Cubic/original-iso-
                                            mount/casper/filesystem.squashfs"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3178
    Is success extract squashfs?........... True
    Save configuration..................... None
  Prepare chroot environment
    Execute synchronously.................. mount --bind /dev
                                            "/home/issac/Cubic/squashfs-
                                            root/dev"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3200
    Execute synchronously.................. mount --bind /run
                                            "/home/issac/Cubic/squashfs-
                                            root/run"
    Set a new process for thread id........ 140223155959552
    The new process id is.................. 3201
  Enter chroot environment
    The chroot environment directory is.... /home/issac/Cubic/squashfs-root
    The terminal pid is.................... 3202
    Exception encountered in thread........ 140223155959552
    Ignore exception?...................... No
    The tracekback is...................... Traceback (most recent call last):
                                            File
                                            "/usr/share/cubic/transition.py",
                                            line 95, in run self.action()
                                            File
                                            "/usr/share/cubic/transition.py",
                                            line 314, in action self) File
                                            "/usr/share/cubic/transitions.py",
                                            line 714, in transition__from__new_p
                                            roject_page__to__terminal_page u
                                            tilities.enter_chroot_environment(th
                                            read) File
                                            "/usr/share/cubic/utilities.py",
                                            line 1377, in
                                            enter_chroot_environment
                                            terminal.feed_child('clear\n', -1)
                                            TypeError: Vte.Terminal.feed_child()
                                            takes exactly 2 arguments (3 given)
    Finished running thread with id........ 140223155959552

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

This is very interesting (and disconcerting)...

(1) On ~unmodified~ Ubuntu 18.04,
    dpkg lists the following version info for the "Vte" packages...

    $ dpkg -l gir1.2-vte-2.91 libvte-2.91-0 libvte-2.91-common

    Name Version
    ===================== =======================
    gir1.2-vte-2.91:amd64 0.52.2-1ubuntu1~18.04.1
    libvte-2.91-0:amd64 0.52.2-1ubuntu1~18.04.1
    libvte-2.91-common 0.52.2-1ubuntu1~18.04.1

    Using these versions, we get the following behavior...

    If we pass ~two~ arguments to the feed_child() function,
        terminal.feed_child("abc", -1)
    we get ~no~ error.

    If we try to pass only one argument to the feed_child() function,
        terminal.feed_child("abc")
    we get the error:
        TypeError: Vte.Terminal.feed_child() takes exactly 3 arguments (2 given)

(2) After upgrading these three packages in Ubuntu 18.04,
    dpkg lists the following version info for the same "Vte" packages...

    $ dpkg -l gir1.2-vte-2.91 libvte-2.91-0 libvte-2.91-common

    Name Version
    ===================== =======================
    gir1.2-vte-2.91:amd64 0.52.2-1ubuntu1~18.04.1
    libvte-2.91-0:amd64 0.52.2-1ubuntu1~18.04.1
    libvte-2.91-common 0.52.2-1ubuntu1~18.04.1

    Notice the version numbers are EXACTLY the same as before the upgrade.
    Using these "upgraded" versions, we get the following behavior...

    If we pass only ~one~ argument to the feed_child() function,
        terminal.feed_child("abc")
    we get ~no~ error.

    If we try to pass two arguments to the feed_child() function,
        terminal.feed_child("abc", -1)
    we get the error:
        TypeError: Vte.Terminal.feed_child() takes exactly 2 arguments (3 given)

It is clear that the signature for function Vte.Terminal.feed_child() has changed.
In the previous version, it required two arguments. Now it requires one.

I was able to find an archive of a web page showing the "original" 2.91 signature:
https://web.archive.org/web/20170311221231/https://lazka.github.io/pgi-docs/Vte-2.91/classes/Terminal.html#Vte.Terminal.feed_child

(I've attached a screenshot, for posterity).

    feed_child(text, length)
      Parameters:
        text (str or None) – data to send to the child
        length (int) – length of text in bytes, or -1 if text is NUL-terminated
      Sends a block of UTF-8 text to the child as if it were entered by the user
      at the keyboard.

In the "newer" 2.91 version, feed_child() requires one argument):
https://lazka.github.io/pgi-docs/Vte-2.91/classes/Terminal.html#Vte.Terminal.feed_child

    feed_child(text)
      Parameters:
        text ([int] or None) – data to send to the child
      Sends a block of UTF-8 text to the child as if it were entered by the user
      at the keyboard.

It is disconcerting that the signature of the feed_child() function changed, but the ~version~ of Vte has remained the same! There is no way to tell if you have a library with the older version installed, or an updated library with the newer version installed!

Cubic PPA (cubic-wizard)
Changed in cubic:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Cubic PPA (cubic-wizard)
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

feed_child_binary() seems to be a viable alternative, and its signature remains the same across Vte "2.91" versions. Currently testing this approach in pre- and post-upgraded Ubuntu 18.04, to make sure it works for both Vte "2.91" versions.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Darn it!
Looks like they changed the signature for feed_child_binary() as well, but there is no documentation for it! :(

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Install release version 2018.07-33 for bug fixes.

Changed in cubic:
status: Confirmed → Fix Committed
importance: High → Critical
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Note: fix released in trunk revision # 143, and release revision # 33.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Note: Improved bug fix in trunk revision 156 and release revision 37.

Executing terminal.feed_child() caused an error in the function, send_message_to_terminal()

This caused function initialize_chroot_environment() to stop processing, resulting in...

(1)
A new line was not being printed after the terminal message, 'You are in the chroot environment.'

(2)
The command 'dpkg-divert --local --rename --add /sbin/initctl' was not executed in the terminal.

(3)
The file .bashrc was not restored from .bashrc.bak

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.