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 343798 - Assert at line 262 in split-register-load.c
Assert at line 262 in split-register-load.c
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Register
git-master
Other All
: Normal critical
: ---
Assigned To: Chris Shoemaker
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2006-06-04 07:40 UTC by Mike Alexander
Modified: 2018-06-29 21:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test file to use to reproduce the problem (41.64 KB, application/xml)
2006-06-04 07:41 UTC, Mike Alexander
Details
Screen shot before tabbing out of transaction (163.64 KB, image/jpeg)
2006-06-05 05:17 UTC, Mike Alexander
Details
Screen shot after tabbing out of transaction (170.30 KB, image/jpeg)
2006-06-05 05:18 UTC, Mike Alexander
Details

Description Mike Alexander 2006-06-04 07:40:42 UTC
Steps to reproduce:
1. Open the attached file
2. Open a register for Assets:Broker Account:Corus
3. In the transaction on 11/1/1999 change the split for Assets:Broker Account:Corus to an amount of $323.36
4. Add a new split with zero shares and zero price and a value of $2909.99 credit to Assets:Broker Account:Corus to balance the transaction
5. Tab out of the transaction.
6. Click on the transaction dated 12/18/2003.


Stack trace:
  • #0 gnc_split_register_load
    at split-register-load.c line 262
  • #1 gnc_split_register_load
    at split-register-load.c line 247
  • #2 gnc_split_register_move_cursor
    at split-register-control.c line 349
  • #3 gnc_table_move_cursor_internal
    at table-allgui.c line 782
  • #4 gnc_table_verify_cursor_position
    at table-allgui.c line 930
  • #5 gnc_table_wrap_verify_cursor_position
    at table-allgui.c line 993
  • #6 gnucash_sheet_cursor_move
    at gnucash-sheet.c line 291
  • #7 gnucash_button_press_event
    at gnucash-sheet.c line 1357
  • #8 _gtk_marshal_BOOLEAN__BOXED
  • #9 g_closure_invoke
  • #10 signal_emit_unlocked_R
  • #11 g_signal_emit_valist
  • #12 g_signal_emit
  • #13 gtk_widget_event_internal
  • #14 gtk_propagate_event
  • #15 gtk_main_do_event
  • #16 gdk_event_dispatch
  • #17 g_main_context_dispatch
  • #18 g_main_context_iterate
  • #19 g_main_loop_run
  • #20 gtk_main
  • #21 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 368
  • #22 inner_main
    at gnucash-bin.c line 480
  • #23 scm_boot_guile
    at init.c line 635
  • #24 main
    at gnucash-bin.c line 516


Other information:
The assert happens because pending_trans is not null.  In fact it points to the 11/1/1999 transaction we just edited.

This is with svn version 14298
Comment 1 Mike Alexander 2006-06-04 07:41:58 UTC
Created attachment 66721 [details]
Test file to use to reproduce the problem
Comment 2 Mike Alexander 2006-06-04 17:24:17 UTC
It works correctly if you use enter to record the transaction instead of tabbing out of it.
Comment 3 Josh Sled 2006-06-04 20:50:43 UTC
:(   Targeting.
Comment 4 Chris Shoemaker 2006-06-05 02:58:42 UTC
I haven't been able to reproduce yet, but I'll keep trying.  Initial comments:

1) My register starts in basic mode, so I click on the 'Split' toolbar button to expand.
2) When I enter 323.36, the balancing amount is 2,910.31, not 2,909.99.  Was this a typo?
3) Since the share field starts empty, I only zero out the price field.
4) When I tab off the new split, I'm still in the same transaction.  I see the duplicate of this transaction show up, since I have two splits for the Corus account.  The cursor is in the second one.
4) When I tab out of that blank split, I get the Discard/Cancel/Record dialog.  I choose Record.
5) There are 2 12/18 transactions.  Which do you mean?  Sell or Loss? (neither one crashes for me)
6) Tabbing out actually brings me to the first of the two 12/18 transactions, so clicking on it does nothing.

Anyway, I've tried to trigger this 8-10 different ways, without success.  I think I need more detailed instructions.  It might also help to take a screen shot right before the click that triggers this.

Comment 5 Chris Shoemaker 2006-06-05 03:12:39 UTC
Also, if you know the value of pending_trans, I guess it's because you've attached a debugger.  If so, I'd also like to know the value of *info.
Comment 6 Mike Alexander 2006-06-05 05:16:17 UTC
Some answers, keyed to the numbers in comment 4:

1. My register is in "Transaction Journal" mode.  If it is in any other mode I don't see the bug.  It doesn't matter whether "Enter moves to blank transaction" preference is selected or not.  I forgot to mention this in the initial report, sorry about that.

2. Yes that's a typo.  The correct amount is 2910.31.

3. Yes, zeroing the shares field is redundant.

4. When I tab off the new split the cursor leaves the transaction entirely (without opening a new split) and I never get the prompt to save or discard the changes.  This is probably the heart of the problem.

5. It doesn't matter.  Clicking on any other transaction causes the crash.

6. Tabbing out takes me to the blank transaction at the end, even if the "Enter moves to blank transaction" preference is not selected.

I'll attach two screen shots.  pic1.jpg is after step 4 in the original instructions and pic2.jpg is after step 5.  There was exactly one tab between these two.  The next click on any transaction will crash.

The contents of *info at the time of the crash is

(gdb) p *info
$1 = {
  blank_split_guid = {
    data = '\0' <repeats 15 times>, 
    __align_me = 0
  }, 
  pending_trans_guid = {
    data = "*,\345\245\002w\225Z\374\020\t\275\031/\223\244", 
    __align_me = 707585445
  }, 
  cursor_hint_trans = 0x5903d60, 
  cursor_hint_split = 0x5904f20, 
  cursor_hint_trans_split = 0x5904f20, 
  cursor_hint_cursor_class = CURSOR_CLASS_TRANS, 
  hint_set_by_traverse = 0, 
  traverse_to_new = 0, 
  exact_traversal = 1, 
  trans_expanded = 0, 
  reg_loaded = 0, 
  full_refresh = 1, 
  default_account = {
    data = "\327\341\305;\267\265\215\255\t\037&u<\317\216\345", 
    __align_me = -673069765
  }, 
  last_date_entered = 1149480000, 
  blank_split_edited = 0, 
  show_present_divider = 1, 
  first_pass = 0, 
  change_confirmed = 0, 
  user_data = 0x59130a0, 
  get_parent = 0x974b8 <gnc_ledger_display_parent>, 
  template = 0, 
  template_account = {
    data = '\0' <repeats 15 times>, 
    __align_me = 0
  }, 
  debit_str = 0x5976c90 "Debit", 
  credit_str = 0x5976cc0 "Credit", 
  tdebit_str = 0x5976b70 "Tot Debit", 
  tcredit_str = 0x5976e30 "Tot Credit"
}
Comment 7 Mike Alexander 2006-06-05 05:17:21 UTC
Created attachment 66756 [details]
Screen shot before tabbing out of transaction
Comment 8 Mike Alexander 2006-06-05 05:18:15 UTC
Created attachment 66757 [details]
Screen shot after tabbing out of transaction

There was exactly one tab event between this and pic1.jpg
Comment 9 Chris Shoemaker 2006-06-05 23:41:04 UTC
Ok, thanks.  Those screen shots helped.  I can reproduce this now and I'm working on fixing it.
Comment 10 Chris Shoemaker 2006-06-06 13:35:54 UTC
Update: This behavior was introduced in http://svn.gnucash.org/trac/changeset/13343

I'm currently thinking about ways to fix it.
Comment 11 Chris Shoemaker 2006-06-07 01:40:14 UTC
I think this is fixed in r14345, but I'd really like some rigorous testing to
assure me that r14345 doesn't break something else.

Comment 12 Chris Shoemaker 2006-06-17 01:31:08 UTC
I'm feeling optimistic that r14345 didn't break anything else.  I'm resolving as fixed.
Comment 13 John Ralls 2018-06-29 21:07:12 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=343798. Please update any external references or bookmarks.