From 5ef5ab91a27149812c46130442ae207ab98ca8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=BCnther?= Date: Fri, 6 Sep 2024 09:38:33 +0200 Subject: [PATCH 1/2] CI: Enable artifacts for ARM-test --- .github/workflows/ci.linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.linux.yml b/.github/workflows/ci.linux.yml index 48d1eda96..858440754 100644 --- a/.github/workflows/ci.linux.yml +++ b/.github/workflows/ci.linux.yml @@ -374,7 +374,7 @@ jobs: artifact-in: build-ubuntu2204-arm artifact-out: test-ubuntu2204-arm artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* - #artifact-on-failure: true + artifact-on-failure: true test-tutorials: needs: build-centos8 From a80f13c5d368ed045f9728af16958db31dab093b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=BCnther?= Date: Mon, 9 Sep 2024 10:42:41 +0200 Subject: [PATCH 2/2] Fix segfault when numPrimitives() if called before commit() --- modules/cpu/geometry/Curves.cpp | 2 +- modules/cpu/geometry/Isosurfaces.cpp | 2 +- modules/cpu/geometry/Mesh.cpp | 2 +- modules/cpu/geometry/Subdivision.cpp | 2 +- .../ospray/geometry/BilinearPatches.cpp | 4 +++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/cpu/geometry/Curves.cpp b/modules/cpu/geometry/Curves.cpp index 9455f5c1f..5d391aed3 100644 --- a/modules/cpu/geometry/Curves.cpp +++ b/modules/cpu/geometry/Curves.cpp @@ -167,7 +167,7 @@ void Curves::commit() size_t Curves::numPrimitives() const { - return indexData->size(); + return indexData ? indexData->size() : 0; } void Curves::createEmbreeGeometry() diff --git a/modules/cpu/geometry/Isosurfaces.cpp b/modules/cpu/geometry/Isosurfaces.cpp index 33cee91e8..7a1569cb7 100644 --- a/modules/cpu/geometry/Isosurfaces.cpp +++ b/modules/cpu/geometry/Isosurfaces.cpp @@ -85,7 +85,7 @@ void Isosurfaces::commit() size_t Isosurfaces::numPrimitives() const { - return isovaluesData->size(); + return isovaluesData ? isovaluesData->size() : 0; } } // namespace ospray diff --git a/modules/cpu/geometry/Mesh.cpp b/modules/cpu/geometry/Mesh.cpp index 98b3a62ae..73399a123 100644 --- a/modules/cpu/geometry/Mesh.cpp +++ b/modules/cpu/geometry/Mesh.cpp @@ -205,7 +205,7 @@ void Mesh::commit() size_t Mesh::numPrimitives() const { - return indexData->size(); + return indexData ? indexData->size() : 0; } } // namespace ospray diff --git a/modules/cpu/geometry/Subdivision.cpp b/modules/cpu/geometry/Subdivision.cpp index 2c6cce65a..d3887483a 100644 --- a/modules/cpu/geometry/Subdivision.cpp +++ b/modules/cpu/geometry/Subdivision.cpp @@ -175,7 +175,7 @@ void Subdivision::commit() size_t Subdivision::numPrimitives() const { - return facesData->size(); + return facesData ? facesData->size() : 0; } } // namespace ospray diff --git a/modules/pluggableGeometryExample/ospray/geometry/BilinearPatches.cpp b/modules/pluggableGeometryExample/ospray/geometry/BilinearPatches.cpp index 7734e7ac6..ebd11d8c8 100644 --- a/modules/pluggableGeometryExample/ospray/geometry/BilinearPatches.cpp +++ b/modules/pluggableGeometryExample/ospray/geometry/BilinearPatches.cpp @@ -46,7 +46,9 @@ void BilinearPatches::commit() size_t BilinearPatches::numPrimitives() const { - return patchesData->size() * sizeOf(patchesData->type) / sizeof(ispc::Patch); + return patchesData + ? patchesData->size() * sizeOf(patchesData->type) / sizeof(ispc::Patch) + : 0; } } // namespace blp