autojack crashed with ValueError in start_slave(): not enough values to unpack (expected 3, got 1)

Bug #1822463 reported by Ross Gammon
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Studio Controls (development moved)
Fix Released
Medium
Unassigned
ubuntustudio-controls (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

On a restart, got this crash.

From memory, I had tried running Hexter without Jack, then started Jack with us-controls (auto-ticking the restart option), quit, then opened Qjackctl, before quitting and rebooting.

ProblemType: Crash
DistroRelease: Ubuntu 19.04
Package: ubuntustudio-controls 1.7
ProcVersionSignature: Ubuntu 5.0.0-8.9-lowlatency 5.0.1
Uname: Linux 5.0.0-8-lowlatency x86_64
ApportVersion: 2.20.10-0ubuntu23
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun Mar 31 12:36:11 2019
ExecutablePath: /usr/bin/autojack
InstallationDate: Installed on 2019-03-27 (4 days ago)
InstallationMedia: Ubuntu-Studio 19.04 "Disco Dingo" - Alpha amd64 (20190326.1)
InterpreterPath: /usr/bin/python3.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 -u /usr/bin/autojack >~/.log/autojack.log 2>&1 < /dev/null &
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Python3Details: /usr/bin/python3.7, Python 3.7.3, python3-minimal, 3.7.2-1
PythonArgs: ['/usr/bin/autojack', '>~/.log/autojack.log', '2>&1', '<', '/dev/null', '&']
PythonDetails: /usr/bin/python2.7, Python 2.7.16, python-minimal, 2.7.16-1
SourcePackage: ubuntustudio-controls
Title: autojack crashed with ValueError in start_slave(): not enough values to unpack (expected 3, got 1)
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Ross Gammon (rosco2) wrote :
tags: removed: need-duplicate-check
Changed in ubuntustudio-controls (Ubuntu):
importance: Undecided → Medium
Ross Gammon (rosco2)
information type: Private → Public
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

It's important to note that QJackCtl is set to stop Jack upon quit by default. This should probably be disabled prior to quitting QJackCtl, as Autojack probably doesn't like it when QJackCtl shuts down Jack prior to a reboot.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

@rosco2 Could you try the same steps with the checkbox in QJackCtl set to not shut down Jack at quit?

Changed in ubuntustudio-controls (Ubuntu):
status: New → Incomplete
Revision history for this message
Len Ovens (len-ovenwerks) wrote :

That is a bug. for sure, Line 367 or 536 is incorrect.

Changed in ubuntustudio-controls (Ubuntu):
status: Incomplete → Confirmed
Changed in ubuntustudio-controls:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Len Ovens (len-ovenwerks) wrote :

Ross please check new version build in autobuilds: https://code.launchpad.net/~ubuntustudio-dev/+archive/ubuntu/autobuild

Changed in ubuntustudio-controls:
status: Confirmed → Fix Committed
Changed in ubuntustudio-controls (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Ross Gammon (rosco2) wrote :
Download full text (3.8 KiB)

Hi Len,

It took a long time to work out the best test method.
But I can confirm that the version in the autobuilder fixes the autojack crash once you go into us-controls and save the configuration.

If you upgrade from the old version to the new version with DEV=default still in .config/autojackrc, then run autojack you still get the crash:
$ autojack -h
jackd: no process found
a2jmidid: no process found
Failed to unload module: Module module-jackdbus-detect not loaded
Failed to unload module: Module module-udev-detect not loaded
Failed to unload module: Module module-alsa-card not loaded
--- driver select "alsa"
--- driver param set "capture" -> "none"
--- driver param set "playback" -> "none"
--- driver param set "device" -> "hw:iO2,0,0"
--- driver param set "rate" -> "48000"
--- driver param set "period" -> "1024"
--- driver param set "nperiods" -> "2"
--- start
49
50
Traceback (most recent call last):
  File "/usr/bin/autojack", line 624, in <module>
    main()
  File "/usr/bin/autojack", line 601, in main
    config_start()
  File "/usr/bin/autojack", line 367, in config_start
    start_slave(dev)
  File "/usr/bin/autojack", line 536, in start_slave
    dname, dev, sub = ldev.split(",", 2)
ValueError: not enough values to unpack (expected 3, got 1)

By saving a new config in us-controls with default > DEV=0,0,0
--------------------------------------------------------------

Everything is fine:
$ autojack -h
jackd: no process found
a2jmidid: no process found
Failed to unload module: Module module-jackdbus-detect not loaded
Failed to unload module: Module module-udev-detect not loaded
Failed to unload module: Module module-alsa-card not loaded
--- driver select "alsa"
--- driver param set "capture" -> "none"
--- driver param set "playback" -> "none"
--- driver param set "device" -> "hw:iO2,0,0"
--- driver param set "rate" -> "48000"
--- driver param set "period" -> "1024"
--- driver param set "nperiods" -> "2"
--- start
52
53
Extra internal:
JACK MIDI <-> ALSA sequencer MIDI bridge, version 8 (7383d268c4bfe85df9f10df6351677659211d1ca) built on Thu Jan 1 01:00:00 1970
Copyright 2006,2007 Dmitry S. Baikov
Copyright 2007,2008,2009,2011,2012 Nedko Arnaudov

Bridge starting...
Using JACK server 'default'
Hardware ports will be exported.
Bridge started
Press ctrl-c to stop the bridge
port created: Midi Through [14] (capture): Midi Through Port-0
port created: Midi Through [14] (playback): Midi Through Port-0
port created: iO 2 [24] (capture): iO 2 MIDI 1
port created: iO 2 [24] (playback): iO 2 MIDI 1

Manually edit file back to DEV=default (naughty!)
-------------------------------------------------

$ autojack -h
jackd: no process found
a2jmidid: no process found
Failed to unload module: Module module-jackdbus-detect not loaded
Failed to unload module: Module module-udev-detect not loaded
Failed to unload module: Module module-alsa-card not loaded
--- driver select "alsa"
--- driver param set "capture" -> "none"
--- driver param set "playback" -> "none"
--- driver param set "device" -> "hw:iO2,0,0"
--- driver param set "rate" -> "48000"
--- driver param set "period" -> "1024"
--- driver param set "nperiods" -> "2"
--- start
55
56
Traceback ...

Read more...

Revision history for this message
Len Ovens (len-ovenwerks) wrote : Re: [Bug 1822463] Re: autojack crashed with ValueError in start_slave(): not enough values to unpack (expected 3, got 1)

On Sat, 27 Apr 2019, Ross Gammon wrote:

> So us-controls now saves a better default value for new installations,
> but someone that was already getting the crash will still get it until
> they save a new configuration, and a person that manually edits the
> config file will also still get a crash.
>
> Trapping the crash in autojack and printing a suitable error message
> would be the perfect fix.

New commit where default is siglently changed to 0,0,0 (though the
description is left at default). In auto builds soon... (building now)

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

@rosco2 Should we make this an SRU as well, or do you feel a simple upload to the backport PPA would suffice?

Revision history for this message
Ross Gammon (rosco2) wrote :

Well, so far the problem is pretty limited, and only those with the older us-controls sticking with DEV=default would experience the bug. And the simple work-around is to update to the fixed version in the ppa, re-save the configuration, and autojack should be happy after that.

I just ran autojack with the latest us-controls in the autobuilder, and got this new crash (I did not change my autojackrc which had been left with "DEV=default"):
$ autojack -h
jackd: no process found
a2jmidid: no process found
Failed to unload module: Module module-jackdbus-detect not loaded
Failed to unload module: Module module-udev-detect not loaded
Failed to unload module: Module module-alsa-card not loaded
--- driver select "alsa"
--- driver param set "capture" -> "none"
--- driver param set "playback" -> "none"
--- driver param set "device" -> "hw:iO2,0,0"
--- driver param set "rate" -> "48000"
--- driver param set "period" -> "1024"
--- driver param set "nperiods" -> "2"
--- start
34
35
Traceback (most recent call last):
  File "/usr/bin/autojack", line 628, in <module>
    main()
  File "/usr/bin/autojack", line 605, in main
    config_start()
  File "/usr/bin/autojack", line 371, in config_start
    start_slave(dev)
  File "/usr/bin/autojack", line 540, in start_slave
    dname, dev, sub = ldev.split(",", 2)
AttributeError: 'tuple' object has no attribute 'split'

Revision history for this message
Len Ovens (len-ovenwerks) wrote :

On Wed, 1 May 2019, Ross Gammon wrote:

> File "/usr/bin/autojack", line 371, in config_start
> start_slave(dev)
> File "/usr/bin/autojack", line 540, in start_slave
> dname, dev, sub = ldev.split(",", 2)
> AttributeError: 'tuple' object has no attribute 'split'

Can I assume that A) master jack device is USB B) there is no other device

Never mind, autojack is just trying to be too smart, will dumb down.

Revision history for this message
Len Ovens (len-ovenwerks) wrote :

line 371 and it's if statement have been removed. Please try the autobuilds version again. I think I was trying to be too smart with that anyway. It assumes there is always more than one device when there is a USB device... bad idea.

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

This bug was fixed in the package ubuntustudio-controls - 1.9.1

---------------
ubuntustudio-controls (1.9.1) eoan; urgency=medium

  * Demoted carla from depends to recommends

 -- Erich Eickmeyer <email address hidden> Thu, 13 Jun 2019 11:07:41 -0700

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