From f2fff2f469d1118ce76853380456c08ae45c609c Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Thu, 13 Aug 2020 14:15:08 +0300
Subject: [PATCH] Attempt exception catch in triangles

---
 components/renderers/cpp/src/CUDARender.cpp        | 4 ++++
 components/streams/src/renderers/openvr_render.cpp | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/components/renderers/cpp/src/CUDARender.cpp b/components/renderers/cpp/src/CUDARender.cpp
index 1ed37cca6..d70b43272 100644
--- a/components/renderers/cpp/src/CUDARender.cpp
+++ b/components/renderers/cpp/src/CUDARender.cpp
@@ -302,6 +302,7 @@ void CUDARender::_mesh(ftl::rgbd::Frame &out, const Eigen::Matrix4d &t, cudaStre
 
 		depth_out_.to_gpumat().setTo(cv::Scalar(1000.0f), cvstream);
 
+		try {
 		// Decide on and render triangles around each point
 		ftl::cuda::triangle_render1(
 			depthbuffer,
@@ -309,6 +310,9 @@ void CUDARender::_mesh(ftl::rgbd::Frame &out, const Eigen::Matrix4d &t, cudaStre
 			screenbuffer,
 			params_, stream
 		);
+		} catch (const std::exception &e) {
+			LOG(ERROR) << "TRIANGLE EX: " << e.what();
+		}
 
 		// TODO: Reproject here
 		// And merge based upon weight adjusted distances
diff --git a/components/streams/src/renderers/openvr_render.cpp b/components/streams/src/renderers/openvr_render.cpp
index 9aa104b95..adcf37117 100644
--- a/components/streams/src/renderers/openvr_render.cpp
+++ b/components/streams/src/renderers/openvr_render.cpp
@@ -340,7 +340,6 @@ bool OpenVRRender::retrieve(ftl::data::Frame &frame_out) {
 			}
 
 			rgbdframe.setPose() = initial_pose_*viewPose;
-			LOG(INFO) << "VR POSE = " << rgbdframe.getPose();
 
 		} else {
 			LOG(ERROR) << "No VR Pose";
-- 
GitLab