Drag and Drop from VSS failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Inkscape |
Medium
|
Patrick Storz | ||
| 0.92.x |
Medium
|
Patrick Storz |
Bug Description
I'm trying to use some VSS files (Symbol library) coming from Visio with Inkscape.
For some VSS files, it works (Symbols are usable). For some other VSS files, symbols are not viewable by Object > Symbols even if they are located in the appropriate folder: Inkscape > Share > Symbols.
How to check VSS is then compliant with Inkscape (v0.92)?
Thanks in advance,
=====
Inkscape 0.92.0 r15299 (64-bit)
OS : Windows 7
Alvin Penner (apenner) wrote : | #1 |
Alvin Penner (apenner) wrote : | #2 |
also, if you have a .vss file that appears to be working, could you attach that as well?
su_v (suv-lp) wrote : | #3 |
Please add information about OS/platform to the bug description, thank you.
As mentioned by Alvin, test cases (VSS files) are required to allow further investigation of the reported issue.
Changed in inkscape: | |
status: | New → Incomplete |
Inkescaper (stephane-lecolier) wrote : | #4 |
Hi,
Please find asked data:
Inkscape 0.92.0 r15299 (64-bit)
OS : Windows 7
and typical VSS used for which it is not possible to import Symbols:
Aerial&audio.vss : not working
logicgates.vss : working
Inkescaper (stephane-lecolier) wrote : | #5 |
with working VSS attached.
Thanks to help me to understand what has to be done.
Changed in inkscape: | |
status: | Incomplete → New |
description: | updated |
su_v (suv-lp) wrote : | #6 |
Try renaming 'Aerial&audio.vss', for example to 'Aerial_audio.vss'. Does that work for you?
su_v (suv-lp) wrote : | #7 |
Reproduced on OS X 10.7.5 with Inkscape 0.91 r13725, 0.92.0 r15299, lp:inkscape/0.92.x r15365.
Changed in inkscape: | |
status: | New → Confirmed |
tags: | added: symbols ui |
Patrick Storz (ede123) wrote : | #8 |
Seems like a filename encoding issue as su_v suspected.
On Windows this issue seems to be two-fold:
_______
PART 1:
Same as bug #1656763. I guess only Windows is affected as we use "g_dir_read_name()" to get the available symbol files which should return the filename in the proper file system encoding on Unix.
On Windows this leads to errors like
E:\Temp\
for a file named "ä.vss" (i.e. the file was probably not even found on disk...)
I have fixed this part locally by applying the fix from the linked bug. However it still fails:
_______
PART2:
Even if the file is properly loaded there seems to be yet another issue (or even other issues) as I'm getting the following error even after the fix:
Entity: line 10: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xC3 0x5F 0x30 0x22
<symbol id="Ã_0">
^
I guess Inkscape is using the file name internally to generate IDs which fails if the file name is not UTF8 or might always fail if it's not valid XML (I'm still looking into that, though, so I'm not completely sure about that yet).
_______
su_v: I guess on OS X you're only getting the bug in PART 2? Could you indicate the error output on the console (if any)?
su_v (suv-lp) wrote : | #9 |
> su_v: I guess on OS X you're only getting the bug in PART 2?
Console messages from Inkscape with lp:inkscape/0.92.x r15365:
Entity: line 8: parser error : EntityRef: expecting ';'
<title>
/Users/
??ࡱ?
^
File info:
$ file "/Users/
/Users/
su_v (suv-lp) wrote : | #10 |
su_v wrote:
> Console messages from Inkscape with lp:inkscape/0.92.x r15365 (...)
JFTR - if I rename the file as described in comment 6, the symbol library is parsed ok, listed in the 'Symbols' dialog as 'Aerial_audio.vss', with 6 symbols which all can be inserted into the document as expected.
Patrick Storz (ede123) wrote : | #11 |
OK, seems you're hitting yet another error (invalid characters in "title" attribute - I avoided that by not using the ampersand "&" in my test file) plus PART1.
I should be able to fix all of them.
However could you check if OS X is affected by bug #1656763 / bug #1416949 (they're basically the same issue)? I got the impression this was a Windows-only issue due to the win32/win64 tags but I think nobody ever confirmed that it didn't happen on other OSs.
su_v (suv-lp) wrote : | #12 |
Eduard Braun wrote:
> However could you check if OS X is affected by bug #1656763 / bug #1416949
Test case:
1416949-
1416949-
Both files open as expected (OS X builds are not affected by bug #1656763 / bug #1416949).
Patrick Storz (ede123) wrote : | #13 |
The attached patch fixes
- the original issue spotted in this bug (ampersand "&" in the filename which was resulting in an invalid title of the internally generated SVG document holding the symbols). The title is now properly escaped.
- the issue with non-ANSI filenames on Windows (i.e. German umlauts / Cyrillic characters). I applied the same fix as in bug #1416949.
- a third issue caused by invalid symbol IDs. Before it was possible to create IDs that were invalid XML (preventing to load the symbol file to start with) but it was also possible to create IDs that were accepted by the parser while resulting in invalid hrefs when actually using a symbol (therefore loading the symbols succeeded but as when attempting to add them to the document they were not visible due to the invalid href). With the patch all characters that do not match [a-zA-Z0-9_-] are replaced with an underscore "_") which should result in valid IDs in almost all cases.
@su_v: could you check whether this fixes the issue on OS X? If not we have to investigate further...
Changed in inkscape: | |
assignee: | nobody → Eduard Braun (eduard-braun2) |
su_v (suv-lp) wrote : | #14 |
Patch tested successfully with lp:inkscape/0.92.x r15365 using the two VSS files attached to this report: both sets are listed in the Symbols dialog, symbols from both sets can be inserted into the current document, and display as expected after saving and reloading the file.
Patrick Storz (ede123) wrote : | #15 |
Commited in r15501
http://
I suggest to also back-port for 0.92.2.
Changed in inkscape: | |
status: | Confirmed → Fix Committed |
Changed in inkscape: | |
importance: | Undecided → Medium |
milestone: | none → 0.93 |
su_v (suv-lp) wrote : | #16 |
lp:inkscape r15501 fails to compile on Ubuntu 14.04.5 LTS, see attached build log.
Patrick Storz (ede123) wrote : | #17 |
Was already fixed in r15502 (I wonder why we could compile it in some environments but not in others...)
Patrick Storz (ede123) wrote : | #18 |
Fix committed for 0.92.x branch in r15375
http://
Inkescaper (stephane-lecolier) wrote : | #19 |
Ok.
Thanks a lot for your support.
Stephane
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
could you attach the .vss file that is leading to the failure?