alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.14k stars 1.08k forks source link

Crash of aliceVision_incrementalSfM.exe (due to reparse point/junction) #1139

Closed butscher closed 3 years ago

butscher commented 3 years ago

Describe the bug aliceVision_incrementalSfM.exe crashes when started by Meshroom

To Reproduce Tested with the dataset_monstree (all three variants) from https://github.com/alicevision/dataset_monstree

  1. Import all images of the variant
  2. Run the default pipeline for photogrammetry with default settings until or after "StructureFromMotion" node. It doesn't matter if the project is saved to a file beforehand or not.
  3. With the start of "StructureFromMotion" a message from Windows appears that "aliceVision_incrementalSfM.exe" crashed and Meshroom shows a red bar to indicate an error.

Expected behavior No crash

Log

Windows 7 crash info (unfortunately in German). I think the important information is that the crash happened in module "ucrtbase.DLL" with exception code 40000015

Problemsignatur:
  Problemereignisname:  APPCRASH
  Anwendungsname:   aliceVision_incrementalSfM.exe
  Anwendungsversion:    2.1.0.0
  Anwendungszeitstempel:    5f862ff7
  Fehlermodulname:  ucrtbase.DLL
  Fehlermodulversion:   10.0.14393.2990
  Fehlermodulzeitstempel:   5caeb96f
  Ausnahmecode: 40000015
  Ausnahmeoffset:   000000000006e01f
  Betriebsystemversion: 6.1.7601.2.1.0.256.48
  Gebietsschema-ID: 1031
  Zusatzinformation 1:  d461
  Zusatzinformation 2:  d461a8df17737e919ecbb96d98cf9327
  Zusatzinformation 3:  5644
  Zusatzinformation 4:  5644c7f1fe7afe1e81ebf59dbbb8096f

Log of the "aliceVision_incrementalSfM.exe" call (with mini3 image set):

Program called with the following parameters:
 * describerTypes = "sift"
 * extraInfoFolder = "C:/Users/Butscher/AppData/Local/Temp/MeshroomCache/StructureFromMotion/d2df32c28b2399487249cd3b182cff11b406be14"
 * featuresFolders =  = [C:/Users/Butscher/AppData/Local/Temp/MeshroomCache/FeatureExtraction/f97c0197c7cf17e2aa79c04451e1fcabeb11fa70]
 * filterTrackForks = 0
 * initialPairA = ""
 * initialPairB = ""
 * input = "C:/Users/Butscher/AppData/Local/Temp/MeshroomCache/CameraInit/46797485314ee2f381c3c04e7a7a03ecb22ec9ef/cameraInit.sfm"
 * interFileExtension = ".abc"
 * localBAGraphDistance = 1
 * localizerEstimator =  Unknown Type "enum aliceVision::robustEstimation::ERobustEstimator"
 * localizerEstimatorError = 0
 * localizerEstimatorMaxIterations = 4096
 * lockAllIntrinsics = 0
 * lockScenePreviouslyReconstructed = 0
 * matchesFolders =  = [C:/Users/Butscher/AppData/Local/Temp/MeshroomCache/FeatureMatching/cb4bc83b0d93be04b7b0846f55d58f78987e0262]
 * maxAngleInitialPair = 40
 * maxNumberOfMatches = 0
 * maxReprojectionError = 4
 * minAngleForLandmark = 2
 * minAngleForTriangulation = 3
 * minAngleInitialPair = 5
 * minInputTrackLength = 2
 * minNumberOfMatches = 0
 * minNumberOfObservationsForTriangulation = 2
 * observationConstraint =  Unknown Type "enum aliceVision::sfm::EFeatureConstraint"
 * output = "C:/Users/Butscher/AppData/Local/Temp/MeshroomCache/StructureFromMotion/d2df32c28b2399487249cd3b182cff11b406be14/sfm.abc"
 * outputViewsAndPoses = "C:/Users/Butscher/AppData/Local/Temp/MeshroomCache/StructureFromMotion/d2df32c28b2399487249cd3b182cff11b406be14/cameras.sfm"
 * useLocalBA = 1
 * useOnlyMatchesFromInputFolder = 0
 * useRigConstraint = 1
 * verboseLevel = "info"

Loading features
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
[17:09:44.132176][info] Supported CUDA-Enabled GPU detected.

Desktop (please complete the following and other pertinent information): OS: Windows 7 SP1 64bit Meshroom prebuilt binary release 2020.1.1

Graphics card information from the log of FeatureExtraction step:

Device information:
    - id:                      0
    - name:                    GeForce GTX 1050 Ti
    - compute capability:      6.1
    - total device memory:     4096 MB 
    - device memory available: 3450 MB 
    - per-block shared memory: 49152
    - warp size:               32
    - max threads per block:   1024
    - max threads per SM(X):   2048
    - max block sizes:         {1024,1024,64}
    - max grid sizes:          {2147483647,65535,65535}
    - max 2D array texture:    {131072,65536}
    - max 3D array texture:    {16384,16384,16384}
    - max 2D linear texture:   {131072,65000,2097120}
    - max 2D layered texture:  {32768,32768,2048}
    - number of SM(x)s:        6
    - registers per SM(x):     65536
    - registers per block:     65536
    - concurrent kernels:      yes
    - mapping host memory:     yes
    - unified addressing:      yes
    - texture alignment:       512 byte
    - pitch alignment:         32 byte
natowi commented 3 years ago

Probably the same issue as https://github.com/alicevision/meshroom/issues/1088

butscher commented 3 years ago

You may know this better but I don't see a connection between a crash in FeatureExtraction step and one in StructureFromMotion step.

natowi commented 3 years ago

The connection is the crash in module "ucrtbase.DLL"

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

natowi commented 3 years ago

Does the error persist with the latest release?

butscher commented 3 years ago

2021.1.0 fails in nearly exactly the same way except that the numbers in the additional information ("Zusatzinformation") 1 to 4 are different.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue is closed due to inactivity. Feel free to re-open if new information is available.

butscher commented 3 years ago

I found the reason for the crash:

I had created a junction (aka reparse point) at my "C:\Users\Butscher\AppData\Local\Temp" to a path on another volume. It seems that "aliceVision_incrementalSfM.exe" just can't handle that. When I replaced the "Temp" junction with a usual folder everything worked fine.

I will now try to workaround this problem by setting environment variables because I actually don't have enough space on C: for all temporary data.

It would be nice to have a setting in Meshroom to specify the temp directory.

fabiencastan commented 3 years ago

When you save your scene, the cache is relative to your ".mg" file. Temp is only used when the scene is not saved and there is a warning when you start the computation.

butscher commented 3 years ago

Thank you.

For some quick tests it is useful just to save to temp. I also tried previously to work with an explicitly created .mg file but unfortunately its location also had a junction in its path (I like junctions).