Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inkscape crashes when copy-pasting anything. #7

Open
aspizu opened this issue Sep 30, 2023 · 7 comments
Open

Inkscape crashes when copy-pasting anything. #7

aspizu opened this issue Sep 30, 2023 · 7 comments

Comments

@aspizu
Copy link

aspizu commented Sep 30, 2023

with the error

Error writing selection data: Error writing to file descriptor: Broken pipe
@Linus789
Copy link
Owner

I haven't been able to reproduce this issue, perhaps it has been fixed?

@liaminventions
Copy link

liaminventions commented Jan 2, 2024

This is happening to me as well, Nothing coredumped though...

wl-clip-persist log:

> wl-clip-persist --clipboard both

[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: text/html
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/hpgl
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: application/pdf
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: text/x-tex
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: application/x-xcf
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: application/tar
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/x-e-postscript
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/svg+xml-compressed
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/x-wmf
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/sif
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/x-inkscape-svg
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/x-postscript
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: application/x-zip
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/jpeg
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from fi
le descriptor
    Ignoring mime type: text/xml+xaml
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/png
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/webp
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/x-inkscape-svg-compressed
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/dxf
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/x-emf
[2024-01-02T15:50:35.463Z WARN  wl-clip-persist Seat 4] Timed out reading from file descriptor
    Ignoring mime type: image/tiff

inkscape log:

> inkscape

(org.inkscape.Inkscape:3801): Gtk-WARNING **: 10:50:26.774: Creating a portal monitor failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Inhibit” on object at path /org/freedesktop/portal/desktop
Deflater:total:0
Deflater:total:0
Deflater:total:0
Deflater:total:0

(org.inkscape.Inkscape:3801): Gdk-WARNING **: 10:50:35.662: Error writing selection data: Error writing to file descriptor: Broken pipe

(org.inkscape.Inkscape:3801): Gdk-WARNING **: 10:50:35.664: Error writing selection data: Error writing to file descriptor: Broken pipe

(org.inkscape.Inkscape:3801): Gdk-WARNING **: 10:50:35.665: Error writing selection data: Error writing to file descriptor: Broken pipe

@Linus789
Copy link
Owner

Linus789 commented Jan 2, 2024

Hm, okay. I think this is an issue that should be opened on their side. I think it should be possible to work around the issue for now by using wl-clip-persist --clipboard regular --all-mime-type-regex '(?i)^(?!image/x-inkscape-svg).+'.

@liaminventions
Copy link

Hm, okay. I think this is an issue that should be opened on their side. I think it should be possible to work around the issue for now by using wl-clip-persist --clipboard regular --all-mime-type-regex '(?i)^(?!image/x-inkscape-svg).+'.

thanks! that worked!

@Linus789
Copy link
Owner

Linus789 commented Jan 2, 2024

Nice to hear :)

@boredland
Copy link

Did someone create an upstream issue with inkscape for this? Sadly I don't feel confident that I understood what is happening here...

boredland added a commit to manjaro-sway/desktop-settings that referenced this issue May 31, 2024
@Linus789
Copy link
Owner

Did someone create an upstream issue with inkscape for this?

I did not and I'm not aware of anyone else creating an upstream bug.

Sadly I don't feel confident that I understood what is happening here...

The log message

Error writing selection data: Error writing to file descriptor: Broken pipe

indicates, that while they are still trying to write the clipboard to the file descriptor, we have already closed the file descriptor resulting in a broken pipe for them.

I don't know however, if this log message is related to the crash. Another possibility would be that Inkscape isn't very good at handling the flood of mime types requests.

Why do we close the file descriptor prematurely?

  • For older wl-clip-persist versions: when the read timeout occurs
  • For newer ones: when there is a newer clipboard offer

We don't want to hold onto the file descriptor indefinitely, and expect other programs to handle closed file descriptors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants