inkscape crashes when pasting image from clipboard on OSX

Bug #1410793 reported by KaOS-bEat on 2015-01-14
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Tim Sheridan

Bug Description

Inkscape 0.91pre3 on osx crashes when pasting a raster image from the clipboard:

reproduce:
- copy image to clipboard e.g in chrome, rightclick, copy to clipboard
- ctrl-V in inkscape
- inkscape crashes (backup saved)

I used to do this daily in inkscape 0.48.5 no problem at all, and I just tested, it's still no problem... must be something 0.91 specific

su_v (suv-lp) wrote :

Please add information about OS X version to the bug description.

1) Could you attach the crash report please? OS X creates crash reports automatically, you can find them in 'Home > Library > Logs > DiagnosticReports' (please choose the latest one for 'inkscape-bin' which was triggered by pasting an image from Chrome - the reports have date and time stamps in the file name).

2) It might also be helpful to see any related console messages output at the time the crash happens:
- browse to the installation folder of Inkscape 0.91pre3 (usually '/Applications')
- select the Inkscape icon, open the context menu and choose 'Show Package Contents'
- in the package contents, browse to 'Contents > MacOS' and double-click 'Inkscape' there
- this will open a non-interactive terminal window (apart from launching inkscape) where all console messages are output
Please save the console output as regular text file, and attach to this report.

3) Which settings do you use for the 'Pasteboard' in X11 Preferences?
(see screenshot at https://inkscape.org/en/download/mac-os/ for recommended settings)

4) Which locale (language) do you use Inkscape with?

Crash as described not reproduced on OS X 10.7.5 with
- Inkscape 0.91pre3 r13670
- XQuartz 2.7.7 (xorg-server 1.15.2) (Pasteboard settings as recommended)
- image: Inkscape logo (upper left corner) at https://www.inkscape.org
- browser: recent Chromium snapshot (42.0.2276.0 (64-bit))
- browser: Firefox 34.0.5

tags: added: clipboard crash osx regression
Changed in inkscape:
importance: Undecided → High
su_v (suv-lp) wrote :

Forgot to ask - did you compile Inkscape 0.91pre3 from source, or installed the precompiled binary?

su_v (suv-lp) wrote :

Possibly related to
- Bug #1398521 “importing graphics crashes app on OS X in 0.91”
  <https://bugs.launchpad.net/inkscape/+bug/1398521>

KaOS-bEat (kasper-jordaens) wrote :

Importing from the menu works fine! (so maybe not related to Bug #1398521

1) attached!

2) not a lot of output, full text below

/Applications/Inkscape.app/Contents/MacOS/Inkscape ; exit;
Viewbox not set, setting
Assertion failed: (this->is_initialized()), function get, file /Volumes/magenta/mp-trunk/x11/include/boost/optional/optional.hpp, line 992.

Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.
logout

[Process completed]

3) pasteboard settings as recommended
4) System default -> US-EN

OSX version Mac OS X 10.10.1 (14B25)
inkscape pre-compiled version from downloads page 0.91pre3 r13670
XQuartz 2.7.7 xorg 1.15.2
reproduced with topleft inkscape logo from inkscape.org pasting in latest chrome

su_v (suv-lp) wrote :

On 2015-01-14 16:06 (+0100), KaOS-bEat wrote:
> Importing from the menu works fine! (so maybe not related to Bug
> #1398521

Some of the crash logs attached in bug #1398521 indicate it is related:

Your console log:
> /Applications/Inkscape.app/Contents/MacOS/Inkscape ; exit;
> Viewbox not set, setting
> Assertion failed: (this->is_initialized()), function get, file /Volumes/magenta/mp-trunk/x11/include/boost/optional/optional.hpp, line 992.

Crash log from comment 4 in bug #1398521
> Application Specific Information:
> Assertion failed: (this->is_initialized()), function get, file /Volumes/magenta/mp-trunk/x11/include/boost/optional/optional.hpp, line 992.

Does the crash affect different users on the same system too, and does it persist after a reboot?

Would you mind testing a recent trunk (0.91+devel) build on your system? Download links can be found at inkscape.org, or on my launchpad profile page:
https://inkscape.org/en/download/#download-devel
https://launchpad.net/~suv-lp

Please note: Inkscape 0.91+devel (current development branch) has internal changes (dpi 90 -> 96) which might affect the output size of Inkscape SVG files which had been created with Inkscape 0.48 or 0.91pre3 (this is work-in-progess, and will hopefully be handled transparently in future 0.92). For now I'd recommend to only use it for testing, but not in a production environment.

su_v (suv-lp) wrote :

If you don't mind further testing: new custom build of the latest stable release branch (0.91pre3 r13696) uploaded which includes a few additional debug messages to the console when trying to retrieve a bitmap file's own resolution on import (or paste):
"Inkscape-0.91pre3-r13696-1-x11-10.7-x86_64-custom.dmg"
<https://www.dropbox.com/sh/magg5vw5j3y1y3u/AAD-l8JqwCyUNuoWYNRKufyHa?dl=0>

KaOS-bEat (kasper-jordaens) wrote :

I tried the Inkscape-0.91pre3-r13696-1-x11-10.7-x86_64-custom.dmg

this is the output, it does NOT crash. I can manipulate and scale etc...

this is the output:

/Applications/Inkscape.app/Contents/MacOS/Inkscape ; exit;
/Users/su_v/TEMP/inkscape-repo/mptrunk-091x-x11/src/extension/internal/image-resolution.cpp(157) readpng: readpng
x_: 2.003893
y_: 0.000000
/Users/su_v/TEMP/inkscape-repo/mptrunk-091x-x11/src/extension/internal/image-resolution.cpp(163) readpng: failure
/Users/su_v/TEMP/inkscape-repo/mptrunk-091x-x11/src/extension/internal/image-resolution.cpp(422) readmagick: ImageMagick fallback
x_: 0.000000
y_: 0.000000
/Users/su_v/TEMP/inkscape-repo/mptrunk-091x-x11/src/extension/internal/image-resolution.cpp(428) readmagick: failure
/Users/su_v/TEMP/inkscape-repo/mptrunk-091x-x11/src/extension/internal/image-resolution.cpp(79) ImageResolution: Failed to retrieve image size based on image resolution.

Kasper

su_v (suv-lp) wrote :

Would you mind briefly testing another build (no special debug messages this time)?
"Inkscape-0.91pre3-r13706-1-x11-10.7-x86_64.dmg"
<https://www.dropbox.com/sh/magg5vw5j3y1y3u/AAD-l8JqwCyUNuoWYNRKufyHa?dl=0>

KaOS-bEat (kasper-jordaens) wrote :

yes, the result is a crash upon paste.

the output is
 /Applications/Inkscape.app/Contents/MacOS/Inkscape ; exit;
Assertion failed: (this->is_initialized()), function get, file /Volumes/magenta/mp-trunk/x11/include/boost/optional/optional.hpp, line 992.

the log is attached. Kind regards

Paul Morris (v-paul-p) wrote :

Similar bug for me with OSX 10.10.1 and Inkscape 0.91pre4 (source tarball)

Cut and paste results in:

"Inkscape encountered an internal error and will close now."

su_v (suv-lp) wrote :

On 2015-01-22 06:38 (+0100), Paul Morris wrote:
> Similar bug for me with OSX 10.10.1 and Inkscape 0.91pre4 (source
> tarball)

Just to be sure - you did compile Inkscape 0.91pre4 from source on Yosemite yourself? If so, any chance you could run it from the debugger (lldb) and provide a full backtrace (ideally, with a debug build)?

> Cut and paste results in:
>
> "Inkscape encountered an internal error and will close now."

Please expand on this one: you did cut what where exactly? If this happens if you cut and paste a regular object in inkscape, did you change the X11 preferences as recommended (turning off the setting 'Pasteboard > [ ] Update Pasteboard when CLIPBOARD changes') or does the crash on cut&paste0 get triggered because the object cut to the clibopard is pasted as rasterized copy (bug #307005)?

su_v (suv-lp) on 2015-01-22
Changed in inkscape:
status: New → Confirmed
Paul Morris (v-paul-p) wrote :

> Just to be sure - you did compile Inkscape 0.91pre4 from source on Yosemite yourself?

Sorry I was not clear, I did *not* compile it myself. I just used the .dmg from:
https://inkscape.org/en/download/

> Please expand on this one: you did cut what where exactly?

Just a simple rectangle drawn in Inkscape. I also tried copying an svg from a webpage (an svg created with Inkscape), and pasting it in. Both crashed at the paste command.

> If this happens if you cut and paste a regular object in inkscape,
> did you change the X11 preferences as recommended (turning
> off the setting 'Pasteboard > [ ] Update Pasteboard when
> CLIPBOARD changes') or does the crash on cut&paste0 get
> triggered because the object cut to the clibopard is pasted as
> rasterized copy (bug #307005)?

I just turned this setting off and the crash no longer occurs. At least not with the rectangle drawn in Inkscape. Pasting an svg from a web page is not possible with this setting off. (I must have missed the recommendation for this setting.)

After turning that setting off, the objects cut and pasted in Inkscape are pasted as vectors. With the setting on they are pasted as rasterized images (in 0.48). So it's possible that this is also related to bug #307005

Paul Morris (v-paul-p) wrote :

What I meant is that this may still be related to how "the object cut to the clibopard is pasted as rasterized copy." In other words, the problem may still be with the rasterization, since the rasterization doesn't happen when this setting is off.

su_v (suv-lp) wrote :

Attaching diff used for custom build (see comment 6 and 7) for review/comments.

I'm planning to apply the same diff for the 0.91 release build - there will be unpatched packages available for testing (likely via DropBox).

su_v (suv-lp) wrote :

Inkscape 0.91 for OS X was shipped with the patch applied from comment 14 applied - did anyone still experience crashes on paste from clipboard or import of bitmap images with the stable release build?

KaOS-bEat (kasper-jordaens) wrote :

Works great for me! thanks!

Thomas (emai8) wrote :

>did anyone still experience crashes on paste from clipboard

Yes! Inkscape crashed pasting from clipboard.
Version: 0.91 stable
Machine: Windows 8.1, 64bit
Please solve this issue.
Thomas

su_v (suv-lp) wrote :

@Thomas - this report is about crash specific to Mac OS X builds. Crashes on Windows need to be tracked separately (please check for existing reports before filing a new one).

su_v (suv-lp) on 2015-10-15
Changed in inkscape:
milestone: none → 0.92
Tim Sheridan (tghs) on 2017-02-08
Changed in inkscape:
assignee: nobody → Tim Sheridan (tghs)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers