This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via c410d038596cfd83b39c4729dcfaf0e99e3e48b0 (commit)
from 31c7add5cb754ad8250691d0875d4bd7b2cd6341 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/c410d038596cfd83b39c4729dcfaf0e99e3e…
commit c410d038596cfd83b39c4729dcfaf0e99e3e48b0
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Dec 21 12:22:08 2014 +0100
core: Print C stack trace on warnings.
Signed-off-by: Cyril Hrubis <metan(a)ucw.cz>
diff --git a/build/syms/Core_symbols.txt b/build/syms/Core_symbols.txt
index 4a452030..902dbdbd 100644
--- a/build/syms/Core_symbols.txt
+++ b/build/syms/Core_symbols.txt
@@ -78,3 +78,5 @@ SWIG_exception
GP_Gamma8_Linear10
GP_Linear10_Gamma8
+
+GP_DebugPrintCStack
diff --git a/libs/core/GP_Common.c b/libs/core/GP_Common.c
index 1d608ff1..d854cec0 100644
--- a/libs/core/GP_Common.c
+++ b/libs/core/GP_Common.c
@@ -41,7 +41,7 @@
#define GP_ABORT_INFO_TRACE_LEVELS 20
-static void print_c_stack(void)
+void GP_DebugPrintCStack(void)
{
#ifdef HAVE_BACKTRACE
#if GP_ABORT_INFO_TRACE_LEVELS > 0
@@ -86,5 +86,5 @@ void GP_PrintAbortInfo(const char *file, const char *func, unsigned int line,
fprintf(stderr, "n");
print_python_stack();
- print_c_stack();
+ GP_DebugPrintCStack();
}
diff --git a/libs/core/GP_Debug.c b/libs/core/GP_Debug.c
index c53ad513..011b6040 100644
--- a/libs/core/GP_Debug.c
+++ b/libs/core/GP_Debug.c
@@ -104,12 +104,15 @@ void GP_DebugPrint(int level, const char *file, const char *function, int line,
switch (level) {
case GP_DEBUG_FATAL:
+ GP_DebugPrintCStack();
fprintf(stderr, "*** FATAL: %s:%s():%u: ", file, function, line);
break;
case GP_DEBUG_BUG:
+ GP_DebugPrintCStack();
fprintf(stderr, "*** BUG: %s:%s():%u: ", file, function, line);
break;
case GP_DEBUG_WARN:
+ GP_DebugPrintCStack();
fprintf(stderr, "*** WARNING: %s:%s():%u: ", file, function, line);
break;
case GP_DEBUG_TODO:
-----------------------------------------------------------------------
Summary of changes:
build/syms/Core_symbols.txt | 2 ++
libs/core/GP_Common.c | 4 ++--
libs/core/GP_Debug.c | 3 +++
3 files changed, 7 insertions(+), 2 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via 31c7add5cb754ad8250691d0875d4bd7b2cd6341 (commit)
from c104daa309d30c1ffd78acb93d1f451f5224d59e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/31c7add5cb754ad8250691d0875d4bd7b2cd…
commit 31c7add5cb754ad8250691d0875d4bd7b2cd6341
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Thu Dec 18 17:35:21 2014 +0100
loader: Two fixes.
* When GP_LoadImageEx() was introduced one of the return NULL was
changed to return 0 (should have been return 1).
* Do not try file signature based loader if the previous attempt
was aborted from callback
Signed-off-by: Cyril Hrubis <metan(a)ucw.cz>
diff --git a/libs/loaders/GP_Loader.c b/libs/loaders/GP_Loader.c
index c7b13e23..8bc9caf1 100644
--- a/libs/loaders/GP_Loader.c
+++ b/libs/loaders/GP_Loader.c
@@ -379,14 +379,24 @@ int GP_LoadImageEx(const char *src_path,
return 0;
}
+ /*
+ * Operation was aborted, just here exit.
+ */
+ if (errno == ECANCELED)
+ return 1;
+
sig_load = loader_by_signature(src_path);
/*
* Avoid further work if extension matches the signature but image
* couldn't be loaded. Probably unimplemented format or damaged file.
*/
- if (ext_load == sig_load)
- return 0;
+ if (ext_load == sig_load) {
+ GP_WARN("Signature matches extension but file '%s' "
+ "can't be loaded. Unsupported/damaged file?",
+ src_path);
+ return 1;
+ }
if (ext_load && sig_load) {
GP_WARN("File '%s': Extension says %s but signature %s",
-----------------------------------------------------------------------
Summary of changes:
libs/loaders/GP_Loader.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")