CloudViewer Constructor Error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CloudViewer Constructor Error

MedEngineer95
Hello,

I'm currently working on a student project.
In my project I get an error when I use the CloudViewer constructor.

boost::shared_ptr<pcl::visualization::CloudViewer> viewer (new
pcl::visualization::CloudViewer("Hallo"));
viewer->showCloud(pointCloud);

while (!viewer->wasStopped()) {
}

I debugged the code and checked the callstack.
It says that the error occurs in a memcpy function.
Both locals of the memcpy() dst and src fail while reading.

That's the callstack:
> vcruntime140d.dll!memcpy(unsigned char * dst, unsigned char * src,
> unsigned long count) Zeile 657 Unbekannt
  pcl_visualization_debug.dll!std::char_traits<char>::copy(char * _First1,
const char * _First2, unsigned int _Count) Zeile 530 C++
 
pcl_visualization_debug.dll!std::basic_string<char,std::char_traits&lt;char>,std::allocator<char>
>::assign(const
std::basic_string<char,std::char_traits&lt;char>,std::allocator<char> > &
_Right, unsigned int _Roff, unsigned int _Count) Zeile 1152 C++
 
pcl_visualization_debug.dll!std::basic_string<char,std::char_traits&lt;char>,std::allocator<char>
>::basic_string<char,std::char_traits&lt;char>,std::allocator<char> >(const
std::basic_string<char,std::char_traits&lt;char>,std::allocator<char> > &
_Right) Zeile 777 C++
 
pcl_visualization_debug.dll!pcl::visualization::CloudViewer::CloudViewer_impl::CloudViewer_impl(const
std::basic_string<char,std::char_traits&lt;char>,std::allocator<char> > &
window_name) Zeile 132 C++
 
pcl_visualization_debug.dll!pcl::visualization::CloudViewer::CloudViewer(const
std::basic_string<char,std::char_traits&lt;char>,std::allocator<char> > &
window_name) Zeile 264 C++

The program exits with error code (0x0).

I'm using VS15 x86 Debug on a Windows10 x64 OS without CMake.
I installed the all in one installer for PCL 1.8.0 + pdb files and it
perfectly works except this error.

I hope someone can help me with this problem.
Grateful for any help.



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: CloudViewer Constructor Error

Sérgio Agostinho
Did you compile everything for debug/release 32/64 bits and VC runtime version under the same conditions?

Did you pass all the required flags vtk needs to the compiler?

If everything fails try to replicate one of our running visualization with PCL master and using cmake, and then modify it to use cloud viewer. If it doesn’t fail, look at what arguments are being passed to the compiler and what’s different from your current project.

Cheers
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CloudViewer Constructor Error

MedEngineer95
This post was updated on .
Thank you for answering.

I just tried to compile with debug 32bits.
If I wanna compile with debug 64 bits do I have to download the pcl 64bit
version?
Furthermore I just have a vs15 32-bit version, is this going to cause a
problem with debugging 64bit?
Sorry I'm new in this.

I set the linker and c/c++ compiler for the whole vtk library in the
property manager.
Do I need to include something for vtk?

Thanks a lot.

-----------------------------------------------------------
Edit: Regarding Vtk.lib files: When I add the additional libraries to the linker in visual studios,
        do I have to add the xxx-gd.lib files or just xxx.lib for debug mode?

--
Sent from: http://www.pcl-users.org/
_______________________________________________
PCL-users@pointclouds.org / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users