Commit Graph

28024 Commits

Author SHA1 Message Date
Richard Cohen
8ac3ab6065 Valgrind: fix "definitely lost" memory on error path - test-tokenizer
==54518== 147 (16 direct, 131 indirect) bytes in 1 blocks are definitely lost in loss record 246 of 267
==54518==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==54518==    by 0x6349948: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==54518==    by 0x6364C4C: g_slice_alloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==54518==    by 0x632E2EB: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==54518==    by 0x632E580: g_error_new_literal (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==54518==    by 0x632E64B: g_set_error_literal (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==54518==    by 0x632F3DB: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==54518==    by 0x632F9B7: g_file_get_contents (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==54518==    by 0x49E5E35: GncTokenizer::load_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (gnc-tokenizer.cpp:51)
==54518==    by 0x49F27A3: GncFwTokenizer::load_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (gnc-tokenizer-fw.cpp:116)
==54518==    by 0x1920A9: GncTokenizerTest_load_file_nonexisting_Test::TestBody() (test-tokenizer.cpp:93)
2023-07-19 10:29:06 +01:00
Richard Cohen
2640911901 Valgrind: fix "definitely lost/still reachable" memory in test - test-xml2-is-file
Valgrind uses "still reachable" because of the call to exit()

==87185== 94 bytes in 1 blocks are still reachable in loss record 193 of 241
==87185==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==87185==    by 0x15C234: main (test-xml2-is-file.cpp:42)
==87185==
2023-07-19 10:21:30 +01:00
Richard Cohen
d808fddc95 Valgrind: fix "definitely lost" memory in test - test-userdata-dir-invalid-home
==66427== 128 bytes in 1 blocks are definitely lost in loss record 22 of 25
==66427==    at 0x4843738: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==66427==    by 0x49B85EF: g_realloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==66427==    by 0x49D6EF1: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==66427==    by 0x49D6F6F: g_string_sized_new (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==66427==    by 0x499AB00: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==66427==    by 0x499B2D8: g_build_filename (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==66427==    by 0x10A498: main (test-userdata-dir-invalid-home.c:74)
==66427==
2023-07-19 10:21:30 +01:00
Richard Cohen
b7d278556f Valgrind: fix "definitely lost" memory in test - test-string-converters
==68902== 8 bytes in 1 blocks are definitely lost in loss record 7 of 251
==68902==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==68902==    by 0x5225948: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==68902==    by 0x5240ED2: g_strdup (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==68902==    by 0x13135E: g_strdup_inline (gstrfuncs.h:321)
==68902==    by 0x13135E: dom_tree_to_text(_xmlNode*) (sixtp-dom-parsers.cpp:500)
==68902==    by 0x141758: test_bad_string() (test-string-converters.cpp:70)
==68902==    by 0x1417D8: main (test-string-converters.cpp:82)
==68902==
==68902== 93 bytes in 5 blocks are definitely lost in loss record 199 of 251
==68902==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==68902==    by 0x5225948: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==68902==    by 0x5240ED2: g_strdup (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==68902==    by 0x13135E: g_strdup_inline (gstrfuncs.h:321)
==68902==    by 0x13135E: dom_tree_to_text(_xmlNode*) (sixtp-dom-parsers.cpp:500)
==68902==    by 0x14169B: test_string_converters() (test-string-converters.cpp:55)
==68902==    by 0x1417D3: main (test-string-converters.cpp:81)
==68902==
==68902== 260 (120 direct, 140 indirect) bytes in 1 blocks are definitely lost in loss record 242 of 251
==68902==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==68902==    by 0x48D5B84: xmlNewNode (in /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.14)
==68902==    by 0x133873: text_to_dom_tree(char const*, char const*) (sixtp-dom-generators.cpp:53)
==68902==    by 0x141748: test_bad_string() (test-string-converters.cpp:68)
==68902==    by 0x1417D8: main (test-string-converters.cpp:82)
==68902==
==68902== 1,353 (600 direct, 753 indirect) bytes in 5 blocks are definitely lost in loss record 248 of 251
==68902==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==68902==    by 0x48D5B84: xmlNewNode (in /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.14)
==68902==    by 0x133873: text_to_dom_tree(char const*, char const*) (sixtp-dom-generators.cpp:53)
==68902==    by 0x14168B: test_string_converters() (test-string-converters.cpp:54)
==68902==    by 0x1417D3: main (test-string-converters.cpp:81)
==68902==
2023-07-19 10:21:30 +01:00
Richard Cohen
378dc40585 Valgrind: fix "definitely lost" memory in test - test-resolve-file-path
==91379== 19 bytes in 1 blocks are definitely lost in loss record 2 of 9
==91379==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==91379==    by 0x48D1948: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==91379==    by 0x48ED5B0: g_strconcat (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==91379==    by 0x48B845F: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==91379==    by 0x48B869E: g_dir_make_tmp (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==91379==    by 0x10935E: main (test-resolve-file-path.c:71)
2023-07-19 10:21:30 +01:00
Richard Cohen
69df6ea57d Valgrind: fix "definitely lost" memory in test - test-qofquerycore
==87254== 40 (24 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 107 of 242
==87254==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==87254==    by 0x503B948: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==87254==    by 0x502F909: g_list_prepend (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==87254==    by 0x194E83: QofQueryCoreTest_construct_predicate_guid_Test::TestBody() (gtest-qofquerycore.cpp:94)
2023-07-19 10:21:30 +01:00
Richard Cohen
f1e889dbcb Valgrind: fix "definitely lost" memory in test - test-lots
==67054== 320 bytes in 32 blocks are definitely lost in loss record 2,213 of 2,238
==67054==    at 0x4848A13: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==67054==    by 0x503C550: g_malloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==67054==    by 0x118AD8: get_random_transaction_with_currency (test-engine-stuff.cpp:1395)
==67054==    by 0x119897: add_random_transactions_to_book (test-engine-stuff.cpp:1848)
==67054==    by 0x115FE8: run_test() (test-lots.cpp:99)
==67054==    by 0x1160BF: main (test-lots.cpp:135)
==67054==
2023-07-19 10:21:30 +01:00
Richard Cohen
4c48134d91 Valgrind: fix "definitely lost" memory in test - test-import-backend
==66703== 24 bytes in 1 blocks are definitely lost in loss record 116 of 284
==66703==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==66703==    by 0x4A79948: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==66703==    by 0x4A6D909: g_list_prepend (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==66703==    by 0x31EB41: ImportBackendTest::SetUp() (gtest-import-backend.cpp:145)
2023-07-19 10:21:30 +01:00
Richard Cohen
e43982375c Valgrind: fix "definitely lost" memory in test - sqlite3test
==64824== 171 (88 direct, 83 indirect) bytes in 1 blocks are definitely lost in loss record 392 of 418
==64824==    at 0x4843FA3: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==64824==    by 0x528A935: qof_session_new (qofsession.cpp:148)
==64824==    by 0x141832: main (sqlite3test.c:34)
2023-07-19 10:21:30 +01:00
vim
f62097786a
Translation update by vim <dev.getport@slmail.me> using Weblate
po/pl.po: 70.3% (3884 of 5523 strings; 1095 fuzzy)
300 failing checks (5.4%)
Translation: GnuCash/Program (Polish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/pl/

Translation update  by vim <dev.getport@slmail.me> using Weblate

po/pl.po: 69.8% (3858 of 5523 strings; 1120 fuzzy)
310 failing checks (5.6%)
Translation: GnuCash/Program (Polish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/pl/

Co-authored-by: vim <dev.getport@slmail.me>
2023-07-19 00:07:28 +02:00
mocsa
f43a6d9c4b
Translation update by mocsa <csaba@feltoltve.hu> using Weblate
po/hu.po: 69.4% (3836 of 5523 strings; 634 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by mocsa <csaba@feltoltve.hu> using Weblate

po/hu.po: 69.4% (3835 of 5523 strings; 635 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by mocsa <csaba@feltoltve.hu> using Weblate

po/hu.po: 69.4% (3834 of 5523 strings; 635 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by mocsa <csaba@feltoltve.hu> using Weblate

po/hu.po: 69.4% (3833 of 5523 strings; 635 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: mocsa <csaba@feltoltve.hu>
2023-07-18 00:03:39 +02:00
Christopher Lam
1459ccddfb [import-main-matcher] use stl - convert Entries from array to vector
which has nicer iteration sematics.
2023-07-17 07:44:41 +08:00
Christopher Lam
f01047a25d [import-main-matcher.cpp] convert RowInfo to class
which is nicer for creating RowInfo on the stack with automatic memory
management.
2023-07-17 07:44:41 +08:00
Wellington Terumi Uemura
d14c533e90
Translation update by Wellington Terumi Uemura <wellingtonuemura@gmail.com> using Weblate
po/pt_BR.po: 91.6% (5062 of 5523 strings; 305 fuzzy)
132 failing checks (2.3%)
Translation: GnuCash/Program (Portuguese (Brazil))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/pt_BR/

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
2023-07-16 19:17:14 +02:00
vim
b4962e1501
Translation update by vim <dev.getport@slmail.me> using Weblate
po/pl.po: 69.8% (3858 of 5523 strings; 1120 fuzzy)
311 failing checks (5.6%)
Translation: GnuCash/Program (Polish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/pl/

Co-authored-by: vim <dev.getport@slmail.me>
2023-07-16 19:17:14 +02:00
Stephan Paternotte
8e3b6cf1f5
Translation update by Stephan Paternotte <stephan@paternottes.net> using Weblate
po/nl.po: 100.0% (5523 of 5523 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Dutch)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nl/

Co-authored-by: Stephan Paternotte <stephan@paternottes.net>
2023-07-16 19:17:14 +02:00
John Ralls
741ce55b7a Merge Richard Cohen's 'use-g-assert-true-in-tests' into stable. 2023-07-16 10:13:26 -07:00
Richard Cohen
66c5e398ae Change g_assert() -> g_assert_true() in tests
g_assert() can be compiled out, so should not be used for tests

g_assert_true was removed
to fis https://bugs.gnucash.org/show_bug.cgi?id=792008 because
g_assert_true was introduced in glib-2.38 and at the time GnuCash required
only glib-2.26. GnuCash has required glib >= 2.40 since 8acbc41c6 so
g_assert_true can be restored.
2023-07-16 10:09:12 -07:00
John Ralls
583446ade5 Merge Richard Cohen's 'declare-type-app-utils' into stable. 2023-07-16 09:48:22 -07:00
John Ralls
bf7803c054 Merge Richard Cohen's 'declare-type-search-param' into stable. 2023-07-16 09:44:50 -07:00
Christopher Lam
9dd4530dc2 [import-match-picker.cpp] plug leaks 2023-07-17 00:24:28 +08:00
John Ralls
7f56b5cbc4 Merge Richard Cohen's 'declare-type-gnome-utils' into stable. 2023-07-16 09:20:13 -07:00
John Ralls
7a7fb72e80 Merge Richard Cohen's 'declare-type-goffice' into stable. 2023-07-16 09:07:52 -07:00
John Ralls
d624148313 Merge Simon Arlott's 'bug-797507' into stable. 2023-07-16 09:03:56 -07:00
Christopher Lam
7acfa1a9a5 [import-backend.cpp] inline gnc_import_TransInfo_set_match_list
Inline this function which is only used in
gnc_import_TransInfo_remove_top_match.
2023-07-16 23:16:34 +08:00
Christopher Lam
49b47f9da7 Merge branch 'import-cpp' into stable #1706 2023-07-15 10:03:36 +08:00
Christopher Lam
513d5442bb [gnc-ofx-import.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
4c231c5c35 [import-parse.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
96707e5eee [import-utilities.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
5f20e633f2 [import-format-dialog.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
0e48488964 [import-account-matcher.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
e48e6e2af9 [import-commodity-matcher.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
f1c70a00ad [import-settings.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
b0e5316b91 [import-pending-matches.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
243710218c [import-match-picker.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
Christopher Lam
ea6181fdf7 [import-main-matcher.cpp] convert to cpp 2023-07-15 10:02:55 +08:00
John Ralls
c405ba2cc0 Merge Richard Cohen's 'filter-online-test' into stable. 2023-07-14 15:29:59 -07:00
John Ralls
6b1941f0ed Replace yahoo_json with alphavantage in test-gnc-quotes.
Alas, poor yahoo_json. After months of valiant struggle to keep up
with Yahoo!'s moving their API around the Finance::Quote team has
abandoned it, replacing it with a screen saver. Those tend to be
unstable so use alphavantage for testing.
2023-07-14 15:15:53 -07:00
Francisco Serrador
5890543fab
Translation update by Francisco Serrador <fserrador@gmail.com> using Weblate
po/es.po: 100.0% (5523 of 5523 strings; 0 fuzzy)
3 failing checks (0.1%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Co-authored-by: Francisco Serrador <fserrador@gmail.com>
2023-07-13 21:52:23 +02:00
ΑΓΡΟΤΙΚΟΣ ΣΥΝΕΤΑΙΡΙΣΜΟΣ ΤΥΛΙΣΟΥ
e2856a1c5e
Translation update by ΑΓΡΟΤΙΚΟΣ ΣΥΝΕΤΑΙΡΙΣΜΟΣ ΤΥΛΙΣΟΥ <astilisos209@gmail.com> using Weblate
po/el.po: 52.2% (2884 of 5523 strings; 1562 fuzzy)
553 failing checks (10.0%)
Translation: GnuCash/Program (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/el/

Translation update  by ΑΓΡΟΤΙΚΟΣ ΣΥΝΕΤΑΙΡΙΣΜΟΣ ΤΥΛΙΣΟΥ <astilisos209@gmail.com> using Weblate

po/glossary/el.po: 100.0% (216 of 216 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/el/

Translation update  by ΑΓΡΟΤΙΚΟΣ ΣΥΝΕΤΑΙΡΙΣΜΟΣ ΤΥΛΙΣΟΥ <astilisos209@gmail.com> using Weblate

po/el.po: 51.6% (2855 of 5523 strings; 1582 fuzzy)
549 failing checks (9.9%)
Translation: GnuCash/Program (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/el/

Co-authored-by: ΑΓΡΟΤΙΚΟΣ ΣΥΝΕΤΑΙΡΙΣΜΟΣ ΤΥΛΙΣΟΥ <astilisos209@gmail.com>
2023-07-13 21:52:22 +02:00
Stephan Paternotte
dbef287fa4
Translation update by Stephan Paternotte <stephan@paternottes.net> using Weblate
po/nl.po: 100.0% (5523 of 5523 strings; 0 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Dutch)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nl/

Co-authored-by: Stephan Paternotte <stephan@paternottes.net>
2023-07-13 21:52:21 +02:00
Christopher Lam
2a392633ed Bug 798991 - Incorrect Account Name Order in Transaction Report
gnc:string-locale<? uses glib instead of guile string compare
2023-07-11 08:41:09 +08:00
John Ralls
f2d9230299 Improve error reporting on DBI large number test failures.
There are other reasons than the original bug that can cause failure,
get some more information to understand what's going on.
2023-07-10 13:25:10 -07:00
Stephan Paternotte
c8e3dbe26f
Translation update by Stephan Paternotte <stephan@paternottes.net> using Weblate
po/glossary/nl.po: 100.0% (216 of 216 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Dutch)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/nl/

Translation update  by Stephan Paternotte <stephan@paternottes.net> using Weblate

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

Co-authored-by: Stephan Paternotte <stephan@paternottes.net>
2023-07-09 20:18:52 +02:00
Giuseppe Foti
4782dcf8c8
Translation update by Giuseppe Foti <foti.giuseppe@gmail.com> using Weblate
po/it.po: 100.0% (5523 of 5523 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Italian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/it/

Co-authored-by: Giuseppe Foti <foti.giuseppe@gmail.com>
2023-07-09 20:18:52 +02:00
John Ralls
a4e651ebc6 Fix test-gnc-quotes.
Forgot to change the test's date-time to neutral time.
2023-07-09 11:17:44 -07:00
John Ralls
037c2004c3 Include timezone in price-quote date diagnostic messages. 2023-07-08 16:59:16 -07:00
John Ralls
133ac88618 Bug 798982 - GetQuotes crashes if Finance::Quote returns an empty date.
Don't try to construct a date from an empty string.
2023-07-08 16:47:14 -07:00
John Ralls
e20f60361f Bug 799004 - Update of Prices attaches incorrect Date
Using a "close" time of 16:00 is a nice idea except that we don't know
what timezone it is, so it's not terribly useful. Use neutral time
instead so that the date will be right in all timezones.
2023-07-08 16:12:05 -07:00
Christopher Lam
fde47d1c7f Merge Simon Arlott branch 'gnc-numeric-to-string-leaks'into stable #1695 2023-07-08 16:01:20 +08:00