Commit Graph

27981 Commits

Author SHA1 Message Date
John Ralls
32cad05d12 Update message catalogs with new gnucash.pot.
To ensure a sane Project-ID-Version header.
2023-06-24 14:40:17 -07:00
John Ralls
96f6f06841 Merge latest translations from Weblate. 2023-06-24 13:29:15 -07:00
John Ralls
4768c31b94 Merge Simon Arlott's 'static-analysis' into stable. 2023-06-24 13:06:57 -07:00
Simon Arlott
cdf0a37404
Bug 798966 - Uninitialised variable used in dialog-account-picker.c:dialog_response_cb()
The "placeholder" variable in dialog-account-picker.c:dialog_response_cb() may
be uninitialised before use if gtk_tree_selection_get_selected() returns
false.

Initialise it to true:
"jralls: The signal is blocked if the account is a placeholder, meaning
that one can't post splits to it. One also can't post splits to no account,
so the signal should be blocked in that case too."
2023-06-24 20:30:55 +01:00
Simon Arlott
2628ad0b6e
Initialise all column widths in set_dimensions_pass_two()
It shouldn't be possible for the number of columns to be different between
the header cursor and the other cursors but the return value from
g_table_index() is checked just in case this happens.

If this did happen, the width would be set using an uninitialised value
so initialise them all to 0.
2023-06-24 20:30:54 +01:00
Simon Arlott
1e1e922081
Fix null pointer dereference in gnc_split_register_save_to_copy_buffer()
If the "transfer" cell has been changed while cutting or copying a split
then it'll dereference the NULL "ft" value.

Check that "ft" is not NULL. This is equivalent to the original behaviour
before cb273b13a1 when the number of splits
would have been determined to be 0 for the SCM_UNDEFINED value of
"trans_scm".
2023-06-24 20:30:53 +01:00
Simon Arlott
57ca13515d
Fix use of uninitialised value in gnc_split_register_load()
The column value appears to be unused by gnc_split_register_show_trans()
but vc_loc.virt_col is an int so its value will not have been default
initialised. Set it to 0 to be consistent with other callers.
2023-06-24 20:30:52 +01:00
Simon Arlott
eb6addb058
Fix memory leak in gnc_main_window_update_menu_and_toolbar()
The function could return after allocating a new GncMenuModelSearch
without freeing it. Move the allocation later so that this doesn't happen.
2023-06-24 20:30:51 +01:00
Simon Arlott
dff96b2cfa
Add missing null pointer check in gnc_account_renumber_update_examples()
gtk_entry_get_text() should never return null but "prefix" is checked for
null on the first string and then dereferenced unconditionally on the
second string. Change this to be consistent and check twice.
2023-06-24 20:30:50 +01:00
Simon Arlott
ab6c6371ba
Initialise toclear_value in gnc_autoclear_window_ok_cb()
If "test for valid value" is false, errmsg is set which means there is then
a read of "toclear_value" which has not been initialised.

Initialise it to indicate an error with the value.
2023-06-24 20:30:49 +01:00
Simon Arlott
069eb61a3f
Avoid the potential negative left shift in test_xaccAccountType_Compatibility()
ACCT_TYPE_NONE is -1 but it should always be masked out by compat;
explicitly check for this instead of relying on that.

Add parenthesis to be clear that the default precedence is what's intended.
2023-06-24 20:30:48 +01:00
Simon Arlott
d7b2b06bae
Avoid unnecessary memory allocation in dom_tree_to_gnc_numeric()
Return a gnc_numeric instead of allocations that every caller has to free.

This makes it easier to fix the use after free in the unit test function
equals_node_val_vs_split_internal() where the expression in the return
statement wants to use the allocated gnc_numeric.
2023-06-24 20:30:42 +01:00
Simon Arlott
fe526a6043
Check source parameter to GncQuotesImpl::report() is not null
The "source" parameter is checked once at the start before using strcmp()
but is then used later on in GncQuotesImpl::query_fq() with function calls
that can't handle null values.
2023-06-24 16:46:45 +01:00
Simon Arlott
4b83068c6b
Fix return value of gnc_book_write_to_xml_file_v2()
81b9a02235 changed the behaviour of the
"success" variable that's used for the return value, so now the value is
being repeatedly overwritten instead of being combined with the result of
the next call.

Restore the original behaviour of setting success to false on failure.
2023-06-24 16:46:44 +01:00
Vincent Dawans
668b6978cd
Translation update by Vincent Dawans <dawansv@gmail.com> using Weblate
po/fr.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
368 failing checks (6.6%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/
2023-06-24 04:40:21 +02:00
Vincent Dawans
35e3878aa9
Translation update by Vincent Dawans <dawansv@gmail.com> using Weblate
po/fr.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
368 failing checks (6.6%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/
2023-06-23 23:48:06 +02:00
gallegonovato
cd0c5234ab
Translation update by gallegonovato <fran-carro@hotmail.es> using Weblate
po/es.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
16 failing checks (0.2%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/
2023-06-23 23:48:06 +02:00
Brian Hsu
b721407b8d
Translation update by Brian Hsu <brianhsu.hsu@gmail.com> using Weblate
po/zh_TW.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
57 failing checks (1.0%)
Translation: GnuCash/Program (Chinese (Traditional))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hant/
2023-06-23 23:48:06 +02:00
Vincent Dawans
b7b3209c18
Translation update by Vincent Dawans <dawansv@gmail.com> using Weblate
po/fr.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
371 failing checks (6.7%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/
2023-06-23 23:48:06 +02:00
Vincent Dawans
20545706eb
Translation update by Vincent Dawans <dawansv@gmail.com> using Weblate
po/fr.po: 99.2% (5478 of 5522 strings; 0 fuzzy)
372 failing checks (6.7%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/
2023-06-23 23:48:06 +02:00
gallegonovato
932f086e40
Translation update by gallegonovato <fran-carro@hotmail.es> using Weblate
po/es.po: 99.9% (5520 of 5522 strings; 1 fuzzy)
18 failing checks (0.3%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/
2023-06-23 23:48:06 +02:00
Francisco Serrador
0812a47e6b
Translation update by Francisco Serrador <fserrador@gmail.com> using Weblate
po/es.po: 99.9% (5520 of 5522 strings; 1 fuzzy)
18 failing checks (0.3%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/
2023-06-23 23:48:06 +02:00
Yuri Chornoivan
1c1bf29c9c
Translation update by Yuri Chornoivan <yurchor@ukr.net> using Weblate
po/uk.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
20 failing checks (0.3%)
Translation: GnuCash/Program (Ukrainian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/uk/

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
2023-06-23 23:48:06 +02:00
Brian Hsu
bc2dbf707a
Translation update by Brian Hsu <brianhsu.hsu@gmail.com> using Weblate
po/zh_TW.po: 99.4% (5491 of 5522 strings; 29 fuzzy)
53 failing checks (0.9%)
Translation: GnuCash/Program (Chinese (Traditional))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hant/

Co-authored-by: Brian Hsu <brianhsu.hsu@gmail.com>
2023-06-23 23:48:06 +02:00
Vincent Dawans
be904810df
Translation update by Vincent Dawans <dawansv@gmail.com> using Weblate
po/fr.po: 96.3% (5318 of 5522 strings; 89 fuzzy)
388 failing checks (7.0%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Vincent Dawans <dawansv@gmail.com>
2023-06-23 23:48:06 +02:00
Arve Eriksson
aec53d9bbe
Translation update by Arve Eriksson <031299870@telia.com> using Weblate
po/sv.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
44 failing checks (0.7%)
Translation: GnuCash/Program (Swedish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/sv/

Translation update  by Arve Eriksson <031299870@telia.com> using Weblate

po/sv.po: 99.4% (5494 of 5522 strings; 26 fuzzy)
47 failing checks (0.8%)
Translation: GnuCash/Program (Swedish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/sv/

Translation update  by Arve Eriksson <031299870@telia.com> using Weblate

po/sv.po: 99.4% (5492 of 5522 strings; 26 fuzzy)
47 failing checks (0.8%)
Translation: GnuCash/Program (Swedish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/sv/

Co-authored-by: Arve Eriksson <031299870@telia.com>
2023-06-23 23:48:05 +02:00
Christian Wehling
8cebf42a14
Translation update by Christian Wehling <christian.wehling@web.de> using Weblate
po/de.po: 99.4% (5489 of 5522 strings; 28 fuzzy)
56 failing checks (1.0%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/

Co-authored-by: Christian Wehling <christian.wehling@web.de>
2023-06-23 23:48:05 +02:00
gallegonovato
3f0a517df4
Translation update by gallegonovato <fran-carro@hotmail.es> using Weblate
po/es.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
29 failing checks (0.5%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Translation update  by gallegonovato <fran-carro@hotmail.es> using Weblate

po/es.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
29 failing checks (0.5%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Translation update  by gallegonovato <fran-carro@hotmail.es> using Weblate

po/es.po: 99.9% (5520 of 5522 strings; 2 fuzzy)
31 failing checks (0.5%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Translation update  by gallegonovato <fran-carro@hotmail.es> using Weblate

po/es.po: 99.9% (5519 of 5522 strings; 3 fuzzy)
31 failing checks (0.5%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Translation update  by gallegonovato <fran-carro@hotmail.es> using Weblate

po/es.po: 99.8% (5514 of 5522 strings; 8 fuzzy)
6 failing checks (0.1%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2023-06-23 23:48:05 +02:00
Pedro Albuquerque
e931722e60
Translation update by Pedro Albuquerque <pmra@gmx.com> using Weblate
po/pt.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Portuguese)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/pt/

Co-authored-by: Pedro Albuquerque <pmra@gmx.com>
2023-06-23 23:48:05 +02:00
Rune Osnes
3986ab365b
Translation update by Rune Osnes <osnes.rune@gmail.com> using Weblate
po/nb.po: 49.9% (2759 of 5522 strings; 1785 fuzzy)
2067 failing checks (37.4%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Co-authored-by: Rune Osnes <osnes.rune@gmail.com>
2023-06-23 23:48:05 +02:00
Simon Arlott
53238f6a90
Translation update by Simon Arlott <weblate.simon@arlott.org> using Weblate
po/en_NZ.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (English (New Zealand))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/en_NZ/

Translation update  by Simon Arlott <weblate.simon@arlott.org> using Weblate

po/en_AU.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (English (Australia))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/en_AU/

Translation update  by Simon Arlott <weblate.simon@arlott.org> using Weblate

po/en_GB.po: 100.0% (5522 of 5522 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (English (United Kingdom))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/en_GB/

Co-authored-by: Simon Arlott <weblate.simon@arlott.org>
2023-06-23 23:48:05 +02:00
John Ralls
ba7b26066e Merge Simon Arlott's'open-existing-page-not-restoring' into stable. 2023-06-23 14:45:44 -07:00
John Ralls
e98d3534ce Bug 798901 - Wrong value for very small prices from Finance::Quote.
Implement parsing number strings in scientific notation, avoiding
interpreting hexadecimal integers that way, "e" being a hex digit.
2023-06-23 14:39:37 -07:00
Simon Arlott
54d0a535ab
[gnc-main-window] Fix null pointer dereference when opening existing pages
When the page already exists in a window then we can't be restoring pages
so stop checking. The "window" variable will be nullptr if we're trying to
open the page "in any window".

This bug was introduced in the changes for bug 798564.
2023-06-23 17:18:41 +01:00
John Ralls
6b48c6ced7 Merge Simon Arlott's 'bug-798564' into stable. 2023-06-22 13:53:36 -07:00
John Ralls
cf3d2f3656 Merge Bob Fewell's reg-desc-fixes into stable. 2023-06-22 13:36:32 -07:00
John Ralls
4c67cc09a6 Merge Richard Cohen's 'valgrind-test-fixes' into stable. 2023-06-22 13:24:56 -07:00
Robert Fewell
d4be0d0711 Bug 798960 - Transaction completion horizontal scrolling
This commit is the second part to the bug that will scroll horizontally
to where the matching description text is.
2023-06-21 15:55:00 +01:00
Richard Cohen
518dab2429 Valgrind: fix "Conditional jump depends on uninitialised value" - test-split-register-copy-ops
- Don't save the address of a stack variable

==105765== Conditional jump or move depends on uninitialised value(s)
==105765==    at 0x10E763: test_gnc_float_txn_to_txn_swap_accounts (utest-split-register-copy-ops.c:540)
==105765==    by 0x5109675: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x5109BC9: g_test_run_suite (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x5103FFC: g_test_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x10BC6F: main (test-split-register.c:45)
==105765==
==105765== Conditional jump or move depends on uninitialised value(s)
==105765==    at 0x4877C57: gnc_float_txn_to_txn_swap_accounts (split-register-copy-ops.c:433)
==105765==    by 0x10E7E1: test_gnc_float_txn_to_txn_swap_accounts (utest-split-register-copy-ops.c:548)
==105765==    by 0x5109675: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x5109BC9: g_test_run_suite (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x5103FFC: g_test_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x10BC6F: main (test-split-register.c:45)
==105765==
==105765== Conditional jump or move depends on uninitialised value(s)
==105765==    at 0x10EFC1: test_gnc_float_txn_to_txn_swap_accounts (utest-split-register-copy-ops.c:589)
==105765==    by 0x5109675: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x510938A: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x5109BC9: g_test_run_suite (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x5103FFC: g_test_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==105765==    by 0x10BC6F: main (test-split-register.c:45)
2023-06-21 10:36:35 +01:00
Richard Cohen
fa0824e903 Valgrind: fix "Invalid read" - test-vendor
==4031== Invalid read of size 8
==4031==    at 0x4E58C09: gncVendorGetAddr (gncVendor.c:677)
==4031==    by 0x10A7E3: test_vendor (test-vendor.c:97)
...
==4031==  Address 0x7e0c4e8 is 168 bytes inside a block of size 232 free'd
==4031==    at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==4031==    by 0x51526C3: g_type_free_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4031==    by 0x4E58616: gncVendorFree (gncVendor.c:511)
==4031==    by 0x4E58EFF: vendor_free (gncVendor.c:782)
==4031==    by 0x4E8611E: qof_commit_edit_part2 (qofinstance.cpp:1034)
==4031==    by 0x4E58F59: gncVendorCommitEdit (gncVendor.c:788)
==4031==    by 0x4E584EF: gncVendorDestroy (gncVendor.c:483)
==4031==    by 0x10A729: test_vendor (test-vendor.c:80)
...
==4031==  Block was alloc'd at
==4031==    at 0x4848A13: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==4031==    by 0x5033550: g_malloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==4031==    by 0x5157CBC: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4031==    by 0x513F20F: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4031==    by 0x51407B7: g_object_new_with_properties (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4031==    by 0x5141560: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4031==    by 0x4E583CF: gncVendorCreate (gncVendor.c:459)
==4031==    by 0x10A6A5: test_vendor (test-vendor.c:74)
...
2023-06-21 10:36:35 +01:00
Richard Cohen
2168c6f301 Valgrind: fix "Invalid read" - test-employee
==4029== Invalid read of size 8
==4029==    at 0x4E41F15: gncEmployeeGetAddr (gncEmployee.c:642)
==4029==    by 0x10A8A5: test_employee (test-employee.c:97)
...
==4029==  Address 0x7e0c208 is 152 bytes inside a block of size 248 free'd
==4029==    at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==4029==    by 0x51526C3: g_type_free_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4029==    by 0x4E418D5: gncEmployeeFree (gncEmployee.c:477)
==4029==    by 0x4E42144: emp_free (gncEmployee.c:714)
==4029==    by 0x4E8611E: qof_commit_edit_part2 (qofinstance.cpp:1034)
==4029==    by 0x4E4219E: gncEmployeeCommitEdit (gncEmployee.c:721)
==4029==    by 0x4E41823: gncEmployeeDestroy (gncEmployee.c:459)
==4029==    by 0x10A77F: test_employee (test-employee.c:79)
...
==4029==  Block was alloc'd at
==4029==    at 0x4848A13: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==4029==    by 0x5033550: g_malloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==4029==    by 0x5157CBC: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4029==    by 0x513F20F: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4029==    by 0x51407B7: g_object_new_with_properties (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4029==    by 0x5141560: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4029==    by 0x4E416DA: gncEmployeeCreate (gncEmployee.c:434)
==4029==    by 0x10A6FB: test_employee (test-employee.c:73)
...
2023-06-21 10:36:35 +01:00
Richard Cohen
a5513b45d5 Valgrind: fix "Invalid read" - test-customer
==4028== Invalid read of size 8
==4028==    at 0x4E3F641: gncCustomerGetAddr (gncCustomer.c:579)
==4028==    by 0x10A8EE: test_customer (test-customer.c:90)
...
==4028==  Address 0x7e861b8 is 168 bytes inside a block of size 272 free'd
==4028==    at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==4028==    by 0x51526C3: g_type_free_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x4E3EDD6: gncCustomerFree (gncCustomer.c:368)
==4028==    by 0x4E3F57B: cust_free (gncCustomer.c:551)
==4028==    by 0x4E8611E: qof_commit_edit_part2 (qofinstance.cpp:1034)
==4028==    by 0x4E3F5D5: gncCustomerCommitEdit (gncCustomer.c:557)
==4028==    by 0x4E3EC89: gncCustomerDestroy (gncCustomer.c:338)
==4028==    by 0x10A7EC: test_customer (test-customer.c:71)
...
==4028==  Block was alloc'd at
==4028==    at 0x4848A13: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==4028==    by 0x5033550: g_malloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==4028==    by 0x5157CBC: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x513F20F: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x51407B7: g_object_new_with_properties (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x5141560: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x4E3EB0D: gncCustomerCreate (gncCustomer.c:309)
==4028==    by 0x10A768: test_customer (test-customer.c:66)
...

==4028== Invalid read of size 8
==4028==    at 0x4E3F796: gncCustomerGetShipAddr (gncCustomer.c:633)
==4028==    by 0x10A91D: test_customer (test-customer.c:91)
...
==4028==  Address 0x7e86210 is 256 bytes inside a block of size 272 free'd
==4028==    at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==4028==    by 0x51526C3: g_type_free_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x4E3EDD6: gncCustomerFree (gncCustomer.c:368)
==4028==    by 0x4E3F57B: cust_free (gncCustomer.c:551)
==4028==    by 0x4E8611E: qof_commit_edit_part2 (qofinstance.cpp:1034)
==4028==    by 0x4E3F5D5: gncCustomerCommitEdit (gncCustomer.c:557)
==4028==    by 0x4E3EC89: gncCustomerDestroy (gncCustomer.c:338)
==4028==    by 0x10A7EC: test_customer (test-customer.c:71)
...
==4028==  Block was alloc'd at
==4028==    at 0x4848A13: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==4028==    by 0x5033550: g_malloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==4028==    by 0x5157CBC: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x513F20F: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x51407B7: g_object_new_with_properties (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x5141560: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1)
==4028==    by 0x4E3EB0D: gncCustomerCreate (gncCustomer.c:309)
==4028==    by 0x10A768: test_customer (test-customer.c:66)
...
2023-06-21 10:36:35 +01:00
Richard Cohen
a1893ef51b Valgrind: fix "Invalid read" - test-kvp-value
==7520== Invalid read of size 8
==7520==    at 0x4E36DCC: guid_copy (guid.cpp:123)
==7520==    by 0x1E3E62: KvpValueImpl::duplicate(KvpValueImpl const&) (kvp-value.cpp:378)
==7520==    by 0x1E31CC: KvpValueImpl::KvpValueImpl(KvpValueImpl const&) (kvp-value.cpp:36)
==7520==    by 0x1FF6C3: KvpValueTest_Copy_Test::TestBody() (test-kvp-value.cpp:74)
...
==7520==  Address 0x7e10f48 is 8 bytes inside a block of size 16 free'd
==7520==    at 0x4846AFF: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7520==    by 0x4E36D98: guid_free (guid.cpp:115)
==7520==    by 0x1E3D04: void delete_visitor::operator()<_gncGuid*>(_gncGuid*&) (kvp-value.cpp:358)
...
==7520==  Block was alloc'd at
==7520==    at 0x4843FA3: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7520==    by 0x4E36D5C: guid_malloc (guid.cpp:105)
==7520==    by 0x4E36DC3: guid_copy (guid.cpp:122)
==7520==    by 0x4E36EB0: guid_new (guid.cpp:153)
==7520==    by 0x1FF4DB: KvpValueTest_Copy_Test::TestBody() (test-kvp-value.cpp:68)
2023-06-21 10:36:35 +01:00
Richard Cohen
46e6477f88 Refactor: use common code to free the list of guids 2023-06-21 10:36:31 +01:00
Richard Cohen
f1a3f2a8c8 Valgrind: fix "Mismatched free/delete" - test-scm-query etc.
- test-scm-query
- test-print-queries
- test-scm-query-string

==14597== Mismatched free() / delete / delete []
==14597==    at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14597==    by 0x118851: free_random_guids(_GList*) (test-engine-stuff.cpp:1505)
==14597==    by 0x118CF5: get_random_query (test-engine-stuff.cpp:1674)
...
==14597==  Address 0xa1366a0 is 0 bytes inside a block of size 16 alloc'd
==14597==    at 0x4843FA3: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14597==    by 0x5342FA6: guid_malloc (guid.cpp:106)
==14597==    by 0x534300D: guid_copy (guid.cpp:123)
==14597==    by 0x534311F: guid_new (guid.cpp:154)
==14597==    by 0x115D1A: get_random_guid (test-engine-stuff.cpp:207)
==14597==    by 0x1187FA: get_random_guids(int) (test-engine-stuff.cpp:1494)
==14597==    by 0x118CC0: get_random_query (test-engine-stuff.cpp:1668)
...

==15045== Mismatched free() / delete / delete []
==15045==    at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==15045==    by 0x118E96: get_random_query (test-engine-stuff.cpp:1735)
...
==15045==  Address 0xa077d40 is 0 bytes inside a block of size 16 alloc'd
==15045==    at 0x4843FA3: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==15045==    by 0x5342FA6: guid_malloc (guid.cpp:106)
==15045==    by 0x534300D: guid_copy (guid.cpp:123)
==15045==    by 0x534311F: guid_new (guid.cpp:154)
==15045==    by 0x115D1A: get_random_guid (test-engine-stuff.cpp:207)
==15045==    by 0x118E65: get_random_query (test-engine-stuff.cpp:1730)
...
2023-06-21 10:36:25 +01:00
John Ralls
b041a76690 [c++options]Dirty and changed are different.
Report options need to be saved when they're different from the
defaults, book options need to be saved when their value changes
regardless of whether it's the default value. That's dirty. Implement
it.
2023-06-20 14:50:42 -07:00
John Ralls
08d083e8e1 Merge Richard Cohen's 'fix-memory-errors' into stable. 2023-06-20 12:13:45 -07:00
John Ralls
7381887bfc Merge Vincent Dawan's 'bug798952-counters' into stable. 2023-06-20 11:02:17 -07:00
Robert Fewell
0449b73e96 Bug 798960 - Transaction completion horizontal scrolling
When a description popup has long text a horizontal scroll bar will be
used. If a subsequent popup has short text which does not need a scroll
bar, the previous one is still visible so queue a tree view column
resize to reevaluate the need for a scroll bar.
2023-06-20 12:01:49 +01:00
Robert Fewell
59ec7e4613 Change the search text to be up to the cursor position
When editing an existing entry, similar descriptions would not show so
instead of using the whole of the description text to search on just
use the portion up to the cursor.
2023-06-20 12:01:49 +01:00