#9022 NORM Not Tri: After making selection of png image, copying it fails
Zarro Boogs per Child
bugtracker at laptop.org
Wed Nov 19 22:02:45 EST 2008
#9022: After making selection of png image, copying it fails
----------------------------------------------+-----------------------------
Reporter: HoboPrimate | Owner: alexandre
Type: defect | Status: new
Priority: normal | Milestone: Not Triaged
Component: paint/drawing-activity (oficina) | Version: not specified
Keywords: | Next_action: never set
Verified: 0 | Deployment_affected:
Blockedby: | Blocking:
----------------------------------------------+-----------------------------
Build 8.2
Paint 23
Take a screenshot of the screen, and open it up with paint. Select a part
of the image with the select tool, and click the copy button. A new grayed
out picture-shaped icon appears in the clipboard, but it can't be
manipulated. The copy fails.
Pasting logs of Paint and shell.log (this last one seems the most telling
to me).
Log of Paint:
"
reserved credentials (10000, 10011)
adding group: /usr/sbin/groupadd -o -g 10011 10011
adding user: /usr/sbin/useradd -m -u 10000 -g 10011 -c
org.laptop.Oficina.10000 -d /home/olpc/isolation/1/uid_to_home_dir/10000
10000
Criar ficheiro mailbox: File exists
dropping privilege to (10000, 10011)
chdir to /home/olpc/Activities/Paint.activity
umask(0)
about to execve
argv: dbus.Array([dbus.UTF8String('sugar-activity'),
dbus.UTF8String('OficinaActivity.OficinaActivity'), dbus.UTF8String('-b'),
dbus.UTF8String('org.laptop.Oficina'), dbus.UTF8String('-a'),
dbus.UTF8String('b82951ee932af84954e226cae6f211acbbd6ea18'),
dbus.UTF8String('-o'),
dbus.UTF8String('dae1e98a-c006-4ba0-a0a5-74ca83b0c964')],
signature=dbus.Signature('s'))
env: dbus.Dictionary({dbus.UTF8String('LOGNAME'): dbus.UTF8String('olpc'),
'USER': '10000', dbus.UTF8String('HOME'):
'/home/olpc/isolation/1/uid_to_home_dir/10000', dbus.UTF8String('PATH'):
dbus.UTF8String('/home/olpc/Activities/Paint.activity/bin:/usr/share/sugar/activities/Journal.activity/bin:/usr/bin:/bin'),
dbus.UTF8String('DISPLAY'): dbus.UTF8String(':0'),
dbus.UTF8String('LANG'): dbus.UTF8String('pt_PT.utf8'),
dbus.UTF8String('SHELL'): dbus.UTF8String('/bin/bash'),
dbus.UTF8String('TZ'): dbus.UTF8String('UTC'),
dbus.UTF8String('XDG_SESSION_COOKIE'):
dbus.UTF8String('7b1082944c24c63e6d48e7034920b9ef-1227148040.189243-1854300257'),
dbus.UTF8String('SESSION_MANAGER'): dbus.UTF8String('local/unix:@/tmp
/.ICE-unix/1231,unix/unix:/tmp/.ICE-unix/1231'), dbus.UTF8String('SHLVL'):
dbus.UTF8String('1'), dbus.UTF8String('ICEAUTHORITY'):
'/home/olpc/isolation/1/uid_to_home_dir/10000/.ICEauthority',
dbus.UTF8String('WINDOWPATH'): dbus.UTF8String('3'),
dbus.UTF8String('SUGAR_BUNDLE_NAME'): dbus.UTF8String('Di\xc3\xa1rio'),
dbus.UTF8String('SUGAR_BUNDLE_PATH'):
dbus.UTF8String('/home/olpc/Activities/Paint.activity'),
dbus.UTF8String('SUGAR_LOCALEDIR'):
dbus.UTF8String('/home/olpc/Activities/Paint.activity/locale'),
dbus.UTF8String('SUGAR_THEME'): dbus.UTF8String('sugar-xo'),
dbus.UTF8String('SUGAR_ACTIVITY_ROOT'):
'/home/olpc/isolation/1/uid_to_home_dir/10000',
dbus.UTF8String('GTK2_RC_FILES'): dbus.UTF8String('/usr/share/sugar/data
/sugar-xo.gtkrc'), dbus.UTF8String('SUGAR_BUNDLE_ID'):
dbus.UTF8String('org.laptop.Oficina'),
dbus.UTF8String('DBUS_SESSION_BUS_ADDRESS'):
dbus.UTF8String('unix:path=/tmp/olpc-session-
bus,guid=f85edeedea7a5ef4f06f94d94924cb08'), 'TMPDIR':
'/home/olpc/isolation/1/uid_to_home_dir/10000/tmp',
dbus.UTF8String('XAUTHORITY'):
'/home/olpc/isolation/1/uid_to_home_dir/10000/.Xauthority',
dbus.UTF8String('GTK_IM_MODULE'): dbus.UTF8String('gtk-im-context-
simple'), dbus.UTF8String('XSERVERAUTH'): dbus.UTF8String('/var/tmp/olpc-
auth/.Xserverauth'), dbus.UTF8String('PWD'):
dbus.UTF8String('/home/olpc'), dbus.UTF8String('SUGAR_BUNDLE_VERSION'):
dbus.UTF8String('99')}, signature=dbus.Signature('ss'))
closing all fds but (1, 2)
{dbus.UTF8String('LOGNAME'): dbus.UTF8String('olpc'), 'USER': '10000',
'PATH':
dbus.UTF8String('/home/olpc/Activities/Paint.activity/bin:/usr/share/sugar/activities/Journal.activity/bin:/usr/bin:/bin'),
dbus.UTF8String('HOME'): '/home/olpc/isolation/1/uid_to_home_dir/10000',
'DISPLAY': dbus.UTF8String(':0'), 'LANG': dbus.UTF8String('pt_PT.utf8'),
'TERM': 'linux', dbus.UTF8String('SHELL'): dbus.UTF8String('/bin/bash'),
dbus.UTF8String('TZ'): dbus.UTF8String('UTC'), 'XAUTHORITY':
'/home/olpc/isolation/1/uid_to_home_dir/10000/.Xauthority',
dbus.UTF8String('SESSION_MANAGER'): dbus.UTF8String('local/unix:@/tmp
/.ICE-unix/1231,unix/unix:/tmp/.ICE-unix/1231'), dbus.UTF8String('SHLVL'):
dbus.UTF8String('1'), 'ICEAUTHORITY':
'/home/olpc/isolation/1/uid_to_home_dir/10000/.ICEauthority',
dbus.UTF8String('WINDOWPATH'): dbus.UTF8String('3'),
dbus.UTF8String('SUGAR_BUNDLE_NAME'): dbus.UTF8String('Di\xc3\xa1rio'),
dbus.UTF8String('SUGAR_BUNDLE_PATH'):
dbus.UTF8String('/home/olpc/Activities/Paint.activity'),
dbus.UTF8String('SUGAR_LOCALEDIR'):
dbus.UTF8String('/home/olpc/Activities/Paint.activity/locale'),
dbus.UTF8String('SUGAR_THEME'): dbus.UTF8String('sugar-xo'),
'UPSTART_JOB': 'rainbow', 'UPSTART_JOB_ID': '3',
dbus.UTF8String('SUGAR_BUNDLE_ID'): dbus.UTF8String('org.laptop.Oficina'),
'DBUS_SESSION_BUS_ADDRESS': dbus.UTF8String('unix:path=/tmp/olpc-session-
bus,guid=f85edeedea7a5ef4f06f94d94924cb08'), 'TMPDIR':
'/home/olpc/isolation/1/uid_to_home_dir/10000/tmp',
dbus.UTF8String('XDG_SESSION_COOKIE'):
dbus.UTF8String('7b1082944c24c63e6d48e7034920b9ef-1227148040.189243-1854300257'),
dbus.UTF8String('GTK_IM_MODULE'): dbus.UTF8String('gtk-im-context-
simple'), dbus.UTF8String('XSERVERAUTH'): dbus.UTF8String('/var/tmp/olpc-
auth/.Xserverauth'), dbus.UTF8String('SUGAR_ACTIVITY_ROOT'):
'/home/olpc/isolation/1/uid_to_home_dir/10000', dbus.UTF8String('PWD'):
dbus.UTF8String('/home/olpc'), dbus.UTF8String('SUGAR_BUNDLE_VERSION'):
dbus.UTF8String('99'), 'UPSTART_EVENT': 'started', 'GTK2_RC_FILES':
dbus.UTF8String('/usr/share/sugar/data/sugar-xo.gtkrc')}
/usr/lib/python2.5/site-packages/sugar/graphics/combobox.py:93:
PangoWarning: error opening config file '/root/.pangorc': Permission
denied
self._model.append([action_id, text, pixbuf, False])
1227149124.231145 WARNING root: No gtk.AccelGroup in the top level window.
1227149124.256431 WARNING root: No gtk.AccelGroup in the top level window.
{'line shape': 'circle', 'name': 'pencil', 'line size': 2, 'fill color':
None, 'vertices': None, 'stroke color': None, 'fill': True}
** (rainbow-daemon:1158): DEBUG: Got client ID
"10f4f53e82ec289c7122714912912072700000012310002"
** (rainbow-daemon:1158): DEBUG: Setting initial properties
** (rainbow-daemon:1158): DEBUG: Received SaveYourself(SmSaveLocal,
!Shutdown, SmInteractStyleNone, !Fast) in state idle
** (rainbow-daemon:1158): DEBUG: Sending SaveYourselfDone(True) for
initial SaveYourself
** (rainbow-daemon:1158): DEBUG: Received SaveComplete message in state
save-yourself-done
{'line shape': None, 'name': 'marquee-rectangular', 'line size': None,
'fill color': None, 'vertices': None, 'stroke color': <GdkColor at
0xa78f170>, 'fill': None}
---------------------------------------------------------------------------
GError Traceback (most recent call
last)
/home/olpc/Activities/Paint.activity/toolbox.py in
_paste_cb(self=<DrawEditToolbar object at 0xb608634c (GtkToolbar at
0xa3a70a8)>, widget=<ToolButton object at 0xb608b784 (SugarToolButton at
0xa65a300)>, data=None)
161
162 def _paste_cb(self, widget, data=None):
--> 163 self._activity.area.past(self._activity.area)
self._activity.area.past = <bound method Area.past of <Area object
at 0xb60861e4 (Area+Area at 0xa2928c0)>>
self._activity.area = <Area object at 0xb60861e4 (Area+Area at
0xa2928c0)>
164
165 def _on_signal_undo_cb(self, widget, data=None):
/home/olpc/Activities/Paint.activity/Area.py in past(self=<Area object at
0xb60861e4 (Area+Area at 0xa2928c0)>, widget=<Area object at 0xb60861e4
(Area+Area at 0xa2928c0)>)
705 self.emit('select')
706 else:
--> 707 self.loadImage(tempPath, self, True)
self.loadImage = <bound method Area.loadImage of <Area object at
0xb60861e4 (Area+Area at 0xa2928c0)>>
tempPath = '/tmp/tempFile'
self = <Area object at 0xb60861e4 (Area+Area at 0xa2928c0)>
global True = undefined
708 logging.debug('Area.past(self): Load from clipboard
fails, loading from tempPatch')
709
/home/olpc/Activities/Paint.activity/Area.py in loadImage(self=<Area
object at 0xb60861e4 (Area+Area at 0xa2928c0)>, name='/tmp/tempFile',
widget=<Area object at 0xb60861e4 (Area+Area at 0xa2928c0)>,
load_selected=True)
958 self.enableUndo(widget)
959 else :
--> 960 pixbuf = gtk.gdk.pixbuf_new_from_file(name)
pixbuf = undefined
global gtk.gdk.pixbuf_new_from_file = <built-in function
pixbuf_new_from_file>
name = '/tmp/tempFile'
961 size = (int)(pixbuf.get_width()),
(int)(pixbuf.get_height())
962 #self.getout(True,widget)
GError: Falha ao abrir ficheiro '/tmp/tempFile': No such file or directory
"
Log of shell.log:
"
DBusException Traceback (most recent call
last)
/usr/share/sugar/shell/view/frame/clipboardpanelwindow.py in
_owner_change_cb(self=<ClipboardPanelWindow object at 0x92103ec
(SugarFrameWindow at 0x9279c28)>, clipboard=<gtk.Clipboard object at
0x99325f4 (GtkClipboard at 0x9285f28)>, event=<GdkEvent at 0x9907da0>)
69 self._add_selection(key, selection)
70
---> 71 cb_service.set_object_percent(key, percent=100)
cb_service.set_object_percent = <bound method
ClipboardService.set_object_percent of <ClipboardService object at
0x9210a7c (sugar+clipboard+clipboardservice+ClipboardService at
0x9293d50)>>
key = '/org/laptop/Clipboard/Objects/10'
global percent = undefined
72
73 def _add_selection(self, key, selection):
/usr/lib/python2.5/site-packages/sugar/clipboard/clipboardservice.py in
set_object_percent(self=<ClipboardService object at 0x9210a7c
(sugar+cli...+clipboardservice+ClipboardService at 0x9293d50)>,
object_id='/org/laptop/Clipboard/Objects/10', percent=100)
185 """
186 self._dbus_service.set_object_percent(
--> 187 dbus.ObjectPath(object_id),
percent)
global dbus.ObjectPath = <type 'dbus.ObjectPath'>
object_id = '/org/laptop/Clipboard/Objects/10'
percent = 100
188
189 def get_object(self, object_id):
/usr/lib/python2.5/site-packages/dbus/proxies.py in
__call__(self=<dbus.proxies._ProxyMethod instance at 0x9c1054c>,
*args=(dbus.ObjectPath('/org/laptop/Clipboard/Objects/10'), 100),
**keywords={})
138 introspect_sig,
139 args,
--> 140 **keywords)
keywords = {}
141
142 def call_async(self, *args, **keywords):
/usr/lib/python2.5/site-packages/dbus/connection.py in
call_blocking(self=<dbus._dbus.SessionBus (session) at 0x91beb0c>,
bus_name='org.laptop.Clipboard', object_path='/org/laptop/Clipboard',
dbus_interface='org.laptop.Clipboard', method='set_object_percent',
signature=u'oi',
args=(dbus.ObjectPath('/org/laptop/Clipboard/Objects/10'), 100),
timeout=-1.0, utf8_strings=False, byte_arrays=False)
628 # make a blocking call
629 reply_message = self.send_message_with_reply_and_block(
--> 630 message, timeout)
message = <dbus.lowlevel.MethodCallMessage object at 0x958a810>
timeout = -1.0
631 args_list = reply_message.get_args_list(**get_args_opts)
632 if len(args_list) == 0:
DBusException: org.freedesktop.DBus.Python.IOError: Traceback (most recent
call last):
File "/usr/lib/python2.5/site-packages/dbus/service.py", line 702, in
_message_cb
retval = candidate_method(self, *args, **keywords)
File "/usr/share/sugar/service/clipboardservice.py", line 123, in
set_object_percent
new_uri = self._copy_file(format.get_data())
File "/usr/share/sugar/service/clipboardservice.py", line 201, in
_copy_file
shutil.copyfile(uri.path, new_file_path)
File "/usr/lib/python2.5/shutil.py", line 46, in copyfile
fsrc = open(src, 'rb')
IOError: [Errno 13] Permission denied:
'/home/olpc/isolation/1/uid_to_home_dir/10000/instance/tmpZMVf_r.png'
"
--
Ticket URL: <http://dev.laptop.org/ticket/9022>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list