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

max images limit 126 patch #41

Open
samhodge opened this issue Jul 3, 2017 · 2 comments
Open

max images limit 126 patch #41

samhodge opened this issue Jul 3, 2017 · 2 comments

Comments

@samhodge
Copy link
Contributor

samhodge commented Jul 3, 2017

see:

https://groups.google.com/d/msg/vsfm/iHtXl7Imfm8/H_XlITLECgAJ

Digging deeper, the error seems to occur on:
jpeg_create_decompress(&cinfo);

(line 36918 of CImg.h), which is a call to libjpeg.

Now for the weird part:
As you can see from the output, the "*" indicate that at least a few images are loaded successfully. The crash always occurs on the same image number, regardless of the dataset! When going through VisualSfM, the error will occur with image #123. When going through the terminal, the crash will always occur at image #126.
If there are less images in the dataset, the algorithm runs through flawlessly. The results are independent of available system RAM.
Furthermore, it seems like the line after "jpeg_create_decompress()" is never executed for any image (when putting debug output, only stuff before that line is outputted, but nothing afterwards).

After taking the above findings into consideration, I suspected that some kind of RAM shortage, a memory leak, or a limit on the number of open files could be the problem. I tried to move the line:
std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
below the libjpeg call (see above). This will stop the crash. I am currently running through the dataset. As it will take a few hours, I will report back if it worked or not.

Just leaving this here as a reminder for me to do a patch for this, my local version has the patch.

@samhodge
Copy link
Contributor Author

Sorry about this guys I will make an effort to do this on the weekend.

@GillianYue
Copy link

I ran into this problem too, except that for me the crash occurs at image #124

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

2 participants