From 546bb2242100ba32f2c5fabcfb7cfa1fc0e28ba9 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 2 Nov 2015 10:01:11 +0100 Subject: [PATCH 1/2] Workaround for Apple compiler bug causing Eigen compile error --- makepanda/makepanda.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 7758c4df44..3c6e1979f9 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1223,6 +1223,10 @@ def CompileCxx(obj,src,opts): else: cmd += " -fno-exceptions" + if src.endswith(".mm"): + # Work around Apple compiler bug. + cmd += " -U__EXCEPTIONS" + if 'RTTI' not in opts: # We always disable RTTI on Android for memory usage reasons. if optlevel >= 4 or GetTarget() == "android": From bd354a9cde3bc455a3ec8d547308c394d0ac6c89 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 2 Nov 2015 16:41:17 +0100 Subject: [PATCH 2/2] Fix crash on shutdown of buffer in threaded pipeline --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index cd40b52384..290dadfcf5 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -1626,6 +1626,15 @@ report_my_errors(int line, const char *file) { void CLP(GraphicsBuffer):: check_host_valid() { if ((_host == 0)||(!_host->is_valid())) { + _rb_data_size_bytes = 0; + if (_rb_context != NULL) { + // We must delete this object first, because when the GSG + // destructs, so will the tracker that this context is + // attached to. + _rb_context->update_data_size_bytes(0); + delete _rb_context; + _rb_context = NULL; + } _is_valid = false; _gsg.clear(); _host.clear();