Skip to content

Segmentation fault (core dumped) when using filters.python  #73

@AlbionS

Description

@AlbionS

Hi,
I just found a bug using filters.python.

I have been working lately on scaling the intensity to color if a file does not have a color. Recently I found out that it does not work all the time and I kept receiving the error Segmentation fault (core dumped), at first I thought that my python script is not working correctly but that wasn't the case. Some of the files work fine and some not.

To make it easy and to prove that the error is not coming from my script so you wont have to verify it, I changed the fonction just to print something on the console :
rep_col.py

import numpy as np
import sys
print("started")
def scale_color(ins, outs):
        print("inside")
        print("------------------Finished")
        return True

pipeline.json

       [
               "/home/ubuntu/Desktop/test.laz",
                {
                  "type":"filters.python",
                  "script":"/home/ubuntu/Desktop/replace_col.py",
                  "function":"scale_color",
                  "module":"anything",
                  "add_dimension":["Red=uint16","Green=uint16","Blue=uint16"]
                },
                {
                 "filename":  "/home/ubuntu/Desktop/test_.laz"
                 }
        ]

Link to download the files : https://gofile.io/d/0Wnhmv

Exemple of the first file, that it throws the error :
pdal pipeline -i /home/ubuntu/Desktop/pipeline.json

started
Segmentation fault (core dumped)

Exemple of the second file, that it works:
pdal pipeline -i /home/ubuntu/Desktop/pipeline.json

started
inside
------------------Finished

I've installed pdal through conda
pdal --version

----------------------------------------------------------
pdal 2.1.0 (git-version: 1d5e8a)
----------------------------------------------------------

I can provide other files if needed :)
Best Regards,
Albion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions