" Metadata for error domain" warning when using File>New

Bug #818628 reported by jazzynico
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
John Smith

Bug Description

When I open a new template with File>New (tested with different templates) or the New icon or Ctrl+N, the console shows the following message:

** (inkscape:5026): WARNING **: Metadata for error domain "inkscape_error" already registered

It doesn't occur when opening an existing document, and is not dependent on the document (new or existing) previously opened. I haven't tested it exhaustively, but it doesn't seem to affect the document or Inkscape's behavior.

Reproduced on Ubuntu 10.10, Inkscape revision 10517.
Not reproduced with 0.48.

Revision history for this message
su_v (suv-lp) wrote :

I only get these messages with a dbus-enabled, optimized (-O3) build on Mac OS X 10.5.8 (i386) - IIRC the dbus-enabled build also sometimes produces other (critical) console warnings when working with multiple windows (within one Inkscape instance), after closing a window.

A normally configured build (without dbus, compiled with '-O0') doesn't produce the warnings.

su_v (suv-lp)
tags: added: dbus
Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
Marcin Floryan (mfloryan) wrote :

Yes. I can confirm I'm running this with dbus compiled in.

Revision history for this message
John Smith (john-smithi) wrote :

This patch moves the function call to dbus_g_error_domain_register from the "desktop init" to the "application init", so it should only get called once per session.
Could a dbus expert check that things are still working correctly ?

Changed in inkscape:
assignee: nobody → John Smith (john-smithi)
status: Confirmed → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Tested on Ubuntu 11.04, Inkscape revision 11661.
Console message fixed, but I haven't tested dbus to confirm there's no regression.

Thanks for the patch!

Revision history for this message
su_v (suv-lp) wrote :

> Could a dbus expert check that things are still working correctly ?

@joakim - I'm subscribing you to this report with the hope that you - as _the_ famous dbus-expert for Inkscape (inkmacs) - would be willing to test&review the proposed patch attached to comment #4… Any feedback would be highly appreciated!

---
I'm not a dbus expert at all - my tests are basically limited to those demonstrated in 'src/extension/dbus/pytester.py'.

With r11659+818628.patch, those things I got working without the patch still work with the patch applied, e.g.:
- creating shapes/objects in the current (initial) desktop
- manipulating a current selection of the current desktop (e.g. duplicate and translate)
- opening a new desktop, and create new shapes in the second document window (desktop)
- connecting to the second document window (desktop) and manipulate a selection there [1]
- …

[ tested on OS X 10.7.4
 - GTK+/X11 2.24.10, glib 2.32.4, dbus-glib 0.100, dbus 1.4.20
 - GTK+/X11 2.24.11, glib 2.33.10, dbus-glib 0.100, dbus 1.4.20 ]

[1] Due to my lack of experience with dbus as well as python, I haven't managed yet to write a python function which queries the dbus interface for a list of available desktops, and then connects to one of them. Currently I'm using d-feet to see the object path of the second desktop opened via dbus to be able to reuse it in the script.

Revision history for this message
John Smith (john-smithi) wrote :

Committed to trunk as r11674.
If there are any issues, please reopen this report.

Changed in inkscape:
status: In Progress → Fix Committed
su_v (suv-lp)
tags: added: dbusapi
removed: dbus
Bryce Harrington (bryce)
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.