[Bugs] #4788 Turtleart HIGH: IOError when running TurtleBlocks on multi-user non Sugar system

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Thu Sep 18 06:55:28 EDT 2014


#4788: IOError when running TurtleBlocks on multi-user non Sugar system
-----------------------------+--------------------------
       Reporter:  Thomee     |       Owner:
           Type:  defect     |      Status:  new
       Priority:  High       |   Milestone:  Unspecified
      Component:  Turtleart  |     Version:  Unspecified
       Severity:  Major      |    Keywords:
Distribution/OS:  Ubuntu     |  Bug Status:  Unconfirmed
-----------------------------+--------------------------
\
\
 Using TurtleBlocks 207 on Ubuntu 14.04, installed from
 ppa:alanjas/turtleblocks

 The first user to run TurtleBlocks has no problems. The second user to
 attempt to run TurtleBlocks cannot run their program. If started from the
 console, the final error is "IOError: error while writing to output
 stream". This is caused by the creation of a temporary SVG file at
 /tmp/turtle_output.svg, which is never cleaned up. The first user is able
 to create the file successfully, and any time they user TurtleBlocks it is
 overwritten just fine. But a second user trying to run a TurtleBlocks
 program is unable to overwrite the temporary file which is owned by the
 first user, and the program fails.

 A somewhat ugly hack, which is included as a patch as proof of concept, is
 to use the current user's username as part of the temporary file name.
 This still leaves spare temporary files laying around, but at least each
 user has a unique temporary file, and so don't run into permissions
 issues. The method used in the patch is not the most robust, and I have no
 idea how it would behave on a non unix system. But all of the SVG export
 functionality seems to be very unix specific, so I'm not sure this is much
 of a loss. A better solution would probably be to generate a unique
 temporary file name, then make sure it is cleaned up when the program
 exits.
\
\
\

--
Ticket URL: <http://bugs.sugarlabs.org/ticket/4788>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list