Opened 11 years ago

Closed 11 years ago

#16755 closed defect (fixed)

gnucash-2.2.7_2 preferences cannot be accessed/modified: possibly related to orbit2-2.14.16_0, gconf-2.24.0_0 or dbus-1.2.3_0?

Reported by: hypocrite@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: gnucash orbit2 gconf dbus orbit dbus-glib Cc: vinc17@…, dbevans (David B. Evans), mp@…, mf2k (Frank Schima), macports@…, jonas.baehr@…, illogic-al@…, meowsqueak@…, danstadler@…
Port: gnucash orbit2 gconf dbus

Description

Ran port updates (PPC): gnucash from 2.2.5_0 to 2.2.7_1; gconf from 2.22.0_0 to 2.24.0_0; orbit2 from 2.14.12_0 to 2.14.16_0; dbus from 1.1.20_1 to 1.2.3_0.

Got the following errors, confirmed by two other users; was told it was probably a ORBit/GConf problem, or possibly dbus.

Two error windows every time gnucash is launched. One says: "The configuration data used to specify default values for GnuCash cannot be found in the default system locations. Without this data GnuCash will still operate properly but it may require some extra time to setup. Do you wish to setup the configuration data?"

The other says: "An error occurred while loading or saving configuration information for gnucash. Some of your configuration settings may not work properly."

When I click "Details" on the second window, it says: "Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for information. (Details - 1: Failed to get connection to session: dbus-launch failed to autolaunch D-Bus session: Autolaunch requested, but X11 support not compiled in."

Gnucash mostly works fine otherwise, but preferences cannot be saved. That is, you can change them and click OK, but they don't actually do anything. Also, other "on-the-fly" preferences don't stick, such as the confirmation window when changing the reconciliation state of transactions. When I select, "don't warn me again", this is not remembered, and the windows will still pop up.

Gnucash is also taking a ridiculous amount of CPU power, and is extremely slow, possibly related to locked files?

Attachments (1)

patch-dbus-Portfile.diff (849 bytes) - added by dbevans (David B. Evans) 11 years ago.
Revised patch for Portfile

Download all attachments as: .zip

Change History (58)

comment:1 Changed 11 years ago by pgijnxn02@…

Cc: pgijnxn02@… added

Cc Me!

comment:2 Changed 11 years ago by vinc17@…

Cc: vinc17@… added

Cc Me!

comment:3 Changed 11 years ago by vinc17@…

Here the problem disappears after deactivating gconf @2.24.0_0 and reactivating gconf @2.22.0_0. So, I suppose the bug is in gconf @2.24.0_0.

comment:4 Changed 11 years ago by hypocrite@…

I can confirm that moving back to gconf @2.22.0_0 fixes this bug. I've opened a ticket for the gconf people, but will leave this ticket, just in case the bug is actually unrelated to gconf.

comment:5 Changed 11 years ago by dbevans (David B. Evans)

Cc: db.evans@… added

Cc Me!

comment:6 Changed 11 years ago by dbevans (David B. Evans)

After upgrading to dbus-1.2.4, the memory allocation error that kept dbus-daemon from launching was fixed (see #16774) but the GConf problem remained. In response to the error message "X11 support not compiled in", rebuilt dbus 1.2.4 with configure option --with-x (default in current port is --without-x). GConf is now working for me. Apparently, not having X11 support enabled was keeping dbus from launching gconfd in the X11 environment.

comment:7 Changed 11 years ago by mf2k (Frank Schima)

Are you suggesting a variant be added to dbus for X11, or just automatically include it?

comment:8 in reply to:  7 Changed 11 years ago by dbevans (David B. Evans)

Replying to macsforever2000@…:

Are you suggesting a variant be added to dbus for X11, or just automatically include it?

My suggestion is to make --with-x the default and add a variant (no_x11) to turn it off if desired. In fact, I am testing a patched Portfile now and will post the patch as soon as it appears correct.

comment:9 in reply to:  7 Changed 11 years ago by dbevans (David B. Evans)

Replying to macsforever2000@…:

Are you suggesting a variant be added to dbus for X11, or just automatically include it?

Attached is the proposed patch.

Changed 11 years ago by dbevans (David B. Evans)

Attachment: patch-dbus-Portfile.diff added

Revised patch for Portfile

comment:10 Changed 11 years ago by dbevans (David B. Evans)

Updated patch. Hope this works better.

comment:11 Changed 11 years ago by mf2k (Frank Schima)

I applied the patch and reinstalled dbus, but i still see the problem in gnucash. What version of gconf do you have installed? I have 2.24.0_0.

comment:12 Changed 11 years ago by dbevans (David B. Evans)

Yes, I have gconf @2.24.0_0 installed. I haven't installed gnucash however. GConf applications that now work for me (and weren't before) are gconf-editor @2.24.0.1_0 gimp2 @2.6.0_0 glade3 @3.4.5_0. And I'm running on 10.4.11 ppc.

comment:13 Changed 11 years ago by mf2k (Frank Schima)

I've committed your patch in r40587. Thanks!

comment:14 Changed 11 years ago by hypocrite@…

I've also tried installing the new dbus @1.2.4_1, but I still get the same problems with gconf @2.24.0_0 and gnucash.

comment:15 Changed 11 years ago by pgijnxn02@…

Gnucash now works for me with dbus 1.2.4_1. I also unloaded+loaded the launchd item, and re-upgraded gconf to 2.24.0_0.

Like db.evans, I am running 10.4.11 PPC. Is that true for anyone it's still broken for?

comment:16 Changed 11 years ago by aoeumacports@…

On ppc 10.5.5, the new version of dbus resolves the "compiled without X11 support" problem, but _not_ the underlying long-startup-time can't-connect-to-dbus problem[*]. To fix this, I had to roll back gconf to 2.22.0_0 as others did. This resolved the problem. Also, Re-upgrading to gconf 2.24.0_0 caused the problem to come back.

[*] Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for information. (Details - 1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-aOhufhZy8k: No such file or directory)

comment:17 in reply to:  16 ; Changed 11 years ago by mp@…

Replying to aoeumacports@…:

[*] Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for information. (Details - 1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-aOhufhZy8k: No such file or directory)

I'm seeing the exact same thing as you on intel 10.5.5. I think the problem has to do with dbus autolaunch. I can get gnucash to work fine by starting gnucash with

# dbus-launch gnucash

or by using dbus-launch to set the DBUS_SESSION_ADDRESS and DBUS_SESSION_PID environment variables first with (in sh, bash, or zsh)

# eval `dbus-launch --sh-syntax`

Once this is done, then gnucash will start up fine because it has access to the session dbus daemon.

If gnucash (or any program that uses dbus) doesn't have access to the session dbus daemon (via the env variables above), it will use the dbus autolaunch functionality. This has worked in the past, but doesn't seem to work properly with dbus-1.2.4.

Actually, the dbus documentation suggests that autolaunch is not the best idea ("it can be suboptimal or even broken"), so perhaps the dbus port should suggest putting the above code in users' login scripts.

comment:18 Changed 11 years ago by mp@…

Cc: mp@… added

Cc Me!

comment:19 Changed 11 years ago by mf2k (Frank Schima)

Cc: macsforever2000@… added

Cc Me!

comment:20 in reply to:  17 Changed 11 years ago by mf2k (Frank Schima)

Replying to mp@…:

# eval `dbus-launch --sh-syntax`

I added this to my .bash_profile and gnucash works normally for me too now. Thanks for the workaround!

comment:21 Changed 11 years ago by mp@…

I can confirm that this error is a dbus problem, not a gnucash problem:

Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for information. (Details - 1: Failed to get connection to session: Failed to connect to socket /tmp/dbus-aOhufhZy8k: No such file or directory)

I compiled a simple test program (from the dbus docs) which has a similar error. When there is no current session dbus daemon instance, libdbus uses an 'autolaunch' feature which seems to be broken.

comment:22 Changed 11 years ago by mp@…

The bug is a dbus bug which has always been there. The reason why we're seeing it now with gnucash is that gconf-2.23.0+ now use dbus.

I have filed a bug and a patch upstream for dbus at https://bugs.freedesktop.org/show_bug.cgi?id=18013

comment:23 in reply to:  22 ; Changed 11 years ago by vinc17@…

Replying to mp@…:

I have filed a bug and a patch upstream for dbus at https://bugs.freedesktop.org/show_bug.cgi?id=18013

This is a different bug: the problem with gconf also appears on 10.4.11, where $DISPLAY doesn't have a slash.

comment:24 in reply to:  23 ; Changed 11 years ago by mp@…

Replying to vinc17@…:

Replying to mp@…:

I have filed a bug and a patch upstream for dbus at https://bugs.freedesktop.org/show_bug.cgi?id=18013

This is a different bug: the problem with gconf also appears on 10.4.11, where $DISPLAY doesn't have a slash.

Actually, none of this is a gconf problem. It's all dbus issues, but because gconf-2.22 didn't use dbus, gconf-2.23+ exposes these problems.

The original bug was that X11 support was not compiled into dbus, so dbus autolaunch wouldn't work (on all platforms). Once an updated dbus portfile was made, both db.evans (comment:12) and pgijnxn02 (comment:15) reported success on 10.4ppc.

Other comments say that the problem didn't go away on 10.5 (comment:16), and went away only if dbus-launch was issued manually (comment:20). I am guessing that all of these commenters are on 10.5. This is actually a different bug to the original "no X11" bug and I will make a new bug report so this one can be closed.

As far as I can see it should all work on 10.4 right now. If you are still having problems on 10.4 and you are fully updated, please provide more details about the error message that you're seeing.

comment:25 Changed 11 years ago by mp@…

Oops, I forgot that I did open a new ticket yesterday about dbus failing on 10.5. Find it at #16833

comment:26 Changed 11 years ago by vinc17@…

OK, as this bug was still open, I didn't understand that it was solved. Shouldn't it be closed as fixed? (#16833 is still open for the other, unrelated, problem on 10.5.)

comment:27 Changed 11 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

Closing as fixed.

comment:28 Changed 11 years ago by hypocrite@…

I can confirm that upgrading to dbus @1.2.4_2 fixes this bug on OS X 10.5.5.

Cheers!

comment:29 in reply to:  24 ; Changed 11 years ago by olaf@…

Replying to mp@…:

As far as I can see it should all work on 10.4 right now. If you are still having problems on 10.4 and you are fully updated, please provide more details about the error message that you're seeing.

I do. I've compiled gnucash +no_x11 as a global variant and after launching gnucash I've experienced the behaviour in the original bug description. I've installed all from scratch.

IMHO dbus should not depend on X11.

comment:30 in reply to:  29 Changed 11 years ago by mp@…

Replying to olaf@…:

Replying to mp@…:

As far as I can see it should all work on 10.4 right now. If you are still having problems on 10.4 and you are fully updated, please provide more details about the error message that you're seeing.

I do. I've compiled gnucash +no_x11 as a global variant and after launching gnucash I've experienced the behaviour in the original bug description. I've installed all from scratch.

IMHO dbus should not depend on X11.

The dbus auto-launch functionality is X11-dependent. If you're running gnucash with +no_x11 then you *must* set up a dbus session daemon as outlined in comment:17. The dbus port should really be setting this up via launchd (I will file a bug).

comment:31 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:32 Changed 11 years ago by macports@…

This is definitely not fixed. I tried from scratch - downloading MacPorts-1.7.0-10.5-Leopard.dmg, and then doing "sudo port install gnucash". Once I start gnucash, I get: Xlib: extension "RANDR" missing on display "/tmp/launch-lVQBbc/:0". Followed by the complaint that preferences are not accessible. Then I get a bunch of: Failed to load key /apps/gnucash/general/show_splash_screen: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://www.gnome.org/projects/gconf/ for information. (Details - 1: Failed to get connection to session: dbus-launch failed to autolaunch D-Bus session: EOF in dbus-launch reading address from bus daemon

If I try dbus-launch gnucash I get: Failed to start message bus: In D-Bus address, character '+' should have been escaped

EOF in dbus-launch reading address from bus daemon

Please help! Had I known that updating would make my gnucash broken, I would have never done it. I promise I'll never update again.

I'm on Intel MBP 10.5.6.

Thanks!

comment:33 in reply to:  32 Changed 11 years ago by hypocrite@…

Replying to macports@…:

This is definitely not fixed.

Your output looks different to above. This may be a different bug. Did you try deactivating gconf @2.24.0_0 and reactivating gconf @2.22.0_0, to isolate the problem? More information here. Updating is rarely too dangerous, as you can always reinstall a previous version.

comment:34 Changed 11 years ago by macports@…

Yes, installing gconf @2.22.0_0 did allow me to start gnucash properly. Thanks for your help.

However, there is still a problem if anybody tried to install MacPorts with a sole purpose of running gnucash. It would be crippled.

Thanks again.

comment:35 Changed 11 years ago by hypocrite@…

Well, someone here more knowledgable than I might be able to isolate your problem, and identify which part is broken.

I'd recommend posting to the macports mailing list and/or one of the gnucash mailing lists, both of which are usually quite helpful.

Good luck!

comment:36 Changed 11 years ago by jonas.baehr@…

Hi,

I do also think that making dbus depending on X11 by default is not the best solution. I'd propose the other way round, and make a +x11 variant for those who need x11. It's quite paradox to make a default suitable for X11 apps (maybe only one x11 app) and forcing others to use the +no_x11 variant on a Platform where X11 is not the default window system.

As a consequence of r40587 the launch of every KDE application, which don't need X11 at all, opens now a completely useless X11 session. I vote to create an +x11 variant for those who need x11/x11-apps, but don't force an X11 default to the rest.

comment:37 Changed 11 years ago by dbevans (David B. Evans)

Cc: devans@… added; db.evans@… removed

comment:38 Changed 11 years ago by jonas.baehr@…

Cc: jonas.baehr@… added

Cc Me!

comment:39 Changed 11 years ago by illogic-al@…

Cc: illogic-al@… added

Cc Me!

comment:40 Changed 11 years ago by illogic-al@…

I'm with jonas on this one. Support for native functionality (i.e. launching via launchd). If that can't be achieved a variant for x11 should be created.

comment:41 Changed 11 years ago by gwhitney

I'm agnostic on what the default configuration for dbus should be. However, I did just compile gnucash under Mac OS X 10.5 with +no_x11 +quartz in my variants.conf, and the resulting gnucash would not run properly unless I either used dbus-launch directly or put eval dbus-launch --auto-syntax in my login profile. (It appeared to be irrelevant whether or not I enabled the StartupItem that dbus tells you about when you port install it for the purposes of this issue.) I also just checked in the gnucash port updated to 2.2.8, adding a no_x11 variant (see r44456). As a stopgap measure to warn others about the issue, I modified the portfile to emit a warning briefly summarizing the dbus issue in the post-activate step. Hopefully this will at least point the next person who encounters this issue in the right direction. The warning can easily be removed when the underlying issue (about how to get a hold of a dbus session in the absence of an X server) is resolved.

comment:42 Changed 11 years ago by jonas.baehr@…

Please try the dbus port in #17950, it uses launchd the storing the session bus address instead of X11. This also deprecates the x11/no_x11 default.

comment:43 Changed 11 years ago by illogic-al@…

The port has been committed. Please update dbus and report any problems.

comment:44 Changed 11 years ago by meowsqueak@…

Cc: meowsqueak@… added

Cc Me!

comment:45 in reply to:  41 ; Changed 11 years ago by meowsqueak@…

Replying to gwhitney@…:

I did just compile gnucash under Mac OS X 10.5 with +no_x11 +quartz in my variants.conf, and the resulting gnucash would not run properly unless I either used dbus-launch directly or put eval dbus-launch --auto-syntax in my login profile.

I was informed in #17950 that dbus is not used by the +quartz build of gnucash. However I have this bug as originally described here yet I cannot run 'dbus-launch' as it dies immediately with "check-in error". Please see https://trac.macports.org/ticket/17950#comment:17 .

To reiterate, I compiled on OSX 10.5 (from a clean MacPorts install) with +no_xll -x11 +no_static +quartz and I am unable to run 'dbus-launch' or eval `dbus-launch --auto-syntax' as dbus-launch dies with this error:

"Failed to start message bus: Check-in failed: Permission denied"

A 'ps' shows a --session dbus instance running under my username.

Running gnucash directly gives the same symptoms as outlined in the original bug report above.

comment:46 in reply to:  45 Changed 11 years ago by meowsqueak@…

Replying to meowsqueak@…:

I was informed in #17950 that dbus is not used by the +quartz build of gnucash.

Sorry, I should be clearer - 'dbus-launch' is not used by the +quartz build of gnucash.

I made my comment because the workaround suggested here (to run 'dbus-launch') does not work for me, because dbus-launch does not work.

comment:47 Changed 11 years ago by jonas.baehr@…

To summarise #17950, I poposed a patch to dbus to use launchd instead of X11 for storing the session bus address. launchd also autolaunch the dbus-deamon ans plays the watchdog (same as dbus-launch does on X11 systems). Unfortunately there still seem to be some problems, so I recommend everyone using gnome based apps (like gnucash) to stick with the previous version until the issues are solved.

comment:48 Changed 11 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: closedreopened

comment:49 Changed 11 years ago by meowsqueak@…

In #17950, a suggestion was made to run /opt/local/libexec/gconfd-2 before GnuCash. This fixed the problem for me and GnuCash now works without the symptoms described above.

comment:50 Changed 11 years ago by pgijnxn02@…

Cc: pgijnxn02@… removed

Cc Me!

comment:51 Changed 11 years ago by tcwan (TC Wan)

I've updated gnucash to 2.2.8, and have the dbus problem as described here and also in #17950. If gconfd-2 were not running, gnucash will bring up the dialog to say that configuration settings were not found, would I like to create defaults? etc. I can eventually get to an empty gnucash application screen.

However, if gconfd-2 is running, gnucash will startup but hang at the splash screen right after "Loading data..." is displayed. In the terminal it says "Found Finance::Quote version 1.13".

I upgraded gnucash with the defaults (no variants selected).

gnucash 2.2.7 was working fine with dbus 1.2.10 but I cannot revert since the ports are no longer in my system.

comment:52 in reply to:  51 Changed 11 years ago by tcwan (TC Wan)

Replying to tcwan@…:

I've updated gnucash to 2.2.8, and have the dbus problem as described here and also in #17950. If gconfd-2 were not running, gnucash will bring up the dialog to say that configuration settings were not found, would I like to create defaults? etc. I can eventually get to an empty gnucash application screen.

However, if gconfd-2 is running, gnucash will startup but hang at the splash screen right after "Loading data..." is displayed. In the terminal it says "Found Finance::Quote version 1.13".

I upgraded gnucash with the defaults (no variants selected).

gnucash 2.2.7 was working fine with dbus 1.2.10 but I cannot revert since the ports are no longer in my system.

Sorry, it turns out that the hang is due to outdated proxy settings for .curlrc. Gnucash didn't use curl for the Financial Quotes module before 2.2.8??? I only found this out after installing Gnucash 2.2.8 on another Mac which runs without problems.

comment:53 Changed 11 years ago by danstadler@…

Cc: danstadler@… added

Cc Me!

comment:54 Changed 11 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:55 Changed 11 years ago by vinc17@…

This bug suddenly occurred a few weeks ago. I still had an old gnucash version. I thought upgrading gnucash to the current version could help. Unfortunately this didn't solve the problem. When I run gnucash from a terminal, I get errors:

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!

even though org.freedesktop.dbus-session.plist is loaded:

$ sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
org.freedesktop.dbus-session: Already loaded

and a ps auxww shows:

root      1643   0.0  0.0    27940    188  ??  Ss   11Jul09   0:00.01 /opt/local/bin/dbus-daemon --nofork --session

comment:56 Changed 11 years ago by vinc17@…

Since this is more general than gnucash, I've reported bug #20505.

comment:57 in reply to:  55 Changed 11 years ago by jonas@…

Resolution: fixed
Status: reopenedclosed

Replying to vinc17@…:

This bug suddenly occurred a few weeks ago. I still had an old gnucash version. I thought upgrading gnucash to the current version could help. Unfortunately this didn't solve the problem. When I run gnucash from a terminal, I get errors:

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!

even though org.freedesktop.dbus-session.plist is loaded:

$ sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
org.freedesktop.dbus-session: Already loaded

and a ps auxww shows:

root      1643   0.0  0.0    27940    188  ??  Ss   11Jul09   0:00.01 /opt/local/bin/dbus-daemon --nofork --session

Here's you problem: the session bus runs for the user root, not for your own. In short: don't use sudo to load it. Details: https://trac.macports.org/ticket/20505#comment:1

Note: See TracTickets for help on using tickets.