NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.53k stars 13.01k forks source link

`scribus --version` crashes #225751

Open schlichtanders opened 1 year ago

schlichtanders commented 1 year ago

Describe the bug

Hi there, I would like to use Inkscape Scribus CMYK export support, however this seems to fail because of scribus --version crashing

Steps To Reproduce

Steps to reproduce the behavior:

  1. install scribus (version 1.5.8)
  2. run scribus --version

Expected behavior

I would expect that scribus --version has a return code of 0 and does not show any crash message

Screenshots

Instead it gives the following ouptut

Scribus, Open Source Desktop Publishing
---------------------------------------
Homepage:       http://www.scribus.net
Documentation:  http://docs.scribus.net
Wiki:           http://wiki.scribus.net
Issues:         http://bugs.scribus.net

Scribus Version 1.5.8
Scribus Crash
-------------
Scribus crashes due to Signal #11

and a return code of 255

Additional context

The entire error in inkscape is the following

Traceback (most recent call last):
  File "/nix/store/5knfjfdf28xma1z12z45mn7k31jy08g2-inkscape-1.2.1/share/inkscape/extensions/scribus_export_pdf.py", line 199, in <module>
    Scribus().run()
  File "/nix/store/5knfjfdf28xma1z12z45mn7k31jy08g2-inkscape-1.2.1/share/inkscape/extensions/inkex/base.py", line 231, in run
    self.save_raw(self.effect())
  File "/nix/store/5knfjfdf28xma1z12z45mn7k31jy08g2-inkscape-1.2.1/share/inkscape/extensions/inkex/base.py", line 277, in save_raw
    self.save(self.options.output)
  File "/nix/store/5knfjfdf28xma1z12z45mn7k31jy08g2-inkscape-1.2.1/share/inkscape/extensions/scribus_export_pdf.py", line 148, in save
    scribus_version = call(SCRIBUS_EXE, "-g", "--version")
  File "/nix/store/5knfjfdf28xma1z12z45mn7k31jy08g2-inkscape-1.2.1/share/inkscape/extensions/inkex/command.py", line 259, in call
    stdout = _call(program, *args, **kwargs)
  File "/nix/store/5knfjfdf28xma1z12z45mn7k31jy08g2-inkscape-1.2.1/share/inkscape/extensions/inkex/command.py", line 238, in _call
    raise ProgramRunError(program, process.returncode, stderr, stdout, args)
inkex.command.ProgramRunError: Return Code: 255: b'\nScribus, Open Source Desktop Publishing\n---------------------------------------\nHomepage:       http://www.scribus.net\nDocumentation:  http://docs.scribus.net\nWiki:           http://wiki.scribus.net\nIssues:         http://bugs.scribus.net\n\n'
b'Scribus Version 1.5.8\nScribus Crash\n-------------\nScribus crashes due to Signal #11\n'
args: ("Return Code: 255: b'\\nScribus, Open Source Desktop Publishing\\n---------------------------------------\\nHomepage:       http://www.scribus.net\\nDocumentation:  http://docs.scribus.net\\nWiki:           http://wiki.scribus.net\\nIssues:         http://bugs.scribus.net\\n\\n'\nb'Scribus Version 1.5.8\\nScribus Crash\\n-------------\\nScribus crashes due to Signal #11\\n'\nargs: ('scribus', 255, b'\\nScribus, Open Source Desktop Publishing\\n---------------------------------------\\nHomepage:       http://www.scribus.net\\nDocumentation:  http://docs.scribus.net\\nWiki:           http://wiki.scribus.net\\nIssues:         http://bugs.scribus.net\\n\\n', b'Scribus Version 1.5.8\\nScribus Crash\\n-------------\\nScribus crashes due to Signal #11\\n', ['/run/current-system/sw/bin/scribus', '-g', '--version'])",)

Notify maintainers

@erictapen @Kiwi

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.9, NixOS, 22.11 (Raccoon), 22.11.2275.8e8240194ed`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.1`
 - channels(root): `"nixos-22.11, nixos-unstable"`
 - channels(ssahm): `"nixos-21.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
erictapen commented 1 year ago

I can't reproduce this error, but in an unexpected way. It seems to depend on the display manager/environment. On Sway (Wayland) the command exits fine. On a new TTY without any graphical interface, the command coredumps even sooner than in your example.

It looks like tricking Scribus might work? Running DISPLAY=:0 scribus --version on my TTY shell worked out fine. Could you try wether that hack works for you too?

Any fix that is more elaborate than this should probably be addressed upstream.

schlichtanders commented 1 year ago

Thank you very much for taking a look into this issue.

Indeed, running DISPLAY=:0 scribus --version in TTY shell works for me too, while running it inside Konsole (KDE) on my desktop fails like above. I can also confirm that running scribus --version inside TTY shell crashes even further.

For my goal it would be great to have something which makes scribus --version work on the normal desktop (KDE Plasma for my case), so that I can make it work inside inkscape

erictapen commented 1 year ago

Mh, that's bad. Unfortunately I'm out of ideas here, but I suppose that some combination of env variables should trick Scribus?

Hacks aside this looks like a Scribus bug to me tbh, Scribus should handle being run headless.

schlichtanders commented 1 year ago

Do you know where to raise this issue at scribus?

Googling was not successful, so my personal best guess is that it is a special combination of configurations which triggers this issue.

erictapen commented 1 year ago

Yes, at their very old fashioned bug tracker.

luzpaz commented 7 months ago

Any progress here ?