Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - zoocafe

Pages: [1]
Bug Reports / Segmentation fault matchPhotos
« on: December 14, 2017, 05:46:39 AM »
When I run -platform offscreen -r I most of the time get segmentation fault line 19: 27666 Segmentation fault      (core dumped) "$dirname/$appname" "$@"

It appears when I do chunk.matchPhotos(accuracy=PhotoScan.HighAccuracy, generic_preselection=True,reference_preselection=False) after addPhotos.

MatchPhotos: accuracy = High, preselection = generic, keypoint limit = 40000, tiepoint limit = 4000, constrain features by mask = 0 line 19: 21670 Segmentation fault      (core dumped) "$dirname/$appname" "$@"

Now and then it works without segmentation fault but it is rare

I've tried version 1.3.4, 1.3.3 and 1.3.2 but the result are the same

I'm certain that the list of photos for addPhotos is valid as I create it from os.list.dir and have confirmed the paths.
Even though I don't think it is the root problem is there a way for photoscan to check or return the number of added photos or their paths?

I'm running this on a server without CPU
model name   : Intel(R) Xeon(R) CPU E5-26xx v4
cpu MHz      : 2394.446
cache size   : 4096 KB
Linux VM_154_79_centos 2.6.32-642.6.2.el6.x86_64

Segmentation fault in bold below
--- start ---
import PhotoScan
import os
import json
import datetime

def timestampAndAppendTextToFile(text, file):
    stamp =
    stamp = str(stamp) + " " + text + os.linesep
    f=open(file, 'a+')

photoFolder = "imgs"
doc =
scriptdir = os.path.dirname(os.path.abspath(__file__))
logFile = os.path.join(scriptdir, "job.log"), "psproject.psz"))
chunk =

# Get images in the folder
imgFolder = os.path.join(scriptdir, photoFolder)
includedExts = ['jpg', 'jpeg', 'png', 'tif']

file_names = []
for fn in os.listdir(imgFolder):
    fnlower = fn.lower()
    if any(fnlower.endswith(ext) for ext in includedExts):

timestampAndAppendTextToFile("Number of photos:" + str(len(file_names)), logFile)

timestampAndAppendTextToFile("Photos - start", logFile)
for fn in file_names:
    timestampAndAppendTextToFile(fn, logFile)
timestampAndAppendTextToFile("Photos - end", logFile)

# Add processing server
GPUdevices =
prettyJson = json.dumps(GPUdevices, indent=2)
timestampAndAppendTextToFile(str(prettyJson), logFile)

    timestampAndAppendTextToFile("Success Add photos done", logFile)
    chunk.matchPhotos(accuracy=PhotoScan.HighAccuracy, generic_preselection=True,reference_preselection=False)
    timestampAndAppendTextToFile("Success Match photos done", logFile)
except Exception as e:
    timestampAndAppendTextToFile("PS_ERROR:" + str(e), logFile)

--- end ---

Pages: [1]