copy/paste done as raster image

Bug #389262 reported by David Reitter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

I'm on Mac OS X using a pre-release 0.47 from today (it says it's 0.46-devel).

I copied (Ctrl-C) a vector object in one document and pasted it into another one running in the same instance of Inkscape.

What happened was that the objects weren't pasted as vector objects, but rasterized without alpha channel, so they were pretty much useless.

I later-on discovered that Inkscape wrote some ugly and persistent PNG files into its own .app bundle. This is a big no-no. You don't know that you have write permissions to the .app. It's not a place to write. Use /tmp, use ~/Library. Also, it's a privacy issue - users don't want to share their clippings. I wonder if Inkscape crashes if I start it from the DMG it comes (as many first-time users would to try it out).

Tags: clipboard osx
Revision history for this message
su_v (suv-lp) wrote :

1) version-string: where did you download your copy? Inkscape has these version strings in the About screen:
- latest 0.47 prerelease 0-1 from from sourceforge.net:
  "Inkscape 0.47pre0 r21549, built Jun 13 2009"
- latest development build from inkscape.modevia.com:
  "Inkscape 0.46+devel r21615, built Jun 10 2009"

2) bitmap instead of vector clipboard copy
This is a known issue with the new clipboard syncing features of X11/XQuartz. Please see bug #307005,and for a workaround <http://wiki.inkscape.org/wiki/index.php/FAQ#Copying_and_pasting_in_Inkscape_creates_pixellated_images_instead_of_copying_the_vector_objects>.

Revision history for this message
su_v (suv-lp) wrote :

3) inkscape_pasted_image_*.png, svg-filename_object#id.png in unexpected or hidden folders
I have noticed this too (less often with recent builds?), but did not yet take the time to create some reproducible testcases to have it confirmed by others. This could be a cross-platform issue, complicated by different default paths and app launcher mechanisms on various platforms?

- One case seems caused by the path stored in pref id = "open": when empty, it points to the top level inside the application bundle where subsequent tmp files are created. This is the current working dir for Inkscape.app when starting, necessary to find all included recources and libs.

- Another case was related to the path stored in the pref id = "save_as": set it to '/' by selecting 'Filesystem' in the 'Save as...' filechooser dialog, save (fails, but keeps the filename "/drawing.svg"), make a bitmap copy -> Inkscape often fails or crashes because it has no permission to create a tmp bitmap in '/'.

- OTOH bitmap export, emergency save already create the documents in $HOME.

Do you have any consistently reproducible testcases at hand?

4) search for possibly related bugs:
running from dmg:
  Bug #169013: (incomplete) Crash on help menu when ran from disk image
tags: osx
  Bug #198146: default directory for open on mac should be home directory
tmp files/default paths:
  Bug #171426: (confirmed, wishlist) Save documents at "My documents" (Windows)
  Bug #170295: (confirmed, wishlist) default export image name for not-saved drawings
  Bug #184679: (fix released) File Open dialog forgets settings
  Bug #167776: Save As Dialog: defaults to wrong path + fails to remember
  Bug #167364: (fix committed) Win2k: file dialog uses wrong home directory
  Bug #169108: (confirmed) Make a bitmap copy fails due to permissions; assoc. crufting
  Bug #168992: (won't fix) make a bit map copy command has no confirmation
  Bug #239669: Inkscape saves imported images from openclipart to /tmp

Revision history for this message
David Reitter (david-reitter) wrote : Re: [Bug 389262] Re: copy/paste done as raster image

On Jun 19, 2009, at 7:14 AM, ~suv wrote:

> 1) version-string: where did you download your copy? Inkscape has
> these version strings in the About screen:
> - latest 0.47 prerelease 0-1 from from sourceforge.net:
> "Inkscape 0.47pre0 r21549, built Jun 13 2009"
> - latest development build from inkscape.modevia.com:
> "Inkscape 0.46+devel r21615, built Jun 10 2009"

It's 21615, but the date seems to be Jun 17, even according to http://inkscape.modevia.com/macosx-snap/?M=D
.

> 2) bitmap instead of vector clipboard copy
> This is a known issue with the new clipboard syncing features of X11/
> XQuartz. Please see bug #307005,and for a workaround <http://wiki.inkscape.org/wiki/index.php/FAQ#Copying_and_pasting_in_Inkscape_creates_pixellated_images_instead_of_copying_the_vector_objects
> >.

Thank you.
One more incentive to make the OSX-native GTK port work.

> 3) inkscape_pasted_image_*.png, svg-filename_object#id.png in
> unexpected or hidden folders
> I have noticed this too (less often with recent builds?), but did
> not yet take the time to create some reproducible testcases to have
> it confirmed by others.

I just tried and failed to reproduce it. I had chmod u-w Inkscape.app
during startup, maybe that's why.

Revision history for this message
David Reitter (david-reitter) wrote :

On Jun 19, 2009, at 7:14 AM, ~suv wrote:
>
> 2) bitmap instead of vector clipboard copy
> This is a known issue with the new clipboard syncing features of X11/
> XQuartz. Please see bug #307005,and for a workaround <http://wiki.inkscape.org/wiki/index.php/FAQ#Copying_and_pasting_in_Inkscape_creates_pixellated_images_instead_of_copying_the_vector_objects
> >.

The funny thing is, I'm not even using XQuartz 2.3.3.

X11 claims to be:
 XQuartz 2.1.6 (xorg-server 1.4.2-apple33)

I couldn't find a newer release from Apple.

The latest non-Apple release has a switch that works, though.

Revision history for this message
su_v (suv-lp) wrote :

On 6/19/09 2:45 PM, David Reitter wrote:
> The funny thing is, I'm not even using XQuartz 2.3.3.
>
> X11 claims to be:
> XQuartz 2.1.6 (xorg-server 1.4.2-apple33)
>
> I couldn't find a newer release from Apple.
>
> The latest non-Apple release has a switch that works, though.

oops, the FAQ cites a wrong verions no.:

<http://xquartz.macosforge.org/trac/wiki/WikiStart#a10.5.7>
10.5.7 updates the X11 server to match what shipped with 2.3.2. Most of the userland, however, only saw security updates. The version reported by X11 in 10.5.7 is 2.1.6 to distinguish it from the 2.3.x series which contains a much newer userland. Users have reported some issues with the updated X11 in 10.5.7:
[…]
    * Clipboard doesn't work after editing preferences
          o Install the localization updates that contain the clipboard preferences
[…]

Release notes X11 2.3.2: Changes in 2.3.2
<http://xquartz.macosforge.org/trac/wiki/X112.3.2#Changesin2.3.2>
server: Xquartz fixes from xorg-server-1.4.2-apple31
[…]
          o Added new preferences UI for xpbproxy options
[…]
          o Massive update of proxying between OSX pasteboard and X11 clipboard/primary buffers
                + Image support
                + Unicode support
                + Preference options available in the X11 Preferences window

You can update to X11/XQuartz 2.3.3.2 here: <http://xquartz.macosforge.org/trac/wiki/WikiStart#LatestRelease>

Revision history for this message
LucaDC (lucadc) wrote :

Hem, are you really sure it's an X11 related bug?
I reported a long time ago (november 2008) bug #296778 for which I got no replies so I assume that nobody fixed anything about it. I didn't have to use gdb recently so I can't say if the bug is still there. Maybe I'll find some time to try.
I work under Windows XP, so don't ask me my version of X11 ;)

Also, please consider bug #373315 and my concerns about not managing the current app's directory properly.

Thanks.

Revision history for this message
su_v (suv-lp) wrote :

On 22/6/09 09:33, LucaDC wrote:
> Hem, are you really sure it's an X11 related bug? I reported a long
> time ago (november 2008) bug #296778 for which I got no replies so I
> assume that nobody fixed anything about it.

I unmarked bug #307005 as duplicate of bug #296778 because it described
a clipboard issue on OS X that only happens with newer version of
X11/XQuartz. This is confirmed by the developer (from apple) who works
on XQuartz (X.org server port for Mac OS X).

> I work under Windows XP, so don't ask me my version of X11 ;)

I don't use Windows but AFAIK the windows port of GTK+ (the Gui toolkit
Inkscape uses) doesn't need X11, so no, this issue looks different from
your copy/paste bug on XP.

Re bug #296778: do you use a clipboard manager that could interfere with
Inkscapes either internal handling or exchange with the system
clipboard? If it's a platform-independant bug as you suggest, there
ought to be more reports/confirms - the user base on XP is probably much
larger than on OS X.

I'm not a developer - so, no - I cannot be sure that it's only a X11
related bug.

Revision history for this message
su_v (suv-lp) wrote :

On 22/6/09 09:33, LucaDC wrote:
> Also, please consider bug #373315 and my concerns about not managing the
> current app's directory properly.

The extension 'Extract Image…' just dumped the extracted image into my
app bundle when I did not specify an absolute path to use. There's
definitely an issue with 'setting a current working directory' or 'using
the current document directory' for creating file-/pathnames when
printing, saving or the location of tmp files when silently writing to
files (e.g. make bitmap copy).

Revision history for this message
LucaDC (lucadc) wrote :

> Re bug #296778: do you use a clipboard manager that could interfere with
> Inkscapes either internal handling or exchange with the system
>clipboard?
Although it's related to a different bug: no, I'm not using any clipboard manager. I don't know if gdb could interfere with the clipboard transfer handling. Is it something related to a sort of clipboard transfer failure (so it's "downgraded" to raster)?

> If it's a platform-independant bug as you suggest, there
> ought to be more reports/confirms - the user base on XP is probably much
> larger than on OS X.
I'm not so sure about that: I've already reported other bugs that I'm still wondering why nobody did before me. I suppose it's related to how Inkscape is used so one finds a bug that others don't care or don't even encounter; or maybe they simply don't consider it so critical to worth being reported. And in this particular case it happens only under gdb (i.e. it's more difficult to notice but should be easier to track). One good example of this is the current app's path issue: it's sitting there since a lot and coming out only now (maybe: it's a matter of priorities, also).

I'm not a developer too and unfortunately I don't have time to dig into this issue to understand where it comes from: just seeing the same effects makes me think the cause could be the same too. It was just a hint. I hope it's so: one fix for two bugs = less work to do :)

Revision history for this message
David Reitter (david-reitter) wrote :

On Jun 22, 2009, at 5:25 AM, LucaDC wrote:

>> Re bug #296778: do you use a clipboard manager that could interfere
>> with
>> Inkscapes either internal handling or exchange with the system
>> clipboard?
> Although it's related to a different bug: no, I'm not using any
> clipboard manager. I don't know if gdb could interfere with the
> clipboard transfer handling. Is it something related to a sort of
> clipboard transfer failure (so it's "downgraded" to raster)?

For what it's worth, I've just deleted a bunch of those
inkscape_pasted*.png files from my desktop (resides in ~/Desktop).
So, it's not even consistent.

(Note that the SVG documents I've been working with were kept on the
desktop.)

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Wow, this looks pretty serious! I just compiled today's SVN version (22207) on Windows (to try reproducing LucaDC's snapping crash), but I also get a bitmap when simply copying and pasting a plain rectangle. So this is indeed cross platform (not X11 related) and a major regression. Can someone please mark this bug as a blocker or as critical for the v0.47 release?

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

@Diederik - I think LucaDC's win32 bug #296778 “Cut object pasted as bitmap” is more related to your issue than this one.

On OS X it only happens after upgrading to version 2.3.2 of XQuartz (which introduced new clipboard <> pasteboard syncing features). This issue has been confirmed by the developer of X11/XQuartz:
<http://article.gmane.org/gmane.comp.graphics.inkscape.user/12365>
<http://lists.apple.com/archives/X11-users/2009/May/msg00146.html>

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

A yes, thanks for the pointer. I was indeed running through gdb too, making this less serious.

Revision history for this message
su_v (suv-lp) wrote :

OTOH there seems to be an underlying issue with the integration of the system clipboard:

recent bug reports (all with 0.46+devel or 0.47pre) that I am aware of include
- empty clipboard on linux when using the clipboard manager 'Parcellite'
- random output/input extensions are triggered by 3rd party clipboard monitoring applications (linux)
- crash on linux when pasting text
- bitmap copy on win32 when running through gdb
- bitmap copy on osx 10.4 (with an ancient X11 version)

Should this be filed in a new bug report - assuming they all have the same cause?

Revision history for this message
su_v (suv-lp) wrote :

@David - regarding your initial bug report items

2) copy/paste as bitmap: needs to be fixed upstream in XQuartz
3) inkscape_pasted_image_*.png, svg-filename_object#id.png in unexpected or hidden folders:

could you test the lastest prerelease build Inkscape 0.47pre2-1 from <http://sourceforge.net/projects/inkscape/files/inkscape/0.47pre2/> if the last issue has been fixed or at least improved in the meantime?

Using SVN builds during the last 2 months I no longer had any files dumped inside the application bundle, the default location of 'Open..' has been changed to $HOME, and all emergency-saved files are also located in $HOME. 'inkscape_pasted*.png' files are still saved in the same folder as the drawing with the inserted bitmap copy, this won't change.

Proposing to closed this bug report as 'fixed' - pending David's feedback ;-)

Revision history for this message
David Reitter (david-reitter) wrote :

OK, I can't reproduce this any longer with 0.47pre2-1. I can't tell
if it's fixed or if I just don't reproduce.
I'm sure somebody will re-open this issue if the bug is still there.

Saving into the same folder as a drawing may be acceptable (but is
worse than saving to the correct location, /tmp/.)

Saving into $HOME is never a good idea on OS X. Unlike on most Unix
systems, it is not a dump ground; users will see these files at
inopportune moments, but they will not go there to look for them (they
would look in ~/Desktop if at all).

- D

On Sep 8, 2009, at 4:00 PM, ~suv wrote:

> @David - regarding your initial bug report items
>
> 2) copy/paste as bitmap: needs to be fixed upstream in XQuartz
> 3) inkscape_pasted_image_*.png, svg-filename_object#id.png in
> unexpected or hidden folders:
>
> could you test the lastest prerelease build Inkscape 0.47pre2-1 from
> <http://sourceforge.net/projects/inkscape/files/inkscape/0.47pre2/> if
> the last issue has been fixed or at least improved in the meantime?
>
> Using SVN builds during the last 2 months I no longer had any files
> dumped inside the application bundle, the default location of 'Open..'
> has been changed to $HOME, and all emergency-saved files are also
> located in $HOME. 'inkscape_pasted*.png' files are still saved in the
> same folder as the drawing with the inserted bitmap copy, this won't
> change.
>
> Proposing to closed this bug report as 'fixed' - pending David's
> feedback ;-)
>
> --
> copy/paste done as raster image
> https://bugs.launchpad.net/bugs/389262
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Inkscape: A Vector Drawing Tool: Confirmed
>
> Bug description:
> I'm on Mac OS X using a pre-release 0.47 from today (it says it's
> 0.46-devel).
>
> I copied (Ctrl-C) a vector object in one document and pasted it into
> another one running in the same instance of Inkscape.
>
> What happened was that the objects weren't pasted as vector objects,
> but rasterized without alpha channel, so they were pretty much
> useless.
>
> I later-on discovered that Inkscape wrote some ugly and persistent
> PNG files into its own .app bundle. This is a big no-no. You don't
> know that you have write permissions to the .app. It's not a place
> to write. Use /tmp, use ~/Library. Also, it's a privacy issue -
> users don't want to share their clippings. I wonder if Inkscape
> crashes if I start it from the DMG it comes (as many first-time
> users would to try it out).

Revision history for this message
su_v (suv-lp) wrote :

Thank you for your feedback on the prerelease build!

Since the issue of $HOME versus Desktop and /tmp/ on OS X is new here and still open I propose to file a separate bug about better OS integration and to close this report (workaround for 'paste as vector' exists, pasted bitmaps are no longer saved inside the application package).

other OS integration related bug reports:
Bug #171877 in Inkscape: “OSX: Use of Library/Application Support”:
Bug #198146 in Inkscape: “default directory for open on mac should be home directory”:

tags: added: clipboard osx
Revision history for this message
Mathematical Leopard (alisonat) wrote :

Sorry to report that I am still experiencing the same problem (copy/paste done as a raster image, and a png file created in the current directory).

Versions: Mac OS X 10.5.8
XQuartz 2.1.6

Originally I was using the Mac OS X developer build Inkscape-21714 released July 1 2009. I the updated to the 0.47 2-3 pre-release (from the link above) but I still have the same problem, even with a new Inkscape file trying to copy/paste a rectangle. The problem first occurred after I had saved a copy of my file as an eps. Having done that the original svg file wouldn't let me copy normally and instead enthusiastically created png files all over the place.

Revision history for this message
Mathematical Leopard (alisonat) wrote :

Just updated to a more recent version of XQuartz (2.3.2) and went in and changed the "pasteboard" preferences tab as suggested. Everything is now working :) It would be helpful to make it more obvious to people which version of XQuartz they should be using. Thank you very much to those who posted the workaround.

Revision history for this message
Matt Rasmussen (me-spacetoast) wrote :

Just to add a clarification, the raster is being created on copy, not on paste. This renders the "Paste Style" command unusable ("No style in clipboard.") -- which is a difficult feature to work around.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

The problem with creating bogus image files is fixed in dev version. The remaining issue is OSX clipboard problems which is a dupe of bug #307005

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.