Opened 10 years ago

Closed 10 years ago

#2667 closed defect (obsolete)

fails to start inside chroot

Reported by: sascha_silbe Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Turtleart Version: Git as of bugdate
Severity: Blocker Keywords:
Cc: Distribution/OS:
Bug Status: New

Description

I'm doing most of my development work and testing on my desktop inside a Debian Squeeze chroot. org.laptop.TurtleArtActivity fails to start inside the chroot because the dbus system bus is unavailable:

Traceback (most recent call last):
  File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-activity", line 21, in <module>
    main.main()
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.6/site-packages/sugar/activity/main.py", line 158, in main
    create_activity_instance(activity_constructor, activity_handle)
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.6/site-packages/sugar/activity/main.py", line 37, in create_activity_instance
    activity = constructor(handle)
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/TurtleArt.activity/TurtleArtActivity.py", line 73, in __init__
    self._setup_canvas(canvas)
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/TurtleArt.activity/TurtleArtActivity.py", line 687, in _setup_canvas
    profile.get_nick_name())
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/TurtleArt.activity/TurtleArt/tawindow.py", line 149, in __init__
    self.hw = get_hardware()
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/TurtleArt.activity/TurtleArt/tautils.py", line 826, in get_hardware
    bus = dbus.SystemBus()
  File "/usr/lib/pymodules/python2.6/dbus/_dbus.py", line 202, in __new__
    private=private)
  File "/usr/lib/pymodules/python2.6/dbus/_dbus.py", line 108, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/pymodules/python2.6/dbus/bus.py", line 125, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused

See 08b278a for how I fixed a similar issue in sugar.

Change History (3)

comment:1 Changed 10 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 10 years ago by sascha_silbe

  • Resolution fixed deleted
  • Status changed from closed to reopened

Still happens:

Traceback (most recent call last):
  File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-activity", line 21, in <module>
    main.main()
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.6/site-packages/sugar/activity/main.py", line 158, in main
    create_activity_instance(activity_constructor, activity_handle)
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.6/site-packages/sugar/activity/main.py", line 37, in create_activity_instance
    activity = constructor(handle)
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/TurtleArt.activity/TurtleArtActivity.py", line 73, in __init__
    self._setup_canvas(canvas)
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/TurtleArt.activity/TurtleArtActivity.py", line 700, in _setup_canvas
    profile.get_nick_name())
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/TurtleArt.activity/TurtleArt/tawindow.py", line 151, in __init__
    self.hw = get_hardware()
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/TurtleArt.activity/TurtleArt/tautils.py", line 792, in get_hardware
    bus = dbus.SystemBus()
  File "/usr/lib/pymodules/python2.6/dbus/_dbus.py", line 202, in __new__
    private=private)
  File "/usr/lib/pymodules/python2.6/dbus/_dbus.py", line 108, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/pymodules/python2.6/dbus/bus.py", line 125, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused

You wrapped the bus.get_object() call in a try/except block, but not the dbus.SystemBus() call that failed. Both calls can throw a DBusException that needs to be caught.

comment:3 Changed 10 years ago by walter

  • Resolution set to obsolete
  • Status changed from reopened to closed

The dbus call is no longer used in the code.

Note: See TracTickets for help on using tickets.