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 470656 - Preferences, Win32: Crash when setting accounting period
Preferences, Win32: Crash when setting accounting period
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Windows
2.2.x
Other Windows
: Normal critical
: ---
Assigned To: Andreas Köhler
Christian Stimming
Depends on:
Blocks: backport
 
 
Reported: 2007-08-27 10:40 UTC by Reuben Domain
Modified: 2018-06-29 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb result (22.77 KB, image/gif)
2007-08-30 07:53 UTC, Reuben Domain
Details
result 2 (14.60 KB, image/gif)
2007-08-31 07:26 UTC, Reuben Domain
Details

Description Reuben Domain 2007-08-27 10:40:57 UTC
Edit > Preferences > accounting period

when I attempt to change my accounting period from relative to absolute, Gnucash crashes.

Gnucash will no longer get past the splash screen after this initial crash. only way to clear the problem is to uninstall GnuCash, then get rid of .gconfd / .gconf / .gnome2_private / .gnome2 / .gnucash in my personal documents and settings folder (WinXP).
Comment 1 Josh Sled 2007-08-27 13:09:25 UTC
Is there a crash when changing any other preference?
Comment 2 Reuben Domain 2007-08-28 08:59:21 UTC
(In reply to comment #1)
> Is there a crash when changing any other preference?
> 

No, it will only crash when I click on the down arrow to make the calendar appear under absolute dates for the accounting period.
Thanks

Comment 3 Andreas Köhler 2007-08-28 22:05:59 UTC
Does "will no longer get past the splash screen" mean that the splash screen stays on top and nothing else seems to change?  Maybe you experience bug 395327 here and just need to switch to the "cannot get lock on file" warning dialog?

What is the content of the absolute date entries before you click the down arrow?  What is your active locale/language?  Please also give us the output of attachment 90557 [details].

What about a stack trace:  Please see http://wiki.gnucash.org/wiki/Windows#gdb and replace bin\libglib-2.0-0.dll by attachment 93429 [details] (use 7-zip to uncompress).

I see a crash when I enter some unparsable date (like a random character) into the date entry, but I want to be sure we talk about the same issue.
Comment 4 Reuben Domain 2007-08-29 11:21:54 UTC
The Lock file dialogue does come up when I attempt to open after a crash, but I have deleted the lock file, problem still exists. It is a true crash, right at the moment the splash screen should disappear and program window appear, the crash happens then.



Today the crash happened simply when I click on the absolute radio button in the preferences.




from the most recent gnucash.trace.XXXXXX
*   WARN <qof.engine> [guid_init()] only got 1395 bytes.
The identifiers might not be very random.
*   WARN <gnc.app-util> Could not spawn perl: Failed to execute child process (No such file or directory)



then the next most recent before that
*   WARN <qof.engine> [guid_init()] only got 1395 bytes.
The identifiers might not be very random.
*   WARN <gnc.app-util> Could not spawn perl: Failed to execute child process (No such file or directory)
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   CRIT <gnc.backend.file> commodity_ref_to_dom_tree: assertion `c' failed
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   CRIT <gnc.backend.file> commodity_ref_to_dom_tree: assertion `c' failed
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   CRIT <gnc.backend.file> commodity_ref_to_dom_tree: assertion `c' failed
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   WARN <Gdk> gdkselection-win32.c:1068: OpenClipboard failed: Invalid window handle.
*   CRIT <gnc.backend.file> commodity_ref_to_dom_tree: assertion `c' failed


gdb didn't run from calling it when starting up gnucash, so I set gdb working file to C:Pro..\..\..\GnuCash\bin then set it's exec target to gnucash-bin then started gnucash and ran gdb, it told me it couldn't run because libgncmod-engine.dll was missing???? thats was taking a punt to get gdb running?


I don't think entering random data causing a parse error is the problem, as I don't get to the stage of entering or submitting data


Comment 5 Andreas Köhler 2007-08-29 21:28:21 UTC
I have updated the information on http://wiki.gnucash.org/wiki/Windows#gdb ... does that help you now?

Please try to answer all questions and do not forget to unpack the libglib replacement :-)  And of course you submit data when clicking the down arrow, although it would be pretty suboptimal if we could not parse what we print out ;-)
Comment 6 Reuben Domain 2007-08-30 07:52:43 UTC
What is the content of the absolute date entries before you click the down
arrow?  What is your active locale/language?  Please also give us the output of
attachment 90557 [details] [edit].

The content of the absolute date entry is 30/08/2007 (todays date)

Locale: NZD (New Zealand Dollar)

output "Locale: en_NZ"

What about a stack trace:  Please see http://wiki.gnucash.org/wiki/Windows#gdb
and replace bin\libglib-2.0-0.dll by attachment 93429 [details] [edit] (use 7-zip to
uncompress).

The results of this process is shown in the picture included.

By the way, I got around the crash tonight..... I'll try to make this clear.
When I try to set the preference by first clicking on the "absolute" radio button, I get the crash. But when I click on the drop down arrow and change the date that appears in the absolute dialogue box, then change the radio button to absolute, there is no problem.

Comment 7 Reuben Domain 2007-08-30 07:53:47 UTC
Created attachment 94607 [details]
gdb result

result from running gdb
Comment 8 Andreas Köhler 2007-08-30 20:01:53 UTC
Thanks for this information!  One last check: What is your setting in Edit > Preferences > Date/time > Date Format, and what is the example string?
Do you play with it before switching to the Accounting Period tab?
Comment 9 Reuben Domain 2007-08-30 20:12:35 UTC
Date Format
Locale: 31/07/2005
I don't play with this before switching to the accounting period tab.

Thanks,
Reuben
Comment 10 Andreas Köhler 2007-08-30 20:27:56 UTC
I am sorry :-)
Say, you have typed "bt", what does 
p (char*)gtk_entry_get_text(gde->date_entry)
p gnc_date_edit_get_date_internal(gde)
print?
Comment 11 Reuben Domain 2007-08-31 07:26:20 UTC
Created attachment 94689 [details]
result 2

Here is the output from your instructions
Comment 12 Nick Hynes 2008-04-20 00:55:55 UTC
I have encountered this problem on XP too. I can confirm it is still an issue in 2.2.4.

I have a work-around which may help other users & might be relevant when diagnosing this issue:


WORKAROUND:
  1) Using windows explorer, open the folder where you store your GnuCash accounts files, and rename the most recently opened GnuCash accounts file, so that it is not automatically reloaded on startup. E.g. add '-BACK' to the end of the filename.
  2) Restart GnuCash (no need to reinstall)
  3) Go to 'Edit | Preferences', and in the 'accounting period' tab change the 'Start Date' to 'relative/start of year' and 'End Date' to 'relative/end of year'.
  4) Use 'File | Open' to reopen your renamed accounts file from step 1).


You should now be able to use your existing accounts file as before, without any loss of data or any further errors.


P.S. great work gnucash team - this is the only issue I've encountered & have done my whole years taxes in gnucash, and found it very useable.

P.P.S. I am using 'dd-MMM-yyyy' date format, with default strings of '20-Apr-2008' for both 'Start Date/absolute' and 'End Date/absolute'. The error seems to occur when editing either of them.
Comment 13 Charles Day 2008-07-14 16:16:15 UTC
Fix committed as r17327. Requesting backport for 2.2.

If an invalid date is entered (i.e. a date not supported by time_t) the date now reverts to the last valid date entered or, as a last resort, the beginning of the current day.
Comment 14 Andreas Köhler 2008-07-22 23:03:15 UTC
Applied to branches/2.2 as r17386 for inclusion in GnuCash 2.2.6.
Thanks!
Comment 15 John Ralls 2018-06-29 21:47: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=470656. Please update any external references or bookmarks.