Skip to content

[Eigen Memory.h] PCL 1.11.1 -> PCL 1.14.1, the same code went wrong #6167

Closed
@Neo-YH

Description

@Neo-YH

Describe the bug

PCL 1.11.1 -> PCL 1.14.1, the same code went wrong
It might be my fault, but I couldn't find the reason. Sorry for put the question here.

Context

void pcltools::filter_passthrough(pcl::PointCloud<pcl::PointXYZ>::Ptr Inputcloud, pcl::PointCloud<pcl::PointXYZ>::Ptr filteredcloud, double min_bound, double max_bound, string axis)
{
	pcl::PassThrough<pcl::PointXYZ> pass;
	pass.setInputCloud(Inputcloud);           
	pass.setFilterFieldName(axis);         
	pass.setFilterLimits(min_bound, max_bound);        
	pass.filter(*filteredcloud);            
}

I want to define this function, it can be successfully invoked in PCL 1.11.1, but went wrong in PCL 1.14.1.
Does PCL 1.14.1 have stricter memory management?

Expected behavior

filter_passthrough(cloud_input, cloud_in_parkinglot, PARKINGLOT_X_MIN, PARKINGLOT_X_MAX, "x");
I hope that similar types of syntax can be executed correctly.

Current Behavior

/** \internal Frees memory allocated with aligned_malloc. */
EIGEN_DEVICE_FUNC inline void aligned_free(void *ptr)
{
  #if (EIGEN_DEFAULT_ALIGN_BYTES==0) || EIGEN_MALLOC_ALREADY_ALIGNED

    EIGEN_USING_STD(free)
    free(ptr);

  #else
    handmade_aligned_free(ptr);
  #endif
}

In PCL 1.14.1, calling free(ptr) sometimes triggers an error, whereas PCL 1.11.1 does not trigger this error.

Your Environment (please complete the following information):

  • OS: Windows10
  • Compiler: MSVC (Visual Studio 2022)
  • PCL Version: PCL 1.11.1/PCL 1.14.1

Possible Solution

Has PCL 1.14.1 introduced stricter restrictions, such as ensuring that the input or output point clouds for filters cannot be null?
The issue I'm encountering doesn't seem to be caused by an empty point cloud, but I suspect there may be such limitations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions