Skip to content

[bug] SfM node : negative rho assertion error on std::polar calls #2982

@nvandamme

Description

@nvandamme

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a Photogrammetry pipeline
  2. Add photos (JPEG with XMP/EXIF containing sensor/lens/gps infos)
  3. Launch the pipeline
  4. Pipeline is stopping on the SfM node with an error related to std::polar with a negative rho value (see full node log below)

Expected behavior
Produce only positive rho values (abs ?) during SfM or drop the associated view and continue.

Log

[2026-01-21 02:00:54.286009] [0x00007f901c465000] [trace]   Embedded OCIO configuration file: '/usr/share/aliceVision/config.ocio' found.
Program called with the following parameters:
 * bundleAdjustmentMaxOutliers = 50
 * computeStructureColor = 1
 * describerTypes = "dspsift"
 * extraInfoFolder = "/xxx/MeshroomCache/StructureFromMotion/655102db8e18219f73e03ff5c5e0a5551e9fa6d3"
 * featuresFolders =  = [/xxx/FeatureExtraction/5e2b0848073486e8f3a9a0c59ab42131d1c74e72]
 * filterTrackForks = 0
 * initialPairA = ""
 * initialPairB = ""
 * input = "/xxx/CameraInit/fab3cda07a01f1427b08a2975f9359364e5ff83e/cameraInit.sfm"
 * interFileExtension = ".abc"
 * localBAGraphDistance = 1
 * localizerEstimator =  Unknown Type "N11aliceVision16robustEstimation16ERobustEstimatorE"
 * localizerEstimatorError = 0
 * localizerEstimatorMaxIterations = 50000
 * lockAllIntrinsics = 0
 * lockScenePreviouslyReconstructed = 0
 * logIntermediateSteps = 0
 * matchesFolders =  = [/xxx/MeshroomCache/FeatureMatching/28914ca9070b1d2794c041ddd50804ff07b39f03]
 * maxAngleInitialPair = 40
 * maxCoresAvailable =  Unknown Type "j" (default)
 * maxImagesPerGroup = 30
 * maxMemoryAvailable = 18446744073709551615 (default)
 * maxNumberOfMatches = 0
 * maxReprojectionError = 4
 * minAngleForLandmark = 2
 * minAngleForTriangulation = 3
 * minAngleInitialPair = 5
 * minInputTrackLength = 2
 * minNbCamerasToRefinePrincipalPoint = 3
 * minNumberOfMatches = 0
 * minNumberOfObservationsForTriangulation = 2
 * nbFirstUnstableCameras = 30
 * observationConstraint =  Unknown Type "N11aliceVision3sfm18EFeatureConstraintE"
 * output = "/xxx/MeshroomCache/StructureFromMotion/655102db8e18219f73e03ff5c5e0a5551e9fa6d3/sfm.abc"
 * outputViewsAndPoses = "/xxx/MeshroomCache/StructureFromMotion/655102db8e18219f73e03ff5c5e0a5551e9fa6d3/cameras.sfm"
 * randomSeed = 5489 (default)
 * rigMinNbCamerasForCalibration = 20
 * useAutoTransform = 1
 * useLocalBA = 1
 * useOnlyMatchesFromInputFolder = 0
 * useRigConstraint = 1
 * verboseLevel = "info"

[02:00:54.295509][info] Hardware:
[02:00:54.295521][info] 	Detected core count: 32
[02:00:54.295537][info] 	OpenMP will use 32 cores
[02:00:54.295560][info] 	Detected available memory: 112063 Mo
[02:00:54.295566][info] 
Loading features
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************
[02:01:19.393951][info] Fuse matches into tracks: 
	- # tracks: 1538577
	- # images in tracks: 1016
[02:01:19.553335][info] TrackLength, Occurrence
[02:01:19.553373][info] 	2	802370
[02:01:19.553382][info] 	3	266402
[02:01:19.553387][info] 	4	134746
[02:01:19.553392][info] 	5	74396
[02:01:19.553397][info] 	6	49105
[02:01:19.553402][info] 	7	34644
[02:01:19.553407][info] 	8	25637
[02:01:19.553412][info] 	9	19591
[02:01:19.553418][info] 	10	15490
[02:01:19.553423][info] 	11	12548
[02:01:19.553428][info] 	12	10225
[02:01:19.553433][info] 	13	8502
[02:01:19.553438][info] 	14	7421
[02:01:19.553443][info] 	15	6303
[02:01:19.553449][info] 	16	5524
[02:01:19.553454][info] 	17	4778
[02:01:19.553464][info] 	18	4299
[02:01:19.553469][info] 	19	3786
[02:01:19.553474][info] 	20	3424
[02:01:19.553479][info] 	21	3076
[02:01:19.553484][info] 	22	2741
[02:01:19.553489][info] 	23	2534
[02:01:19.553495][info] 	24	2303
[02:01:19.553500][info] 	25	2176
[02:01:19.553505][info] 	26	2009
[02:01:19.553510][info] 	27	1809
[02:01:19.553516][info] 	28	1648
[02:01:19.553521][info] 	29	1579
[02:01:19.553526][info] 	30	1443
[02:01:19.553531][info] 	31	1374
[02:01:19.553536][info] 	32	1287
[02:01:19.553541][info] 	33	1192
[02:01:19.553546][info] 	34	1145
[02:01:19.553551][info] 	35	1093
[02:01:19.553556][info] 	36	1033
[02:01:19.553561][info] 	37	947
[02:01:19.553567][info] 	38	878
[02:01:19.553572][info] 	39	869
[02:01:19.553577][info] 	40	774
[02:01:19.553582][info] 	41	801
[02:01:19.553604][info] 	42	663
[02:01:19.553609][info] 	43	654
[02:01:19.553614][info] 	44	656
[02:01:19.553619][info] 	45	641
[02:01:19.553624][info] 	46	608
[02:01:19.553629][info] 	47	566
[02:01:19.553635][info] 	48	529
[02:01:19.553640][info] 	49	502
[02:01:19.553645][info] 	50	502
[02:01:19.553650][info] 	51	460
[02:01:19.553655][info] 	52	444
[02:01:19.553660][info] 	53	465
[02:01:19.553666][info] 	54	394
[02:01:19.553671][info] 	55	440
[02:01:19.553676][info] 	56	405
[02:01:19.553681][info] 	57	409
[02:01:19.553686][info] 	58	356
[02:01:19.553692][info] 	59	380
[02:01:19.553697][info] 	60	336
[02:01:19.553702][info] 	61	271
[02:01:19.553708][info] 	62	286
[02:01:19.553713][info] 	63	269
[02:01:19.553718][info] 	64	302
[02:01:19.553723][info] 	65	262
[02:01:19.553728][info] 	66	242
[02:01:19.553734][info] 	67	255
[02:01:19.553739][info] 	68	239
[02:01:19.553744][info] 	69	204
[02:01:19.553749][info] 	70	203
[02:01:19.553754][info] 	71	188
[02:01:19.553759][info] 	72	172
[02:01:19.553765][info] 	73	173
[02:01:19.553770][info] 	74	151
[02:01:19.553775][info] 	75	182
[02:01:19.553780][info] 	76	159
[02:01:19.553785][info] 	77	162
[02:01:19.553791][info] 	78	128
[02:01:19.553796][info] 	79	145
[02:01:19.553801][info] 	80	140
[02:01:19.553806][info] 	81	126
[02:01:19.553811][info] 	82	113
[02:01:19.553817][info] 	83	117
[02:01:19.553822][info] 	84	101
[02:01:19.553827][info] 	85	109
[02:01:19.553832][info] 	86	87
[02:01:19.553837][info] 	87	99
[02:01:19.553843][info] 	88	93
[02:01:19.553848][info] 	89	91
[02:01:19.553853][info] 	90	97
[02:01:19.553858][info] 	91	105
[02:01:19.553863][info] 	92	74
[02:01:19.553868][info] 	93	93
[02:01:19.553874][info] 	94	73
[02:01:19.553879][info] 	95	64
[02:01:19.553884][info] 	96	55
[02:01:19.553889][info] 	97	63
[02:01:19.553894][info] 	98	55
[02:01:19.553900][info] 	99	53
[02:01:19.553905][info] 	100	52
[02:01:19.553910][info] 	101	60
[02:01:19.553915][info] 	102	45
[02:01:19.553921][info] 	103	37
[02:01:19.553926][info] 	104	53
[02:01:19.553931][info] 	105	51
[02:01:19.553936][info] 	106	37
[02:01:19.553941][info] 	107	36
[02:01:19.553946][info] 	108	22
[02:01:19.553952][info] 	109	35
[02:01:19.553957][info] 	110	42
[02:01:19.553962][info] 	111	32
[02:01:19.553967][info] 	112	29
[02:01:19.553973][info] 	113	29
[02:01:19.553978][info] 	114	30
[02:01:19.553983][info] 	115	39
[02:01:19.553988][info] 	116	29
[02:01:19.553993][info] 	117	40
[02:01:19.553999][info] 	118	28
[02:01:19.554004][info] 	119	28
[02:01:19.554009][info] 	120	22
[02:01:19.554014][info] 	121	26
[02:01:19.554019][info] 	122	30
[02:01:19.554025][info] 	123	23
[02:01:19.554030][info] 	124	26
[02:01:19.554035][info] 	125	15
[02:01:19.554040][info] 	126	19
[02:01:19.554045][info] 	127	25
[02:01:19.554050][info] 	128	20
[02:01:19.554056][info] 	129	18
[02:01:19.554061][info] 	130	15
[02:01:19.554066][info] 	131	18
[02:01:19.554071][info] 	132	23
[02:01:19.554076][info] 	133	18
[02:01:19.554081][info] 	134	19
[02:01:19.554087][info] 	135	22
[02:01:19.554092][info] 	136	20
[02:01:19.554097][info] 	137	13
[02:01:19.554102][info] 	138	12
[02:01:19.554108][info] 	139	15
[02:01:19.554113][info] 	140	15
[02:01:19.554118][info] 	141	11
[02:01:19.554123][info] 	142	10
[02:01:19.554128][info] 	143	7
[02:01:19.554134][info] 	144	8
[02:01:19.554139][info] 	145	11
[02:01:19.554144][info] 	146	12
[02:01:19.554149][info] 	147	7
[02:01:19.554154][info] 	148	12
[02:01:19.554160][info] 	149	13
[02:01:19.554165][info] 	150	10
[02:01:19.554170][info] 	151	10
[02:01:19.554175][info] 	152	9
[02:01:19.554180][info] 	153	12
[02:01:19.554186][info] 	154	5
[02:01:19.554191][info] 	155	7
[02:01:19.554196][info] 	156	6
[02:01:19.554201][info] 	157	10
[02:01:19.554206][info] 	158	5
[02:01:19.554211][info] 	159	4
[02:01:19.554217][info] 	160	1
[02:01:19.554222][info] 	161	4
[02:01:19.554227][info] 	162	4
[02:01:19.554232][info] 	163	5
[02:01:19.554238][info] 	164	2
[02:01:19.554243][info] 	165	2
[02:01:19.554248][info] 	166	2
[02:01:19.554254][info] 	167	3
[02:01:19.554259][info] 	168	2
[02:01:19.554264][info] 	169	4
[02:01:19.554269][info] 	170	1
[02:01:19.554278][info] 	171	3
[02:01:19.554283][info] 	172	1
[02:01:19.554288][info] 	173	1
[02:01:19.554293][info] 	174	3
[02:01:19.554298][info] 	175	3
[02:01:19.554303][info] 	176	3
[02:01:19.554309][info] 	177	4
[02:01:19.554314][info] 	178	3
[02:01:19.554319][info] 	180	4
[02:01:19.554324][info] 	182	4
[02:01:19.554329][info] 	183	2
[02:01:19.554334][info] 	184	1
[02:01:19.554340][info] 	185	2
[02:01:19.554345][info] 	186	4
[02:01:19.554350][info] 	187	1
[02:01:19.554355][info] 	188	1
[02:01:19.554360][info] 	189	2
[02:01:19.554365][info] 	192	3
[02:01:19.554371][info] 	194	3
[02:01:19.554376][info] 	197	2
[02:01:19.554381][info] 	198	3
[02:01:19.554386][info] 	199	1
[02:01:19.554391][info] 	201	1
[02:01:19.554397][info] 	202	2
[02:01:19.554402][info] 	203	1
[02:01:19.554407][info] 	206	2
[02:01:19.554412][info] 	208	2
[02:01:19.554417][info] 	209	1
[02:01:19.554422][info] 	210	2
[02:01:19.554428][info] 	211	1
[02:01:19.554433][info] 	214	3
[02:01:19.554438][info] 	216	2
[02:01:19.554443][info] 	218	1
[02:01:19.554448][info] 	219	1
[02:01:19.554453][info] 	221	1
[02:01:19.554459][info] 	222	1
[02:01:19.554464][info] 	225	2
[02:01:19.554473][info] 	228	2
[02:01:19.554478][info] 	232	1
[02:01:19.554483][info] 	233	1
[02:01:19.554489][info] 	236	1
[02:01:19.554494][info] 	239	1
[02:01:19.554499][info] 	245	2
[02:01:19.554504][info] 	247	1
[02:01:19.554509][info] 	252	1
[02:01:19.554514][info] 	256	1
[02:01:19.554520][info] 	259	1
[02:01:19.554525][info] 	267	1
[02:01:19.554531][info] 	271	1
[02:01:19.554536][info] 	286	1
[02:01:19.554541][info] 	295	1
[02:01:19.554546][info] 	310	1
[02:01:19.554551][info] 	311	1
[02:01:19.554556][info] 	344	1
[02:01:19.554561][info] 	1012	1
Automatic selection of an initial pair:
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
*[02:01:19.658630][info] robustRelativePose: no sufficient coverage (the model does not support enough samples): 0
[02:01:19.658899][info] robustRelativePose: no sufficient coverage (the model does not support enough samples): ...
[02:01:56.830534][info] robustRelativePose: no sufficient coverage (the model does not support enough samples): 0
[02:01:56.830767][info] robustRelativePose: no sufficient coverage (the model does not support enough samples): 0
*
[02:01:57.103369][info] Initial pair is:
	- [A] view id: 1428904805, filepath: /xxx/2023/512/20231017/DJI_0510.JPG
	- [B] view id: 1456312261, filepath: /xxx/2023/512/20231017/DJI_0513.JPG
[02:01:57.105184][info] 1525 matches in the image pair for the initial pose estimation.
[02:01:57.328471][info] Bundle adjustment start.
[02:01:57.328838][info] Start bundle adjustment iteration: 0
[02:01:57.328849][info] BundleAdjustmentCeres::adjust start
[02:01:57.344084][info] BundleAdjustmentCeres::adjust end
[02:01:57.345749][info] Bundle Adjustment Statistics:
	- local strategy enabled: no
	- adjustment duration: 0.0129831 s
	- poses:
	    - # refined:  2
	    - # constant: 0
	    - # ignored:  0
	- landmarks:
	    - # refined:  3014
	    - # constant: 0
	    - # ignored:  0
	- intrinsics:
	    - # refined:  1
	    - # constant: 1
	    - # ignored:  0
	- # residual blocks: 6028
	- # successful iterations: 3
	- # unsuccessful iterations: 0
	- initial RMSE: 0.179302
	- final   RMSE: 0.142657
[02:01:57.346784][info] Remove outliers: 
	- # outliers residual error: 0
	- # outliers angular error: 0
[02:01:57.346821][info] Bundle adjustment iteration: 0 took 17 msec.
[02:01:57.346828][info] Bundle adjustment with 1 iterations took 18 msec.
[02:01:57.347351][info] Initial pair is: 1428904805, 1456312261
[02:01:57.347476][info] Begin Incremental Reconstruction:
	- mode: SfM augmentation
	- # images in input: 1016
	- # landmarks in input: 1507
	- # cameras already calibrated: 2
[02:01:57.347483][info] Incremental Reconstruction start iteration 0:
	- # number of resection groups: 1
	- # number of poses: 2
	- # number of landmarks: 1507
[02:01:57.352044][info] Update Reconstruction:
	- resection id: 1
	- # images in the resection group: 1
	- # images remaining: 1014
[02:01:57.355273][info] [3/1016] Robust Resection of view: 416842329
/usr/include/c++/15.2.1/complex:1041: std::complex<_Tp> std::polar(const _Tp&, const _Tp&) [with _Tp = double]: Assertion '__rho >= 0' failed.
Process was killed by signal: 6

Desktop (please complete the following and other pertinent information):

  • OS: Linux 6.18.5-arch1-1 SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
  • Python version : 3.14
  • Meshroom version: 2025.1.1-1 via meshroom AUR

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfor actual bugs (unsure? use type:question)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions