gnucash master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Tue Dec 23 11:53:35 EST 2014
Updated via https://github.com/Gnucash/gnucash/commit/c5698228 (commit)
via https://github.com/Gnucash/gnucash/commit/ca1d5a73 (commit)
via https://github.com/Gnucash/gnucash/commit/4a791328 (commit)
via https://github.com/Gnucash/gnucash/commit/2ceadfa3 (commit)
via https://github.com/Gnucash/gnucash/commit/02acf2b6 (commit)
via https://github.com/Gnucash/gnucash/commit/745ff9e5 (commit)
via https://github.com/Gnucash/gnucash/commit/a537ff05 (commit)
via https://github.com/Gnucash/gnucash/commit/e55e7db9 (commit)
via https://github.com/Gnucash/gnucash/commit/2ef335d9 (commit)
via https://github.com/Gnucash/gnucash/commit/f4481f7d (commit)
via https://github.com/Gnucash/gnucash/commit/a6d7184d (commit)
from https://github.com/Gnucash/gnucash/commit/69355c05 (commit)
commit c56982289717c6286c4aa46d46d045209ddfba12
Merge: 69355c0 ca1d5a7
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Tue Dec 23 17:48:50 2014 +0100
Periodic merge of branch 'maint'
* Bug 740471 - Applying payment to invoice Segmentation fault
* Fix Guile compiled path in environment.in
* Bug 739584 - gnucash-2.6.4 segfaults regularly on transfer
* Adjust #ifdef __clang__ to exclude clang versions > 6
* Replace GNC_HOME/bin with gnc_path_get_bindir().
* Tell Guile (and others) to look in install/lib/gnucash for ligraries.
Conflicts:
src/bin/environment.in
src/engine/test/utest-Account.c
src/engine/test/utest-Split.cpp
src/engine/test/utest-Transaction.c
src/libqof/qof/test/test-gnc-date.c
src/libqof/qof/test/test-qofbook.c
diff --cc src/libqof/qof/test/test-gnc-date.c
index 83b17a5,a610beb..5ee224d
--- a/src/libqof/qof/test/test-gnc-date.c
+++ b/src/libqof/qof/test/test-gnc-date.c
@@@ -87,11 -69,10 +87,11 @@@ test_gnc_localtime (void
// difference between g_date_time and tm->tm_wday)
};
guint ind;
- #ifdef __clang__
+ #if defined(__clang__) && __clang_major__ < 6
#define _func "struct tm *gnc_localtime_r(const time64 *, struct tm *)"
#else
-#define _func "gnc_localtime_r"
+#define _func "tm* gnc_localtime_r(const time64*, tm*)"
+//#define _func "gnc_localtime_r"
#endif
gchar *msg = _func ": assertion " _Q "gdt != NULL' failed";
#undef _func
@@@ -159,11 -140,10 +159,11 @@@ test_gnc_gmtime (void
#endif
};
guint ind;
- #ifdef __clang__
+ #if defined(__clang__) && __clang_major__ < 6
#define _func "struct tm *gnc_gmtime(const time64 *)"
#else
-#define _func "gnc_gmtime"
+#define _func "tm* gnc_gmtime(const time64*)"
+//#define _func "gnc_gmtime"
#endif
gchar *msg = _func ": assertion " _Q "gdt != NULL' failed";
#undef _func
@@@ -1737,11 -1718,10 +1737,11 @@@ test_gnc_timespec_to_iso8601_buff (void
gchar *end;
gchar *logdomain = "qof";
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
- #ifdef __clang__
- #define _func "char *gnc_timespec_to_iso8601_buff(Timespec, char *)"
+ #if defined(__clang__) && __clang_major__ < 6
+ #define _func "gchar *gnc_timespec_to_iso8601_buff(Timespec, char *)"
#else
-#define _func "gnc_timespec_to_iso8601_buff"
+#define _func "char* gnc_timespec_to_iso8601_buff(Timespec, char*)"
+//#define _func "gnc_timespec_to_iso8601_buff"
#endif
gchar *msg = _func ": assertion " _Q "buff != NULL' failed";
#undef _func
diff --cc src/libqof/qof/test/test-qofbook.c
index 81c3cae,ae53b28..bc2f701
--- a/src/libqof/qof/test/test-qofbook.c
+++ b/src/libqof/qof/test/test-qofbook.c
@@@ -601,11 -611,10 +601,11 @@@ test_book_foreach_collection( Fixture *
QofIdType my_type = "my_type", my_type2 = "my_type2";
guint param = (guint) g_test_rand_int();
/* GLib assertion messages which aren't filtered to make clang's output like gcc's */
- #if defined(__clang__)
+ #if defined(__clang__) && __clang_major__ < 6
#define _func "void qof_book_foreach_collection(const QofBook *, QofCollectionForeachCB, gpointer)"
#else
-#define _func "qof_book_foreach_collection"
+#define _func "void qof_book_foreach_collection(const QofBook*, QofCollectionForeachCB, gpointer)"
+//#define _func "qof_book_foreach_collection"
#endif
gchar *msg1 = _func ": assertion " _Q "book' failed";
gchar *msg2 = _func ": assertion " _Q "cb' failed";
commit ca1d5a73829d630009730b107ccd0b4a18687a2d
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Tue Dec 23 17:19:00 2014 +0100
Cherry-pick "Bug 741810 - Compilation fails because of creating .gnucash"
This was meant to go on maint first...
diff --git a/src/core-utils/gnc-filepath-utils.c b/src/core-utils/gnc-filepath-utils.c
index 7e60493..54cdc18 100644
--- a/src/core-utils/gnc-filepath-utils.c
+++ b/src/core-utils/gnc-filepath-utils.c
@@ -299,12 +299,13 @@ gnc_path_find_localized_html_file (const gchar *file_name)
*
* @param dirname The path to check
*/
-static void
-gnc_validate_directory (const gchar *dirname)
+static gboolean
+gnc_validate_directory (const gchar *dirname, gchar **msg)
{
struct stat statbuf;
gint rc;
+ *msg = NULL;
rc = g_stat (dirname, &statbuf);
if (rc)
{
@@ -320,70 +321,72 @@ gnc_validate_directory (const gchar *dirname)
);
if (rc)
{
- g_fprintf(stderr,
+ *msg = g_strdup_printf(
_("An error occurred while creating the directory:\n"
" %s\n"
"Please correct the problem and restart GnuCash.\n"
"The reported error was '%s' (errno %d).\n"),
dirname, g_strerror(errno) ? g_strerror(errno) : "", errno);
- exit(1);
+ return FALSE;
}
g_stat (dirname, &statbuf);
break;
case EACCES:
- g_fprintf(stderr,
+ *msg = g_strdup_printf(
_("The directory\n"
" %s\n"
"exists but cannot be accessed. This program \n"
"must have full access (read/write/execute) to \n"
"the directory in order to function properly.\n"),
dirname);
- exit(1);
+ return FALSE;
case ENOTDIR:
- g_fprintf(stderr,
+ *msg = g_strdup_printf(
_("The path\n"
" %s\n"
"exists but it is not a directory. Please delete\n"
"the file and start GnuCash again.\n"),
dirname);
- exit(1);
+ return FALSE;
default:
- g_fprintf(stderr,
+ *msg = g_strdup_printf(
_("An unknown error occurred when validating that the\n"
" %s\n"
"directory exists and is usable. Please correct the\n"
"problem and restart GnuCash. The reported error \n"
"was '%s' (errno %d)."),
dirname, g_strerror(errno) ? g_strerror(errno) : "", errno);
- exit(1);
+ return FALSE;
}
}
if ((statbuf.st_mode & S_IFDIR) != S_IFDIR)
{
- g_fprintf(stderr,
+ *msg = g_strdup_printf(
_("The path\n"
" %s\n"
"exists but it is not a directory. Please delete\n"
"the file and start GnuCash again.\n"),
dirname);
- exit(1);
+ return FALSE;
}
#ifndef G_OS_WIN32
/* The mode argument is ignored on windows anyway */
if ((statbuf.st_mode & S_IRWXU) != S_IRWXU)
{
- g_fprintf(stderr,
+ *msg = g_strdup_printf(
_("The permissions are wrong on the directory\n"
" %s\n"
"They must be at least 'rwx' for the user.\n"),
dirname);
- exit(1);
+ return FALSE;
}
#endif
+
+ return TRUE;
}
/** @fn const gchar * gnc_dotgnucash_dir ()
@@ -399,6 +402,7 @@ gnc_dotgnucash_dir (void)
{
static gchar *dotgnucash = NULL;
gchar *tmp_dir;
+ gchar *errmsg = NULL;
if (dotgnucash)
return dotgnucash;
@@ -408,26 +412,31 @@ gnc_dotgnucash_dir (void)
if (!dotgnucash)
{
const gchar *home = g_get_home_dir();
- if (!home)
+ if (!home || !gnc_validate_directory(home, &errmsg))
{
- g_warning("Cannot find home directory. Using tmp directory instead.");
+ g_free(errmsg);
+ g_warning("Cannot find suitable home directory. Using tmp directory instead.");
home = g_get_tmp_dir();
}
g_assert(home);
dotgnucash = g_build_filename(home, ".gnucash", (gchar *)NULL);
}
- gnc_validate_directory(dotgnucash);
+ if (!gnc_validate_directory(dotgnucash, &errmsg))
+ exit(1);
/* Since we're in code that is only executed once.... */
tmp_dir = g_build_filename(dotgnucash, "books", (gchar *)NULL);
- gnc_validate_directory(tmp_dir);
+ if (!gnc_validate_directory(tmp_dir, &errmsg))
+ exit(1);
g_free(tmp_dir);
tmp_dir = g_build_filename(dotgnucash, "checks", (gchar *)NULL);
- gnc_validate_directory(tmp_dir);
+ if (!gnc_validate_directory(tmp_dir, &errmsg))
+ exit(1);
g_free(tmp_dir);
- tmp_dir = g_build_filename(dotgnucash, "translog", (gchar *)NULL);
- gnc_validate_directory(tmp_dir);
+ tmp_dir = g_build_filename(tmp_dir, "translog", (gchar *)NULL);
+ if (!gnc_validate_directory(dotgnucash, &errmsg))
+ exit(1);
g_free(tmp_dir);
return dotgnucash;
commit 4a7913289c1cd7e6f00325dc890980db1f32991f
Author: Mike Alexander <mta at umich.edu>
Date: Wed Dec 10 19:16:09 2014 -0500
Tell Guile (and others) to look in install/lib/gnucash for ligraries.
Without this Guile can't find libgncmod-engine and GnuCash won't start,
at least sometimes.
diff --git a/src/bin/environment.in b/src/bin/environment.in
index 68ba017..a4393ae 100644
--- a/src/bin/environment.in
+++ b/src/bin/environment.in
@@ -51,7 +51,7 @@ GUILE_LOAD_PATH={GNC_DATA}/scm;{GUILE_LIBS};{GUILE_LOAD_PATH}
GUILE_LOAD_COMPILED_PATH={GNC_DATA}/scm/ccache/@-GUILE_EFFECTIVE_VERSION-@;{GUILE_COMPILED_LIBS};{GUILE_LOAD_COMPILED_PATH}
# Tell Guile where to find GnuCash specific shared libraries
-GNC_LIBRARY_PATH={SYS_LIB}
+GNC_LIBRARY_PATH={SYS_LIB};{GNC_LIB}
LD_LIBRARY_PATH={GNC_LIBRARY_PATH};{LD_LIBRARY_PATH}
# The same, but for GnuCash on OS X
DYLD_LIBRARY_PATH={GNC_LIBRARY_PATH};{DYLD_LIBRARY_PATH}
commit 2ceadfa3a0b9df9347a6a9759a956264fa997970
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Dec 21 15:47:20 2014 -0800
Replace GNC_HOME/bin with gnc_path_get_bindir().
For consistency with the rest of the function.
diff --git a/src/core-utils/gnc-environment.c b/src/core-utils/gnc-environment.c
index b0f4616..51e74f4 100644
--- a/src/core-utils/gnc-environment.c
+++ b/src/core-utils/gnc-environment.c
@@ -107,17 +107,17 @@ gnc_environment_setup (void)
gsize param_count;
gint i;
gboolean got_keyfile;
- gchar *env_parm, *bin_parm;
+ gchar *env_parm;
/* Export default parameters to the environment */
env_parm = gnc_path_get_prefix();
if (!g_setenv("GNC_HOME", env_parm, FALSE))
g_warning ("Couldn't set/override environment variable GNC_HOME.");
- bin_parm = g_build_filename(env_parm, "bin", NULL);
- if (!g_setenv("GNC_BIN", bin_parm, FALSE))
+ g_free (env_parm);
+ env_parm = gnc_path_get_bindir();
+ if (!g_setenv("GNC_BIN", env_parm, FALSE))
g_warning ("Couldn't set/override environment variable GNC_BIN.");
g_free (env_parm);
- g_free (bin_parm);
env_parm = gnc_path_get_pkglibdir();
if (!g_setenv("GNC_LIB", env_parm, FALSE))
g_warning ("Couldn't set/override environment variable GNC_LIB.");
commit 02acf2b6f459bdb730f0ec0dbe44df5006033077
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Dec 21 12:55:07 2014 -0800
Adjust #ifdef __clang__ to exclude clang versions > 6
This works only with Apple clang; the regular clang is at version 3, but
hasn't been tested for what versions emit what sort of function signatures
to logs.
diff --git a/src/engine/test/utest-Account.c b/src/engine/test/utest-Account.c
index 5d717f0..c027d8b 100644
--- a/src/engine/test/utest-Account.c
+++ b/src/engine/test/utest-Account.c
@@ -462,7 +462,7 @@ test_gnc_account_list_name_violations (Fixture *fixture, gconstpointer pData)
{
guint log_level = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
gchar *log_domain = "gnc.engine";
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "GList *gnc_account_list_name_violations(QofBook *, const gchar *)"
#else
#define _func "gnc_account_list_name_violations"
@@ -749,7 +749,7 @@ test_xaccCloneAccount (Fixture *fixture, gconstpointer pData)
Account *clone;
QofBook *book = gnc_account_get_book (fixture->acct);
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "Account *xaccCloneAccount(const Account *, QofBook *)"
#else
#define _func "xaccCloneAccount"
@@ -852,7 +852,7 @@ test_xaccFreeAccount (Fixture *fixture, gconstpointer pData)
{
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
#else
#define _func "xaccTransGetSplitIndex"
@@ -966,7 +966,7 @@ test_xaccAccountCommitEdit (Fixture *fixture, gconstpointer pData)
{
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
#else
#define _func "xaccTransGetSplitIndex"
@@ -1083,7 +1083,7 @@ test_gnc_account_insert_remove_split (Fixture *fixture, gconstpointer pData)
Split *split3 = xaccMallocSplit (book);
TestSignal sig1, sig2, sig3;
AccountPrivate *priv = fixture->func->get_private (fixture->acct);
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "gboolean gnc_account_insert_split(Account *, Split *)"
#else
#define _func "gnc_account_insert_split"
diff --git a/src/engine/test/utest-Split.c b/src/engine/test/utest-Split.c
index b1da99b..d3dcc6e 100644
--- a/src/engine/test/utest-Split.c
+++ b/src/engine/test/utest-Split.c
@@ -1269,7 +1269,7 @@ test_get_corr_account_split (Fixture *fixture, gconstpointer pData)
Account *acc1 = xaccMallocAccount (book);
Account *acc2 = xaccMallocAccount (book);
Account *acc3 = xaccMallocAccount (book);
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "gboolean get_corr_account_split(const Split *, const Split **)"
#else
#define _func "get_corr_account_split"
diff --git a/src/engine/test/utest-Transaction.c b/src/engine/test/utest-Transaction.c
index 704b667..0ef350d 100644
--- a/src/engine/test/utest-Transaction.c
+++ b/src/engine/test/utest-Transaction.c
@@ -486,7 +486,7 @@ test_xaccMallocTransaction (Fixture *fixture, gconstpointer pData)
QofBook *book = qof_book_new ();
TestSignal sig1 = test_signal_new (NULL, QOF_EVENT_CREATE,NULL);
Transaction *txn;
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "Transaction *xaccMallocTransaction(QofBook *)"
#else
#define _func "xaccMallocTransaction"
@@ -1272,7 +1272,7 @@ xaccTransGetAccountBalance (const Transaction *trans,// C: 1 Local: 0:0:0
static void
test_xaccTransGetAccountBalance (Fixture *fixture, gconstpointer pData)
{
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "gnc_numeric xaccTransGetAccountBalance(const Transaction *, const Account *)"
#else
#define _func "xaccTransGetAccountBalance"
diff --git a/src/libqof/qof/test/test-gnc-date.c b/src/libqof/qof/test/test-gnc-date.c
index d22728e..a610beb 100644
--- a/src/libqof/qof/test/test-gnc-date.c
+++ b/src/libqof/qof/test/test-gnc-date.c
@@ -69,7 +69,7 @@ test_gnc_localtime (void)
// difference between g_date_time and tm->tm_wday)
};
guint ind;
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "struct tm *gnc_localtime_r(const time64 *, struct tm *)"
#else
#define _func "gnc_localtime_r"
@@ -140,7 +140,7 @@ test_gnc_gmtime (void)
#endif
};
guint ind;
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "struct tm *gnc_gmtime(const time64 *)"
#else
#define _func "gnc_gmtime"
@@ -1718,7 +1718,7 @@ test_gnc_timespec_to_iso8601_buff (void)
gchar *end;
gchar *logdomain = "qof";
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "gchar *gnc_timespec_to_iso8601_buff(Timespec, char *)"
#else
#define _func "gnc_timespec_to_iso8601_buff"
diff --git a/src/libqof/qof/test/test-qofbook.c b/src/libqof/qof/test/test-qofbook.c
index 8f3f2fd..ae53b28 100644
--- a/src/libqof/qof/test/test-qofbook.c
+++ b/src/libqof/qof/test/test-qofbook.c
@@ -611,7 +611,7 @@ test_book_foreach_collection( Fixture *fixture, gconstpointer pData )
QofIdType my_type = "my_type", my_type2 = "my_type2";
guint param = (guint) g_test_rand_int();
/* GLib assertion messages which aren't filtered to make clang's output like gcc's */
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ < 6
#define _func "void qof_book_foreach_collection(const QofBook *, QofCollectionForeachCB, gpointer)"
#else
#define _func "qof_book_foreach_collection"
commit 745ff9e519a42bd43bce840d532836fa5e8aaf53
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Dec 21 12:34:32 2014 -0800
Bug 739584 - gnucash-2.6.4 segfaults regularly on transfer .
Ensure that xferData is nulled after free and that client functions check
for the NULL.
diff --git a/src/gnome-utils/dialog-transfer.c b/src/gnome-utils/dialog-transfer.c
index ccb999d..bd1cda6 100644
--- a/src/gnome-utils/dialog-transfer.c
+++ b/src/gnome-utils/dialog-transfer.c
@@ -184,6 +184,7 @@ static gnc_numeric
gnc_xfer_dialog_compute_price (XferDialog *xferData)
{
gnc_numeric from_amt, to_amt;
+ g_return_val_if_fail (xferData != NULL, gnc_numeric_error (GNC_ERROR_ARG));
from_amt = gnc_amount_edit_get_amount(GNC_AMOUNT_EDIT(xferData->amount_edit));
to_amt = gnc_amount_edit_get_amount(GNC_AMOUNT_EDIT(xferData->to_amount_edit));
@@ -353,6 +354,7 @@ gnc_xfer_dialog_curr_acct_activate(XferDialog *xferData)
Account *from_account;
gboolean curr_active;
+ g_return_if_fail (xferData != NULL);
from_account =
gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_FROM);
@@ -395,6 +397,7 @@ void
price_amount_radio_toggled_cb(GtkToggleButton *togglebutton, gpointer data)
{
XferDialog *xferData = data;
+ g_return_if_fail (xferData != NULL);
gtk_widget_set_sensitive(xferData->price_edit, gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON(xferData->price_radio)));
@@ -536,6 +539,7 @@ gnc_xfer_dialog_fill_tree_view(XferDialog *xferData,
AccountTreeFilterInfo *info;
GtkBuilder *builder = g_object_get_data (G_OBJECT (xferData->dialog), "builder");
+ g_return_if_fail (xferData != NULL);
use_accounting_labels = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL,
GNC_PREF_ACCOUNTING_LABELS);
@@ -620,6 +624,7 @@ static void
gnc_parse_error_dialog (XferDialog *xferData, const char *error_string)
{
const char * parse_error_string;
+ g_return_if_fail (xferData != NULL);
parse_error_string = gnc_exp_parser_error_string ();
if (parse_error_string == NULL)
@@ -777,6 +782,8 @@ gnc_xfer_description_insert_cb(GtkEditable *editable,
const gchar *match_str;
gint prefix_len, new_text_len, match_str_len;
+ g_return_if_fail (xferData != NULL);
+
if (insert_text_len <= 0)
return;
@@ -918,6 +925,7 @@ gnc_xfer_amount_update_cb(GtkWidget *widget, GdkEventFocus *event,
gpointer data)
{
XferDialog * xferData = data;
+ g_return_val_if_fail (xferData != NULL, FALSE);
gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (xferData->amount_edit));
@@ -1363,6 +1371,7 @@ gnc_xfer_dialog_response_cb (GtkDialog *dialog, gint response, gpointer data)
Split *from_split;
Split *to_split;
+ g_return_if_fail (xferData != NULL);
ENTER(" ");
if (response == GTK_RESPONSE_APPLY)
@@ -1695,6 +1704,7 @@ gnc_xfer_dialog_close_cb(GtkDialog *dialog, gpointer data)
g_source_remove (xferData->desc_selection_source_id);
g_free(xferData);
+ xferData = NULL;
DEBUG("xfer dialog destroyed");
}
commit a537ff052b0b61f7c776bc265d87a2139cd45687
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Dec 21 11:13:27 2014 -0800
Fix Guile compiled path in environment.in
Compiled files go to prefix/lib/guile/2.0/ccache, which isn't the same as
where the source files are stored (prefix/share/guile/2.0), so provide a
separate variable for it. Also don't throw away the user's value of
GUILE_LOAD_COMPILED_PATH in favor of GUILE_LOAD_PATH.
diff --git a/src/bin/environment.in b/src/bin/environment.in
index 333525d..68ba017 100644
--- a/src/bin/environment.in
+++ b/src/bin/environment.in
@@ -41,11 +41,14 @@ GNC_MODULE_PATH={GNC_LIB};{GNC_MODULE_PATH}
# Prevent embedded guile from issuing deprecation warnings
GUILE_WARN_DEPRECATED=no
-# Tell Guile where to find GnuCash specific guile modules
-# GUILE_LIBS can be used to override the path to Guile's own modules
+# Tell Guile where to find GnuCash specific guile modules GUILE_LIBS
+# can be used to override the path to Guile's own modules; likewise,
+# GUILE_COMPILED_LIBS overrides the path to Guile's precompiled
+# modules.
# GUILE_LIBS=
+# GUILE_COMPILED_LIBS=
GUILE_LOAD_PATH={GNC_DATA}/scm;{GUILE_LIBS};{GUILE_LOAD_PATH}
-GUILE_LOAD_COMPILED_PATH={GNC_DATA}/scm/ccache/@-GUILE_EFFECTIVE_VERSION-@;{GUILE_LIBS};{GUILE_LOAD_PATH}
+GUILE_LOAD_COMPILED_PATH={GNC_DATA}/scm/ccache/@-GUILE_EFFECTIVE_VERSION-@;{GUILE_COMPILED_LIBS};{GUILE_LOAD_COMPILED_PATH}
# Tell Guile where to find GnuCash specific shared libraries
GNC_LIBRARY_PATH={SYS_LIB}
commit e55e7db9fd47611c2266f33939dc32715314092d
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Dec 21 11:09:21 2014 -0800
Remove note from the top of environment.in. It's obsolete.
diff --git a/src/bin/environment.in b/src/bin/environment.in
index eef7194..333525d 100644
--- a/src/bin/environment.in
+++ b/src/bin/environment.in
@@ -1,8 +1,3 @@
- at -NOTE If you make any changes here, you should probably -@
- at -NOTE also change the equivalent sections in: -@
- at -NOTE - src/bin/gnucash-launcher.in -@
- at -NOTE - packaging/win32/gnucash.iss.in -@
- at -NOTE - packaging/win32/install.sh -@
# environment
#
# This configuration file can be used to change/add environment variables
commit 2ef335d9c70f41927d10c3379b39802096994f5e
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Sat Dec 6 13:53:34 2014 +0100
Bug 740471 - Applying payment to invoice Segmentation fault
Stop listening for gui update events while on the way out
(after the ok button was pressed).
diff --git a/src/business/business-gnome/dialog-payment.c b/src/business/business-gnome/dialog-payment.c
index 3767f37..298cb69 100644
--- a/src/business/business-gnome/dialog-payment.c
+++ b/src/business/business-gnome/dialog-payment.c
@@ -649,6 +649,17 @@ gnc_payment_ok_cb (GtkWidget *widget, gpointer data)
* and amount so we can proceed with the payment.
* Note: make sure it's called before all entry points to this function !
*/
+
+ /* We're on our way out, stop watching for object changes that could
+ * trigger a gui refresh. Without this the gui suspend/resume
+ * pair could still trigger a gui update on the payment dialog
+ * before we close it. This is undesired because the lots may be in
+ * an inconsistent state until after all events are handled. So
+ * the gui refresh may result in a crash.
+ * See https://bugzilla.gnome.org/show_bug.cgi?id=740471
+ */
+ gnc_gui_component_clear_watches (pw->component_id);
+
gnc_suspend_gui_refresh ();
{
const char *memo, *num;
commit f4481f7dcfbde5643c64851a950a8dad683c4176
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Sat Dec 6 13:52:36 2014 +0100
Bug 740471 - Applying payment to invoice Segmentation fault
Clear selection before emptying list store to prevent
the code from running calculations on a changing list.
diff --git a/src/business/business-gnome/dialog-payment.c b/src/business/business-gnome/dialog-payment.c
index 5cc09e5..3767f37 100644
--- a/src/business/business-gnome/dialog-payment.c
+++ b/src/business/business-gnome/dialog-payment.c
@@ -348,6 +348,7 @@ void
gnc_payment_window_fill_docs_list (PaymentWindow *pw)
{
GtkListStore *store;
+ GtkTreeSelection *selection;
GList *list = NULL, *node;
g_return_if_fail (pw->docs_list_tree_view && GTK_IS_TREE_VIEW(pw->docs_list_tree_view));
@@ -358,6 +359,8 @@ gnc_payment_window_fill_docs_list (PaymentWindow *pw)
&pw->owner, NULL);
/* Clear the existing list */
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(pw->docs_list_tree_view));
+ gtk_tree_selection_unselect_all (selection);
store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(pw->docs_list_tree_view)));
gtk_list_store_clear(store);
commit a6d7184d830d8a8bc0c339d012ac17c249a40994
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Sat Dec 6 13:21:00 2014 +0100
Bug 740471 - Applying payment to invoice Segmentation fault
Attempt to fix it by no longer nullifying lots during processing
diff --git a/src/engine/gncOwner.c b/src/engine/gncOwner.c
index 25fa682..70f41db 100644
--- a/src/engine/gncOwner.c
+++ b/src/engine/gncOwner.c
@@ -1232,12 +1232,11 @@ void gncOwnerAutoApplyPaymentsWithLots (const GncOwner *owner, GList *lots)
* Note that due to the iterative nature of this function lots
* in the list may become empty/closed before they are evaluated as
* base lot, so we should check this for each lot. */
- if (!left_lot)
+ if (!left_lot || qof_instance_get_destroying (left_lot))
continue;
if (gnc_lot_count_splits (left_lot) == 0)
{
gnc_lot_destroy (left_lot);
- left_iter->data = NULL;
continue;
}
if (gnc_lot_is_closed (left_lot))
@@ -1263,12 +1262,11 @@ void gncOwnerAutoApplyPaymentsWithLots (const GncOwner *owner, GList *lots)
* Note that due to the iterative nature of this function lots
* in the list may become empty/closed before they are evaluated as
* base lot, so we should check this for each lot. */
- if (!right_lot)
+ if (!right_lot || qof_instance_get_destroying (right_lot))
continue;
if (gnc_lot_count_splits (right_lot) == 0)
{
gnc_lot_destroy (right_lot);
- right_iter->data = NULL;
continue;
}
if (gnc_lot_is_closed (right_lot))
Summary of changes:
src/bin/environment.in | 12 ++++++------
src/business/business-gnome/dialog-payment.c | 14 ++++++++++++++
src/core-utils/gnc-environment.c | 8 ++++----
src/engine/gncOwner.c | 6 ++----
src/engine/test/utest-Account.c | 10 +++++-----
src/engine/test/utest-Split.cpp | 2 +-
src/engine/test/utest-Transaction.c | 4 ++--
src/gnome-utils/dialog-transfer.c | 10 ++++++++++
src/libqof/qof/test/test-gnc-date.c | 8 ++++----
src/libqof/qof/test/test-qofbook.c | 2 +-
10 files changed, 49 insertions(+), 27 deletions(-)
More information about the gnucash-changes
mailing list