Cannot open files with whitespaces/spaces in pathname

Bug #1735453 reported by Max Fuxjäger
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

Steps to reproduce:
> Have yourself some fresh, sparkling Ubuntu Server 17.10 64bit with the default (ubuntu-desktop package) shell.
> Inkscape comes preinstalled as a snap. Currently the 0.92.2 version.
> Choose any file where there is a space character either in the filename or one of its parent folders and open it with Inkscape through Nautilus (right-click, "open with another application", click "Inkscape", click the green "Select")
> Be penetrated with multiple error messages ("Failed to load the requested file PART_OF_ACTUAL_FILEPATH_HERE"), one for each "part" of the path name, splitted by its space characters.
> After clicking ok on each of those, the program presents you with a blank canvas, waiting to be used.
> Feel satisfied (or not. You decide)

I think somebody forgot to do some sort of string escaping regarding file paths? Please patch this and push it to the snap version for Ubuntu! :)

This issue is sort of related to 1630371

Tags: snap
Revision history for this message
Patrick Storz (ede123) wrote :

> Be penetrated with multiple error messages

Could you post them? Error messages are usually emitted for a reason... ;-)

> This issue is sort of related to 1630371

Spaces in file names work fine on Windows (except in --shell mode which bug #1630371 is about).

Revision history for this message
Max Fuxjäger (maxvalue) wrote :
description: updated
Revision history for this message
Max Fuxjäger (maxvalue) wrote :

Replying to @eduard-braun2:

>> Be penetrated with multiple error messages
>Could you post them? Error messages are usually emitted for a reason... ;-)
Sorry, forgot to mention the actual text of the message. I am used to these kind of message from Windoofs, because the standard programs there have this bug frequently. I thought it would be frequent on other platforms too, because, you know, developers.
I edited the description and added a screenshot :)

>> This issue is sort of related to 1630371
>Spaces in file names work fine on Windows (except in --shell mode which bug #1630371 is about).
I breezed through the issues and only found this one. Since it is kind of similar, i thought that i maybe concerns the same place in the code (accessing files/handling file paths in general). Just to help the developer a little finding the bug.

Revision history for this message
Hachmann (marenhachmann) wrote :

Not reproduced on Linux Mint 16.04 with 'normal' installation of Inkscape 0.92.2.

Can you do a

sudo snap remove inkscape
sudo apt-get update
sudo apt-get install inkscape

to find out if it's related to snap or to Inkscape itself?

Revision history for this message
Max Fuxjäger (maxvalue) wrote :
Download full text (4.1 KiB)

Yup, it's definitely related to the snap.

The "normal" apt-get installed version works fine and dandy without errors, but as soon as i uninstall the normal one and reinstall the "snap" one, it throws errors. What i did:

Uninstalled the snap: sudo snap remove inkscape
Update lists: sudo apt-get update
Installed the normal version: sudo apt-get install inkscape
Tried the same use case: success (works flawless, starts up fast, even on first launch)
Uninstalled the normal version: sudo apt-get purge inkscape
Installed the snap: sudo snap install inkscape
Tried the same use case: Inkscape takes a very long time to start (when launching the first time). I thought it maybe crashed in the background and tried to run it from the terminal (running "inkscape"). This produced following output:

Gtk-Message: Failed to load module "canberra-gtk-module"

(inkscape:32029): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/home/max/snap/inkscape/3080/.cache/gdk-pixbuf-loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /home/max/snap/inkscape/3080/.cache/gdk-pixbuf-loaders.cache
to make things work again for the time being.

(inkscape:32029): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied

** (inkscape:32029): WARNING **: Null pixbuf for 0x220f0f0 [/snap/inkscape/3080/lib/share/../../share/inkscape/icons/remove-color.png]

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

** (inkscape:32029): WARNING **: Null pixbuf for 0x23780b0 [/snap/inkscape/3080/lib/share/../../share/inkscape/icons/remove-color.png]

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

** (inkscape:32029): WARNING **: Null pixbuf for 0x2571f60 [/snap/inkscape/3080/lib/share/../../share/inkscape/icons/remove-color.png]

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

** (inkscape:32029): WARNING **: Null pixbuf for 0x2574070 [/snap/inkscape/3080/lib/share/../../share/inkscape/icons/remove-color.png]

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

** (inkscape:32029): WARNING **: Null pixbuf for 0x2571c20 [/snap/inkscape/3080/lib/share/../../share/inkscape/icons/remove-color.png]

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(inkscape:32029): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(inkscape:32029): GdkPixbuf-WARNING **: Error loading XPM image loader: Image type 'xpm' is not supported

(inkscape:320...

Read more...

Revision history for this message
Hachmann (marenhachmann) wrote :

Subscribing Ted Gould to the report... perhaps there's something that can be done?

tags: added: snapd
Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :
tags: added: patch-available
Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

The patch has been merged to the upstream codebase, however, it seems that currently the snaps in the edge channel is outdated and isn't featuring the latest revisions' builds.

Changed in inkscape:
status: New → Fix Committed
Patrick Storz (ede123)
tags: added: snap
removed: patch-available snapd
Revision history for this message
David G. Johnson (n-david-johnson) wrote :

From what I can see, the fix was merged ( https://gitlab.com/inkscape/inkscape/merge_requests/414 ) as mentioned above, but on my Ubuntu 18.04 LTS system with the latest "Stable" version of the Snap installed (0.92.4), this issue still exists.

Can the patch be manually applied? Is it possible I'm missing something and using the wrong version? Thanks!

Revision history for this message
Patrick Storz (ede123) wrote :

The patch has been applied to master branch, not to 0.92.x.

I'll cherry pick it, so it should be available eventually (in 0.92.5 or I think there are also candidate builds of 0.92.x occasionally)

Revision history for this message
Patrick Storz (ede123) wrote :
Max Gaukler (mgmax)
Changed in inkscape:
status: Fix Committed → Fix Released
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.