gnucash dies when generating reports in i3, works in GNOME

  • Open
  • quality assurance status badge
Details
3 participants
  • Adam Van Ymeren
  • Chris Marusich
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Adam Van Ymeren
Severity
normal

Debbugs page

A
A
Adam Van Ymeren wrote on 14 Sep 2017 11:58
(address . bug-guix@gnu.org)
87bmmdyunp.fsf@vany.ca
Here's a bug report I've been sitting on for a while. I've been meaning
to dig in to it further but haven't had the time so I figured I should
at least post it in case anyone else has experienced this or knows a fix.

Generating reports in gnucash cause it to die when running in the
default i3 session.

If I run in the default GNOME session it works fine.

I believe the problem is related to not having a running GSettings
daemon.

Below is a shortened backtrace from the gnucash process as it died
trying to generate a balance sheet.

As you can see it dies somewhere in GIO related to settings (#3
g_settings_set_property).

#0 0x00007f71fb64cb21 in _g_log_abort ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libglib-2.0.so.0
#1 0x00007f71fb64dd75 in g_logv ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libglib-2.0.so.0
#2 0x00007f71fb64dec2 in g_log ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libglib-2.0.so.0
#3 0x00007f71fc0c813f in g_settings_set_property ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgio-2.0.so.0
#4 0x00007f71fb925e63 in g_object_new_internal ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#5 0x00007f71fb927865 in g_object_new_valist ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#6 0x00007f71fb927bb4 in g_object_new ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#7 0x00007f7189df7536 in g_proxy_resolver_gnome_init ()
from /home/adam/.guix-profile/lib/gio/modules/libgiognomeproxy.so
#8 0x00007f71fb9432a9 in g_type_create_instance ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#9 0x00007f71fb925aeb in g_object_new_internal ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#10 0x00007f71fb9272e1 in g_object_newv ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#11 0x00007f71fb927bcc in g_object_new ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#12 0x00007f71fc028771 in try_implementation ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgio-2.0.so.0
#13 0x00007f71fc0288f0 in _g_io_module_get_default ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgio-2.0.so.0
#14 0x00007f71f2099615 in soup_proxy_resolver_default_constructed ()
from /gnu/store/c4ivrb2xrmr8am2dy05cm6ydc870vwm0-libsoup-2.58.2/lib/libsoup-2.4.so.1
#15 0x00007f71fb926057 in g_object_new_internal ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#16 0x00007f71fb9272e1 in g_object_newv ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#17 0x00007f71fb927bcc in g_object_new ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#18 0x00007f71f20a307c in soup_session_add_feature_by_type ()
from /gnu/store/c4ivrb2xrmr8am2dy05cm6ydc870vwm0-libsoup-2.58.2/lib/libsoup-2.4.so.1
#19 0x00007f71f20a3b1b in soup_session_set_property ()
from /gnu/store/c4ivrb2xrmr8am2dy05cm6ydc870vwm0-libsoup-2.58.2/lib/libsoup-2.4.so.1
#20 0x00007f71fb927f68 in g_object_set_valist ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#21 0x00007f71fb9285ef in g_object_set ()
from /gnu/store/9x9229j1sramg64qppmn87m2vy2jq4im-glib-2.52.2/lib/libgobject-2.0.so.0
#22 0x00007f71f35f9637 in WebCore::SoupNetworkSession::SoupNetworkSession(_SoupCookieJar*) ()
from /gnu/store/3ph6sjm0513972v3220s0a8i8xprmlcq-webkitgtk-gtk2-2.4.11/lib/libwebkitgtk-1.0.so.0
<snip>
M
M
Maxim Cournoyer wrote on 19 Sep 2017 17:40
(name . Adam Van Ymeren)(address . adam@vany.ca)(address . 28462@debbugs.gnu.org)
87377idwx8.fsf@gmail.com
Hello Adam,

Adam Van Ymeren <adam@vany.ca> writes:

Toggle quote (12 lines)
> Here's a bug report I've been sitting on for a while. I've been meaning
> to dig in to it further but haven't had the time so I figured I should
> at least post it in case anyone else has experienced this or knows a fix.
>
> Generating reports in gnucash cause it to die when running in the
> default i3 session.
>
> If I run in the default GNOME session it works fine.
>
> I believe the problem is related to not having a running GSettings
> daemon.

As a ratpoison user, I also suffered from problems caused by the lack of
a GSettings backend when not running Gnome; for example, the preferences
would not be saved across GnuCash restarts.

To fix this, I had to manually install dbus and dconf to my profile. The
attached patch automates this by automatically propagating those
dependencies when GnuCash is installed. It would be nicer to make dbus
and dconf work as regular inputs but this would require patching the
sources; I haven't investigated if how feasible this would be.

Could you try the patch and see if it fixes your issues?
From 3d6f3da4e8a216ed435777f0a038fc90911503a7 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 20 Feb 2017 18:29:28 -0800
Subject: [PATCH] gnu: gnucash: Propagate dbus and dconf.

This ensures that a GSettings backend is present; this is necessary to persist
the GnuCash settings and state.

* gnu/packages/gnucash.scm (gnucash)[propagated-inputs]: Add dbus and dconf.
[phases]: Define HOME, which prevents multiple warnings at build time.
---
gnu/packages/gnucash.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index ac2dce576..c421df80d 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -70,12 +70,19 @@
`(("glib" ,glib "bin") ; glib-compile-schemas, etc.
("intltool" ,intltool)
("pkg-config" ,pkg-config)))
+ (propagated-inputs
+ `(("dbus" ,dbus) ;enable gsettings preference backend
+ ("dconf" ,dconf))) ;likewise
(arguments
`(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
#:configure-flags '("--disable-dbi"
"--enable-aqbanking")
#:phases
(modify-phases %standard-phases
+ ;; Avoid build time warnings by setting $HOME.
+ (add-before 'build 'set-home
+ (lambda _
+ (setenv "HOME" (getenv "TMPDIR"))))
(add-after
'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
--
2.14.1
C
C
Chris Marusich wrote on 8 Jun 2018 21:30
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87fu1weg4f.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (6 lines)
> As a ratpoison user, I also suffered from problems caused by the lack of
> a GSettings backend when not running Gnome; for example, the preferences
> would not be saved across GnuCash restarts.
>
> To fix this, I had to manually install dbus and dconf to my profile.

FYI, we have a dbus-service (maybe it didn't exist when this bug report
was created). Please see "(guix) Desktop Services" in the Guix manual.
If you set it up, does it help, or is there more work to be done to fix
this problem when running Gnucash outside of GNOME?

Note also that Gnucash has been updated since this bug report was
originally opened. In particular, on the current core-updates branch,
we have upgraded Gnucash to 3.0. You might consider trying that
version. However, please be careful and make backups before doing so,
since there are backwards-incompatible changes going from Gnucash 2 to
3. For details on the changes, see the Gnucash News posts here:


--
Chris
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlsbV+AACgkQ3UCaFdgi
Rp2lJw/+Kvk9NrW572jcLU1DHHWn6dQ+HkORXoY3Dm/jvfLKr6uXgLd747Dogz5t
yhaOtnvtIpMADmbw3pEtPcZXARzTsagdC7+IvI+oxnKqSOhkck5TnEfm7ElBf0Np
ZDQIP4D72h9cpN8sorTvKuN+A7w7e0lh68/cq/cUzNEjTkagul46Uc3CB8lJeLX4
9Zpw+xfdoZV1c8PsF9CXGB8AJJD0d/q4maqPKc5liqrg5BNyVx+rWLGvoMbHETby
DITGCVQfgPgyBx6KzaJpNp1+mqgSSWOjEovX5aOB481ub37z9ZJUfz8H5pk3wE6F
D3uOgh6AP6JGXqODr2ofeF0jJUaAo3Ay96WSuF4tNaZGWCOiCQJALEfJHx5TkrEp
BIfqmUEselMXfE57F3Qb8QVWRHUadOQYcC87chK9Swq4wTPpmhuJT9EddKpF+39R
T65f5MgID0yi/W6/f8i+8MVD5Knd+8NVuWIRfOFqUc73kdKvLs5JDUp0fzvrzuLo
Y4onOSzaDgN+/WJWGQcpMI34XqTh52ueXttba+y/qv5nOyGbA32ykQhP8uyDTinl
sCmDo/Sl7Gnw9WmG8Db0LisRTCPt91UFrIr5rhsTU2DV4vddDh4YMUiaL47Ad3cn
VaBo5N27Cera6uFtz+X4VJR2REVIzNIQamECj2JsecbxwvpkkQE=
=hvm5
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 28462@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 28462
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch