CUDA error code 700 "cudaDeviceSynchronize"

Hi, I’m trying to use ScalableFusionCuda example in demo folder of https://github.com/theNded/Open3D.git and I use the data in the TestData folder.
But an error occurs:
CUDA error at /home/stereye/Open3D/src/Cuda/Integration/ScalableMeshVolumeCudaKernel.cuh:65 code=700(cudaErrorIllegalAddress) “cudaDeviceSynchronize()”
free():invalid size

My work environment:
Ubuntu18.04 RTX2070

Here is my code:

#include
#include

#include <Open3D/Open3D.h>
#include <Cuda/Open3DCuda.h>

#include “Utils.h”

using namespace open3d;
using namespace open3d::camera;
using namespace open3d::io;
using namespace open3d::geometry;
using namespace open3d::utility;

int main(int argc, char *argv[]) {
using namespace open3d;

std::string base_path = "/home/stereye/Open3D/examples/TestData/RGBD/";
auto camera_trajectory = CreatePinholeCameraTrajectoryFromFile(base_path + "trajectory.log");
auto rgbd_filenames = ReadDataAssociation(base_path + "rgbd.match");

int index = 0;
cuda::PinholeCameraIntrinsicCuda intrinsics(
    PinholeCameraIntrinsicParameters::PrimeSenseDefault);

float voxel_length = 0.01f;
cuda::TransformCuda extrinsics = cuda::TransformCuda::Identity();
cuda::ScalableTSDFVolumeCuda tsdf_volume(
    8, voxel_length, 3 * voxel_length, extrinsics);

Image depth, color;
cuda::RGBDImageCuda rgbd(640, 480, 4.0f, 5000.0f);
cuda::ScalableMeshVolumeCuda mesher(cuda::VertexWithNormalAndColor, 8,
                                    120000);

std::shared_ptr<cuda::TriangleMeshCuda>
    mesh = std::make_shared<cuda::TriangleMeshCuda>();
Timer timer;
for (int i = 0; i < rgbd_filenames.size() - 1; ++i) {
    LogDebug("Processing frame {} ...\n", index);
    ReadImage(base_path + rgbd_filenames[i].first, depth);
    ReadImage(base_path + rgbd_filenames[i].second, color);
    rgbd.Upload(depth, color);

    /* Use ground truth trajectory */
    Eigen::Matrix4d extrinsic =
        camera_trajectory->parameters_[index].extrinsic_.inverse();

    extrinsics.FromEigen(extrinsic);
    tsdf_volume.Integrate(rgbd, intrinsics, extrinsics);

    timer.Start();
    mesher.MarchingCubes(tsdf_volume);
    timer.Stop();

    *mesh = mesher.mesh();
    index++;
}

}
For some unknown reason, I can’t use the visualizer, it will cause another error. Since I’m new to Cuda, it’s hard for me to debug.
Thank you a lot if someone could help me.

Hi, this is an unofficial repo developed by me, so it can be pretty buggy – I haven’t maintained the examples for a while. Will let you know asap when I get time to fix this. Thanks!