assertion hit when running inkscape without DISPLAY set

Bug #167857 reported by Bryce Harrington
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Unassigned
inkscape (Debian)
Fix Released
Unknown
inkscape (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Steps to reproduce:

1. ssh into a remote machine that is running X and has
inkscape installed.
2. Try launching inkscape with a file:

  $ inkscape mint.svg

  (inkscape:19059): Gdk-CRITICAL **:
gdk_display_list_devices: assertion `GDK_IS_DISPLAY
(display)' failed

  (inkscape:19059): GLib-GObject-CRITICAL **:
g_object_set_qdata_full: assertion `quark > 0' failed

This situation really should just produce an error
message, such as happens if you run inkscape alone:

  $ inkscape
  Nothing to do!

(That's not the most informative error message in the
world... but it's better than an assert...)

Tags: cli
Revision history for this message
Bug Importer (bug-importer) wrote :

Does it make any difference if you give inkscape the -z option?

Revision history for this message
Jon A. Cruz (jon-joncruz) wrote :

-z doesn't make a difference.

Also this behavior can be seen while running locally. Just
unset the DISPLAY environment variable in the shell before
launching inkscape from that command-line.

vonHalenbach (lustik)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
LapTop006 (laptop006) wrote :

This message also appears when you do manage to use -z so it really should be silenced.

Revision history for this message
Bryce Harrington (bryce) wrote :

Still occurs on 0.46 on Hardy.

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
htgoebel (htgoebel) wrote :

This error also occurs when using inkscape for file-export, even with -z:

$inkscape -z -f web-server.svg --export-plain-svg=plain-svg/web-server.svg

(inkscape:19819): Gdk-CRITICAL **: gdk_display_list_devices: assertion `GDK_IS_DISPLAY (display)' failed

Depending on the console width, this looks like "failed".

Revision history for this message
bbyak (buliabyak) wrote :

in rev 18875 i may have fixed this, please test and report

Revision history for this message
Bryce Harrington (bryce) wrote :

A pre-release of the upcoming Inkscape 0.47 is now available in Ubuntu
Karmic for testing. Because *so* much stuff has changed compared with
the version you reported your bug against, would you mind re-testing
this new version and see if this bug is now resolved?

Karmic Alpha CD ISO images are available at:

  http://cdimage.ubuntu.com/releases/karmic/

If you're not testing Karmic yet, there are .debs of this new Inkscape
for Jaunty, Hardy, and Intrepid here:

  https://launchpad.net/~inkscape.testers/+archive/ppa

You might find further bugs when testing this alpha release. If that is
the case, please file a NEW bug report here:

   https://edge.launchpad.net/inkscape/+filebug

Thanks ahead of time for your testing efforts, and enjoy the new Inkscape!

Changed in inkscape (Ubuntu):
status: Confirmed → New
status: New → Incomplete
Revision history for this message
Yeti (yeti) wrote :

Still observing this with inkscape-0.47pre1. The fix is attached -- tested on X11, no idea what implications inkscape->use_gui has on non-unix systems but the assertion that we should not run GDK functions when it's false seems generally correct.

Revision history for this message
bbyak (buliabyak) wrote :

David: looks like you made preferences loading dependent on gui mode, but this is wrong: we need preferences when running in commandline mode too.

Revision history for this message
Yeti (yeti) wrote :

No, the patch does no such thing. Please look at what function sp_input_load_from_preferences() really does.

Preferences are loaded the first something needs them, i.e. the first time Inkscape::Preferences::get() is called. So, if something needs them they will be loaded in due time.

Beside obtaining the preferences pointer, sp_input_load_from_preferences() does nothing at all in non-GUI mode.

Revision history for this message
Yeti (yeti) wrote :

> looks like you made preferences loading dependent on gui mode

I wonder what makes it look so to you.

The code clearly says otherwise.

Or did you try it and found that preferences are not loaded? I did and the preferences are loaded. Changing the plain SVG indentation amount to a non-default value and doing --export-plain-svg (one of the few cases I was able to find when preferences influence non-GUI use) with and without GUI worked equally well.

Revision history for this message
bbyak (buliabyak) wrote :

you're right, sorry for confusion. menu loading is also not needed without gui, so i put it into the same if. committed in 22130

Changed in inkscape:
status: Confirmed → Fix Released
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

I can confirm this bug in karmic alpha 4.

* Connect to remote ssh server: ssh -XC <user>@<server>
* Attempt to open file:

$ inkscape image.svg

(inkscape:30163): Gdk-CRITICAL **: gdk_display_list_devices: assertion `GDK_IS_DISPLAY (display)' failed

* Attempt to open file using -z option:

$ inkscape -z image.svg

(inkscape:30163): Gdk-CRITICAL **: gdk_display_list_devices: assertion `GDK_IS_DISPLAY (display)' failed

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

$ apt-cache policy inkscape
inkscape:
  Installed: 0.47~pre1-0ubuntu1
  Candidate: 0.47~pre1-0ubuntu1
  Version table:
 *** 0.47~pre1-0ubuntu1 0
        500 http://gb.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Changed in inkscape (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Fixed in karmic beta

inkscape:
  Installed: 0.47~pre4-0ubuntu1
  Candidate: 0.47~pre4-0ubuntu1
  Version table:
 *** 0.47~pre4-0ubuntu1 0
        500 http://gb.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Changed in inkscape (Ubuntu):
status: Confirmed → Fix Released
Changed in inkscape (Debian):
status: Unknown → Fix Released
su_v (suv-lp)
tags: added: cli
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.