After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638762 - Windows 7 64-bit: GnuCash will not start due to existing SCHEME_LIBRARY_PATH env variable
Windows 7 64-bit: GnuCash will not start due to existing SCHEME_LIBRARY_PATH ...
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
2.4.x
Other Windows
: Normal critical
: ---
Assigned To: Geert Janssens
Andreas Köhler
Depends on:
Blocks:
 
 
Reported: 2011-01-05 19:15 UTC by Ed
Modified: 2018-06-29 22:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GnuCash 2.4 Crash Trace File (99 bytes, text/plain)
2011-01-08 16:01 UTC, Ed
Details
GnuCash trace file when run with --debug and --extra params (494 bytes, text/plain)
2011-01-09 04:33 UTC, Ed
Details

Description Ed 2011-01-05 19:15:53 UTC
GnuCash 2.4.0 will not start. In fact, I can confirm that this problem DOES NOT exist on 2.3.15 and DOES exist on 2.3.17.

As a hint (perhaps a distraction), I have searched various threads on this issue, and one of the most plausible causes appears to be that some GnuCash module now requires internet connectivity, and that requirement causes the startup to appear to hang on Windows (although one user said that it causes no issues on Linux).

Please feel free to contact me if you have any questions.

-Ed
Comment 1 Ed 2011-01-07 15:24:08 UTC
This is the link to the "hint" I described above:
http://lists.gnucash.org/pipermail/gnucash-user/2010-December/037705.html
Comment 2 mike 2011-01-07 21:46:20 UTC
Following the thread, it appears that in that case is was a firewall issue in that the user appears to have blocked 127.0.0.1, localhost, and so GnuCash was unable to communicate with the machine is was running on.

See:
https://secure.wikimedia.org/wikipedia/en/wiki/Localhost

Can you confirm which version of Windows you are using and that the firewall is not blocking 127.0.0.1 and post any output from the tracefile.
Comment 3 Ed 2011-01-07 22:04:33 UTC
I am using Windows 7 64-bit.

I disabled all antivirus and firewall, and GnuCash still won't start. I also tried adding a "127.0.0.1 localhost" line in my hosts file (apparently Windows 7 expects this to be "handled by DNS").

I do not know where the tracefile is that you're referring to, but would be happy to comply if you could point me to it. Thanks, again!

-Ed
Comment 4 mike 2011-01-08 10:30:07 UTC
I meant to post this link too: http://wiki.gnucash.org/wiki/Tracefile
Comment 5 Ed 2011-01-08 16:01:09 UTC
Created attachment 177838 [details]
GnuCash 2.4 Crash Trace File
Comment 6 Ed 2011-01-08 16:10:58 UTC
I've attached the trace file (which doesn't seem to contain much). Just so you know, here's exactly what I did (and why):
- GnuCash seems to remember its last opened file/database, so to ensure that the crash isn't related to my data, I created a fresh and empty XML file in GnuCash 2.3.15 and closed GnuCash with the new empty file as the last open file.
- I then uninstalled GnuCash 2.3.15.
- I then deleted all the .gconf, .gnucash, and other config directories from my AppData directory (so that GnuCash 2.4 could have a "fresh" start). Of course, I made a backup of all directories first (don't want to lose my custom reports! [grin]).
- I then installed GnuCash 2.4 stable release. (I can install an SVN version, if you need me to.)
- I then executed Gnucash 2.4 from the start menu.
- The splash screen and Tip-of-the-Day screen both appear for a split second, then disappear.
- At this point, there are two gconfd-2.exe*32 processes that run briefly, then seem to pause at 0% CPU for about 10-15 seconds. Then they both disappear from Task Manager.

I also noted that the trace file was zero-bytes UNTIL the moment the gconfd-2.exe processes exited.

Hope the additional info helps. Thanks for your help!
Comment 7 Frank H. Ellenberger 2011-01-09 03:32:28 UTC
Ed, could you run gnucash with --debug  or --extra to get more information in the trace file? You could also play with --log; see gnucash --help for details.

IIRC somewhere in Start->All Programs->Accessoirs is cmd.exe to get a window, in which you can enter above commands.
Comment 8 Ed 2011-01-09 04:32:28 UTC
The new trace file content is simply pasted here since it contains only these eight lines:
=============================================================
*   INFO <gnc.engine> [gnc_hook_lookup] no hook lists
*   INFO <qof.engine> [guid_init] got 2060 bytes
*   WARN <qof.engine> [guid_init()] only got 2060 bytes.
The identifiers might not be very random.
*   INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] 3 DBD drivers found
*   INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver: mysql
*   INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver: pgsql
*   INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver: sqlite3
=============================================================

The Windows version gnucash.exe doesn't give any console output with the --help parameter (I also tried /?, --?, -?, -h, etc.).

As always, let me know if there's anything else I can do to help track down this problem. Thanks!

-Ed
Comment 9 Ed 2011-01-09 04:33:55 UTC
Created attachment 177857 [details]
GnuCash trace file when run with --debug and --extra params
Comment 10 Frank H. Ellenberger 2011-01-09 04:54:19 UTC
Ed, are you willing to do the hard part?

http://wiki.gnucash.org/wiki/Stack_Trace

BTW: If you get one, reset the status to Unconfirmed again.
Comment 11 Ed 2011-01-09 06:16:45 UTC
Frank,

As you can see by my bug report, I am running GnuCash on Windows 7 64-bit. According to the link you provided, the instructions for Windows users are (and I quote):
================================================================
If you have been asked to provide a stack trace, but you are using GnuCash on Windows only, please respond along the lines of "I'm sorry, but I encountered this problem only on Windows and your wiki page says it's impossible to obtain stack traces there".
================================================================

I am a Senior Software Engineer, but I have never worked with gdb (the only other recommendation on the Wiki page), and my C/C++ skills are nominal at best. I have spent my time stepping through stack traces myself, but to have to learn a new development tool just to report a bug seems a little "over the top" from my perspective. [grin]

I understand you "NEEDINFO" as the status says, but you're asking me to provide info that GnuCash Wiki says is "impossible to obtain." Therefore, you've put me in a very difficult place. Therefore, I have changed the status back to "UNCONFIRMED" since this is definitely a problem that was introduced between 2.3.15 and 2.3.17 (which I mentioned earlier). I am able to run 2.3.15 without any issues--including using sqlite and mysql, which I tested--but 2.3.17 crashes exactly the same way that 2.4.0 does.

Perhaps there's something else I can do to get more detailed logging out of gnucash? I'm willing to help in any way that is *possible*. But I really do need help, and I have verified that this appears to be a GnuCash bug introduced after version 2.3.15. Thanks!

-Ed


P.S.

**************************************************
ANOTHER THOUGHT THAT RECENTLY OCCURRED TO ME...
(again, I realize this might just be a distraction)
**************************************************
I thought I noticed something about Python during the GnuCash install. I currently have both Python26 and Python31 installed (I use Blender et al, as well). Could the different Python versions be causing some sort of problem?
**************************************************
Comment 12 Christian Stimming 2011-01-09 21:37:28 UTC
(Lowering importance to CRITICAL because BLOCKER means it's a crasher and/or inevitable data loss during running the program that hits the majority of our platforms, but Windows 7 is not the majority so far. Also, we still don't know whether this is program code by gnucash that needs to be fixed, or maybe the problem goes away by updating gconf/orbit to some other version.)
Comment 13 Ed 2011-01-09 23:40:10 UTC
I HAVE FOUND A WORKAROUND TO THIS PROBLEM, BUT I DO NOT KNOW *WHY* IT WORKS:

I had some old batch files lying around for launching GnuCash (I don't even remember where they came from...I assume they're remnants from 2.2.9).
- When I use the Start menu's GnuCash icon (e.g. which is just a shortcut to the gnucash.exe), GnuCash 2.4.0 does not open...crashing as described in this bug report.
- HOWEVER, when I use this batch file, it opens just fine:
======================================================================
@echo off
setlocal
chcp 1252
set PATH=C:\Program Files (x86)\gnucash\bin;C:\Program Files (x86)\gnucash\lib;C:\Program Files (x86)\gnucash\lib\gnucash;%PATH%
set GUILE_WARN_DEPRECATED=no
set GNC_MODULE_PATH=C:\Program Files (x86)\gnucash\lib\gnucash
set GUILE_LOAD_PATH=C:\Program Files (x86)\gnucash\share\gnucash\guile-modules;C:\Program Files (x86)\gnucash\share\gnucash\scm;C:\Program Files (x86)\gnucash\share\guile\1.6;%GUILE_LOAD_PATH%
set LTDL_LIBRARY_PATH=C:\Program Files (x86)\gnucash\lib
set QOF_LIB_DIR=C:\Program Files (x86)\gnucash\lib\gnucash
set GNC_DBD_DIR=C:\Program Files (x86)\gnucash\lib\dbd
set GNC_STANDARD_REPORTS_DIR=C:\Program Files (x86)\gnucash\share\gnucash\guile-modules\gnucash\report\standard-reports
set SCHEME_LIBRARY_PATH=
start gnucash mysql://DB_USER:DB_PASS@127.0.0.1/DB_NAME
======================================================================
Comment 14 Ed 2011-01-09 23:45:07 UTC
Sorry for the double-post...I meant to add...

The bug may just apply to the *WINDOWS INSTALLER*, and be corrected by simply as updating the installer to set some environment variables.

Having said that, when I do not use the batch file above, GnuCash still crashes every time, so it might still be worthwhile (from a user's perspective) to prevent the crash somehow.
Comment 15 Christian Stimming 2011-01-10 09:22:46 UTC
Does it also start correctly if you modify the last line of the batch file to read just "start gnucash" (i.e. without the mysql part after it)?

Does it also start correctly if you remove the "set PATH=..." line from the batch file?

As for the folders in the PATH line: Do those folders all point to your current installation of gnucash, or are any of those folders from an older version of gnucash which still exists on your computer?

Thanks!
Comment 16 Ed 2011-01-10 16:59:34 UTC
Good questions!

1. YES, it starts fine with just "start gnucash"...opening the last file or database (I tested both).

2. NO, when I remove the PATH it does not start. I receive a message box: "Windows cannot find 'gnucash' on your computer..."...blah, blah, blah.

3. The PATH points to the CURRENT GnuCash, and YES, they are all valid folders. I only have one installation of GnuCash on my computer. (I have been uninstalling/reinstalling the different versions, and removing all of the .gconfd/.gnucash config directories each time.)

Thanks!
Comment 17 Ed 2011-01-20 18:13:06 UTC
Status has been NEEDINFO for about two weeks. Info was provided over a week ago, and have received no response. Therefore, I'm changing status back to UNCONFIRMED. Thanks!
Comment 18 Christian Stimming 2011-01-20 19:13:16 UTC
Thanks for the feedback. The most interesting observation of course is that with the batch (script) file it starts but it does not start without it. I wonder whether you can find out the exact element of the batch file that makes it work. Maybe you can try the following:
- If the batch file contains *only* the SET PATH (and "start gnucash") but nothing else, does it still work?
- Can you remove selected parts from the SET PATH line and see which one is necessary so that it still starts?

We *thought* we had all DLL installations set up correctly, but your bugreport indicates some important DLL might be picked up from some other PATH location accidentally, which maybe stops the program from starting.
Comment 19 Ed 2011-01-20 19:51:15 UTC
Good idea. I tried a variety of configurations, and here's what I found:
- The PATH variable is *NOT* necessary, but when I removed it I (obviously) had to declare the full path to the executable.

******************************************************************
- The SCHEME_LIBRARY_PATH appears to be the culprit.
******************************************************************
For some reason, I *MUST* set the SCHEME_LIBRARY_PATH as empty *IN THE SCRIPT* in order for GnuCash to start.
- SCHEME_LIBRARY_PATH is indeed configured in my Windows Environment Variables.
- And when I start CMD.EXE, I've confirmed that SCHEME_LIBRARY_PATH is automatically set.
- HOWEVER, even if I execute the [FULL_PATH\gnucash.exe...etc] command (below) from the command line, it still fails to start unless I call the batch file that explicitly sets the SCHEME_LIBRARY_PATH before calling the executable. VERY WEIRD (at least from a user-perspective [grin]).
*********************************************************

- Also, ANOTHER IMPORTANT POINT: When declaring the full path to the executable, I had to remove the Windows "START.EXE" command. It throws the following error box:
"There is no program associated to perform the requested action. Please install a program or, if one is already installed, create an association in the Default Programs control panel."

******************************************************************
Here's my minimalistic WORKING script (only 2 lines required):
******************************************************************
set SCHEME_LIBRARY_PATH=
"C:\Program Files (x86)\gnucash\bin\gnucash.exe" mysql://DB_USER:DB_PASS@127.0.0.1/DB_NAME

Hope that helps! Thanks for all your help!

-Ed
Comment 20 Christian Stimming 2011-01-20 20:27:12 UTC
Thanks, that is a lot of interesting information. Last question: What is the value of the SCHEME_LIBRARY_PATH variable from the Windows Environment Variables?
Comment 21 Ed 2011-01-20 21:00:24 UTC
SCHEME_LIBRARY_PATH in Windows Environment variables is set empty. (That's why it seems so unbelievable to me that GnuCash won't start from the Command prompt.) Thanks!
Comment 22 Christian Stimming 2011-01-21 09:30:33 UTC
@Geert: Any idea how we could fix this issue with a pre-existing but empty SCHEME_LIBRARY_PATH env variable?
Comment 23 Geert Janssens 2011-01-21 13:21:27 UTC
@Ed: can you try to add
SCHEME_LIBRARY_PATH=
to the file
C:\Program Files (x86)\gnucash\etc\gnucash\environment
and then start gnucash.exe (not your batch file)

That will probably fix it. If you confirm this, I will apply a fix to the sources.

I searched through the commit history, and found I removed that line from the environment file in r19510 (somewhere between 2.3.15 and 2.3.17, so that matches your initial observation).

I am curious though where your SCHEME_LIBRARY_PATH environment variable comes from. Do you have cygwin installed, or some other software that is originally coming from linux ?
Comment 24 Ed 2011-01-21 17:59:01 UTC
I added the following line to the file "C:\Program Files (x86)\gnucash\etc\gnucash\environment" and *IT MOST DEFINITELY FIXED THE PROBLEM*:
SCHEME_LIBRARY_PATH=

I no longer need to use the batch/script files to open GnuCash, and I have confirmed that the Windows menu shortcuts to GnuCash also work fine.

Thank you guys for working through to the solution!
Comment 25 Ed 2011-01-21 18:00:05 UTC
ADDITIONALLY: YES, I do have CygWin installed.
Comment 26 Geert Janssens 2011-01-21 18:32:43 UTC
Thanks for your feedback. I'm building a fixed GnuCash as I'm writing this.
Comment 27 Geert Janssens 2011-01-21 22:29:45 UTC
Ok, the fix works fine on my test system. I have just committed it in r20141.

You can test it with tomorrow's nigthly build if you like. Should there still be problems don't hesitate to reopen this bug.
Comment 28 John Ralls 2018-06-29 22:51:02 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=638762. Please update any external references or bookmarks.