Segmentation Fault by starting Inkscape 0.92.2 from command line

Bug #1715339 reported by Inkescaper on 2017-09-06
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Eduard Braun

Bug Description

After having installed Inkscape 0.92.2 from Windows:
    - 32bits
 or - 64bits

Inkscape is crashing directly when starting from command line either from Windows CMD
or from minty terminal (Cygwin distribution)

Segmentation fault message is directly reported (32bits or 64bits release) by typing:
inkscape.exe --version

Eduard Braun (eduard-braun2) wrote :

We recently had a few issues that were caused by old files remaining from a previous installation.

Could you therefore check if the issue can be solved by:
- completely uninstalling Inkscape
- deleting the program folder
  ("C:\Program Files (x86)" or "C:\Program Files" respectively)
- installing Inkscape again

Alternatively you could check if Inkscape works if you download the .7z archive, extract it into an empty folder and run from there.

Eduard Braun (eduard-braun2) wrote :

Just to prevent bad things from happening as what I wrote above was a bit unclear:
You should obviously delete the Inkscape folder from "C:\Program Files (x86)" or "C:\Program Files", (not those folders themselves)

Inkescaper (stephane-lecolier) wrote :

in order to help you to reproduce the issue,
Inkscape has been installed from path below:

C:\Tools\Graphics\Inkscape

Inkescaper (stephane-lecolier) wrote :

Terminal used with x64 release is: Mintty 2.7.5 (x86_64-pc-cygwin)

Cygwin 2.8.0 (x86_64)

Inkscape release used is not delivered as Cygwin package.

I just have install it manually after download from Inkscape.org site

Eduard Braun (eduard-braun2) wrote :

Well, as long as you installed into an empty directory it should not matter, but please confirm this is/was the case!

As a next step you could execute "set" on a Windows command prompt (cmd.exe) and post the output here.
Previously we had crash issues on startup due to the environment variable "FONTCONFIG_FILE" being set to an invalid value.

Inkescaper (stephane-lecolier) wrote :

Yes, I have performed an installation from a new directory.

I am not using env var FONTCONFIG_FILE

Here dump of environment variable:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\lecolier\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=GNB402617
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\lecolier
LDMS_LOCAL_DIR=C:\Program Files (x86)\LANDesk\LDClient\Data
LOCALAPPDATA=C:\Users\lecolier\AppData\Local
LOGONSERVER=\\GNBDC03
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Adobe\Adobe PDF iFilter 9 for 64-bit platforms\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\WebEx\Productivity Tools;c:\Program Files\Saxonica\SaxonHE9.4N\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 23 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=170a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\lecolier\AppData\Local\Temp
TMP=C:\Users\lecolier\AppData\Local\Temp
USERDNSDOMAIN=ST.COM
USERDOMAIN=ST
USERNAME=lecolier
USERPROFILE=C:\Users\lecolier
windir=C:\Windows

I have remark that you have change for example organization of python libraries.

In case, Python 2.7 environment is already available, is it possible to configure Inkscape in order to reuse it or not? In this case, there are some restrictions about library dependencies?

Please note that I had no issue with previous release (0.92.1).

Eduard Braun (eduard-braun2) wrote :

OK, nothing immediately suspicious there...

Could you try to
- launch a command prompt (cmd.exe)
- navigate to Inkscape folder
- execute (without quotes)
  "set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem"
- execute "inkscape.com"
and see if it works / outputs anything on the console?

Also: What's your OS? (You never mentioned if I didn't overlook it)

Inkescaper (stephane-lecolier) wrote :

OS used is: Microsoft Version [Version 6.1.7601]

From command prompt, I am able to start Inkscape (GUI mode) but nothing happens when I use:
inkscape.com --version -> nothing
inkscape.com --help -> OK
inkscape.exe --help -> nothing
inkscape.com -f "toto.jpg" -> OK

From Mintty prompt (2.7.5 - Cygwin 2.8.0), it is more verbose, as some warnings are highlighted:

FontLister::get_best_style_match(): can't find family: Sans

inkscape.exe --version -> Segmentation fault (ISSUE)
inkscape.exe -f "toto.jpg" -> Segmentation fault (ISSUE)

inkscape.exe --help -> OK
inkscape.exe -> OK (GUI started)

Issue is that it is not possible to launch Inskcape in batch mode from Mintty.
What could be the root cause?

Eduard Braun (eduard-braun2) wrote :

Ugh, so to clarify: It *does not* SEGFAULT when running from cmd.exe?

Please be clear with your bug descriptions (it suggests Inkscape is always crashing for you, also when run from cmd.exe), otherwise it's just a big waste of time for everybody. Debugging an issue when given wrong facts is just impossible...

Regarding command line usage from cmd.exe:
- inkscape.exe will never output anything, which is a Windows
  limitations and the reason why we have inkscape.com
- inkscape.com output is currently known to be broken on Windows 7,
  see bug #1714278, and has jet to be investigated fully.

Regarding command line usage from Cygwin Mintty prompt:
- Inkscape 0.92.2 is built using MSYS2. As MSYS2 is Cygwin-based it's likely there is some command line magic going on to achieve proper output despite the Windows limitations. It's possible MSYS2's implementation is incompatible to vanilla Cygwin which could cause the crashes you're seeing. If you really need to run Inkscape in Mintty (and don't want to use the MSYS2 one) I suggest you get in contact with upstream and ask them if any incompatibilities are already known (and if yes, if there's a possible fix).

Inkescaper (stephane-lecolier) wrote :

Hi,

It is exactly what I am trying to do: clarify my report.

After some investigations, it happears that Inkscape is able to work in some cases (already reported above) but not from the command line.

As soon as Inkscape 0.92.2 will be available as Cygwin package, I will perform some trials in order to check if it is working from command line and solve my issues.

I will rebase my trials also from ONLY Inkscape.com to see what can be done.

What is strange is that it was working fine with the previous revision (0.92.1).

Thanks in advance,

Eduard Braun (eduard-braun2) wrote :

It's likely your issue will be fixed by an updated version of Aspell (see bug #1714278 for details).

If you want to test the patched build it should be sufficient to replace "libaspell-15.dll" in your Inkscape installation directory with the one found in the /bin folder of [1] or [2] (for 32-bit or 64-bit respectively).

P.S. The issue was present in 64-bit builds of Inkscape for quite some time now. Maybe you were using 32-bit builds before?

[1] https://ci.appveyor.com/api/buildjobs/e05lqcmli3lksrgf/artifacts/artifacts%2Fmingw-w64-i686-aspell-0.60.7.rc1-1-any.pkg.tar.xz
[2] https://ci.appveyor.com/api/buildjobs/99bvq727morr5dcj/artifacts/artifacts%2Fmingw-w64-x86_64-aspell-0.60.7.rc1-1-any.pkg.tar.xz

Inkescaper (stephane-lecolier) wrote :

Thanks for your feedback.

From my side, I have run some tests by reusing Inkscape.com (and not Inkscape.exe).

I can confirm by this way that all batch commands are working correctly.

So no more issue from this side.

Thanks for all of your efforts.

Inkescaper (stephane-lecolier) wrote :

Maybe you should package "libaspell-15.dll" in a new delivery (0.92.2.1?) to share it for everyone.

 It is strange as I am sure to have already use 64bits version of Inkscape 0.92.1 by the pas without any issue.

 By the way, I confirm that new DLL is fixing the issue.

 I got now inkscape --version => 0.92.2 (5c3e80d, 2017-08-06)

 Thanks for your support.

Changed in inkscape:
status: New → Fix Released
Eduard Braun (eduard-braun2) wrote :

Yes I thought about releasing a new revision, too, but we obviously can't release a new version for every fix we apply.

In this specific case the crashing issue does usually not affect user at all (although I admit it's ugly) and the fact that it was present in 64-bit builds since at least Inkscape 0.91 (consistently reproduced when running in gdb) but went mostly unnoticed speaks for itself.

The way this bug manifests now apparently changed a bit in 0.92.2 since we built that release with MSYS2 (e.g. you noticing crashes in mintty) with the most obvious difference being the missing command line output on Windows 7 which might also be the main reason for me to consider a new revision since it complicates debugging a lot (although it wen mostly unnoticed, too, so far... command line usage of Inkscape apparently is a rare usage scenario).

Changed in inkscape:
status: Fix Released → Fix Committed
milestone: none → 0.92.3
assignee: nobody → Eduard Braun (eduard-braun2)
importance: Undecided → Medium
Bryce Harrington (bryce) on 2018-05-12
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers