Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encounter *** buffer overflow detected ***: terminated while running DensifyPointCloud scene.mvs in release mode #1136

Open
TempContainer opened this issue May 10, 2024 · 8 comments

Comments

@TempContainer
Copy link

Describe the bug
while running DensifyPointCloud scene.mvs imported from colmap in release mode, process terminate with

Geometric-consistent estimated depth-maps 11 (100.00%, 4s, ETA 0ms)... *** buffer overflow detected ***: terminated
Aborted

But everything goes fine in debug mode. I can go through the entire process and get the textured mesh.

To Reproduce

  1. Use SceauxCastle as image datasets.
  2. Use colmap to do sparse reconstruction and undistortion:
DATASET_PATH=.

colmap feature_extractor \
   --database_path $DATASET_PATH/database.db \
   --image_path $DATASET_PATH/images

colmap exhaustive_matcher \
   --database_path $DATASET_PATH/database.db

mkdir $DATASET_PATH/sparse

colmap mapper \
    --database_path $DATASET_PATH/database.db \
    --image_path $DATASET_PATH/images \
    --output_path $DATASET_PATH/sparse

mkdir $DATASET_PATH/dense

colmap image_undistorter \
    --image_path $DATASET_PATH/images \
    --input_path $DATASET_PATH/sparse/0 \
    --output_path $DATASET_PATH/dense \
    --output_type COLMAP \
    --max_image_size 2000
  1. Run InterfaceCOLMAP -i dense -o scene.mvs --image-folder dense/images and DensifyPointCloud scene.mvs.

Desktop (please complete the following information):

  • OS: Ubuntu 24.04 LTS (Linux 5.15.146.1-microsoft-standard-WSL2 (x86_64))
  • Version: 2.3.0

Additional context
ouput log:

DensifyPointCloud scene.mvs
13:34:26 [App     ] OpenMVS x64 v2.3.0
13:34:26 [App     ] Build date: May 10 2024, 13:27:13
13:34:26 [App     ] CPU: 12th Gen Intel(R) Core(TM) i7-12700H (20 cores)
13:34:26 [App     ] RAM: 15.49GB Physical Memory 4.00GB Virtual Memory
13:34:26 [App     ] OS: Linux 5.15.146.1-microsoft-standard-WSL2 (x86_64)
13:34:26 [App     ] Disk: 653.42GB (1000.00GB) space
13:34:26 [App     ] SSE & AVX compatible CPU & OS detected
13:34:26 [App     ] Command line: DensifyPointCloud scene.mvs
13:34:26 [App     ] MapSMtoCores for SM 8.6 is undefined; default to use 64 cores/SM
13:34:26 [App     ] CUDA device 0 initialized: NVIDIA GeForce RTX 3060 Laptop GPU (compute capability 8.6; memory 6.00GB)
13:34:27 [App     ] Camera model loaded: platform 0; camera  0; f 1.009x1.009; poses 11
13:34:27 [App     ] Scene loaded from interface format (20ms):
        11 images (11 calibrated) with a total of 30.95 MPixels (2.81 MPixels/image)
        7921 points, 0 vertices, 0 faces
13:34:27 [App     ] The camera directions mean is unbalanced; the scene will be considered unbounded (no ROI)
13:34:27 [App     ] Point-cloud composed of 7921 points with:
 - visibility info (37842 views - 4.78 views/point):
                0 points with 1- views (0.00%)
              346 points with 2  views (4.37%)
             2692 points with 3  views (33.99%)
             4883 points with 4+ views (61.65%)
        2 min / 4.77743 mean (2.16992 std) / 13 max
13:34:27 [App     ] Preparing images for dense reconstruction completed: 11 images (146ms)
13:34:27 [App     ] Selecting images for dense reconstruction completed: 11 images (5ms)
Geometric-consistent estimated depth-maps 11 (100.00%, 4s, ETA 0ms)... *** buffer overflow detected ***: terminated
Aborted
@bouk
Copy link
Contributor

bouk commented May 31, 2024

Same as this one probably: #1107

@waqarsqureshi
Copy link

could be due to Ubuntu 24.04 LTS

@cogitas3d
Copy link

Similar on my Ubuntu 24.04.

@cdcseacave
Copy link
Owner

someone pls help with a consistent way to reproduce the bug: dataset (preferably small) and command line

@cogitas3d
Copy link

@cdcseacave I discovered an interesting thing, if I increase the value of -d, the process continues and manages to rebuild the model. Apparently the dense cloud of points is much denser than before and this somehow seems to make the program collapse. So the tip is to increase the value of -d until it runs correctly.

@oneleggedredcow
Copy link

I ran into the same issue. I was able to fix the issue by rewriting the formatTime function in libs/Common/Util.h:

	static String formatTime(int64_t sTime, uint32_t nAproximate = 0) {
		uint32_t h = (uint32_t)((sTime%((int64_t)24*3600*1000)) / (3600*1000));
		uint32_t m = (uint32_t)((sTime%((int64_t)3600*1000)) / (60*1000));
		uint32_t s = (uint32_t)((sTime%((int64_t)60*1000)) / (1*1000));
		return String::FormatString("%u:%02u:%02u", h, m, s);
	}

This alters the way the time updates are displayed, but it gets rid of the ** buffer overflow detected ** crash.

@cdcseacave
Copy link
Owner

I ran into the same issue. I was able to fix the issue by rewriting the formatTime function in libs/Common/Util.h:

	static String formatTime(int64_t sTime, uint32_t nAproximate = 0) {
		uint32_t h = (uint32_t)((sTime%((int64_t)24*3600*1000)) / (3600*1000));
		uint32_t m = (uint32_t)((sTime%((int64_t)3600*1000)) / (60*1000));
		uint32_t s = (uint32_t)((sTime%((int64_t)60*1000)) / (1*1000));
		return String::FormatString("%u:%02u:%02u", h, m, s);
	}

This alters the way the time updates are displayed, but it gets rid of the ** buffer overflow detected ** crash.

nice, this was indeed a problem, but I encourage you to always use the develop branch, it had already the fix

@cogitas3d
Copy link

@cdcseacave I build again, the develop branch and it works perfectly, include the Texturemesh, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants