I execute standalone python code (almost identical to the code in the accepted answer):
The output file does not contain data, and I get this error message:
Warning 6: Normalized/laundered field name: 'vertex_index' to 'vertex_ind'
Warning 6: Normalized/laundered field name: 'vertex_part' to 'vertex_par'
Warning 6: Normalized/laundered field name: 'vertex_part_index' to 'vertex_p_1'
Process finished with exit code -1073741819 (0xC0000005)
Field name limitation is known shapefile issue, but why output file is empty and why I get exit code -1073741819 (0xC0000005)
?
Here is input and output shapefiles:
What can cause this problem?
Here is the code:
import sys
from qgis.core import (
QgsApplication,
QgsProcessingFeedback,
QgsVectorLayer
)
from qgis.analysis import QgsNativeAlgorithms
QgsApplication.setPrefixPath(r'C:\OSGeo4W64\apps\qgis', True)
qgs = QgsApplication([], False)
qgs.initQgis()
sys.path.append(r'C:\OSGeo4W64\apps\qgis\python\plugins')
import processing
from processing.core.Processing import Processing
Processing.initialize()
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())
layer = QgsVectorLayer(r"G:\test\input.shp", 'my layer', 'ogr')
output = r"G:\test\output.shp"
params = {
'INPUT': layer,
'OUTPUT': output,
}
feedback = QgsProcessingFeedback()
res = processing.run("native:extractvertices", params, feedback=feedback)
print(res)
-1073741819 (0xC0000005)
in DuckDuckGo results in many referrals to memory access violation, for example: > The exception code 0xc0000005 indicates a memory access violation. > [...] it looks like the OCX control you're using is performing an illegal access to the memory, therefore the system raised the exception and halted the program's execution. Source ### Some questions arise - Are