jstraub / cudaPcl

depth image processing using CUDA
Other
99 stars 24 forks source link

openniSmoothNormals crashes with segfault on ubuntu 14.04 #1

Open ahundt opened 8 years ago

ahundt commented 8 years ago

@fjonath1 and I tested out your app and we are able to run openniSmoothDepth and see the depth output, but the point cloud is totally white. Also rgb is swapped as bgr.

openniSmoothNormals crashes completely at startup. We will post photos shortly

ahundt commented 8 years ago

white screen 3d viewer

here is the all white issue

ahundt commented 8 years ago

Here is the backtrace of openniSmoothNormals:

Starting program: /home/cpaxton/src/cudaPcl/pod-build/bin/openniSmoothNormals 
warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffd391a700 (LWP 15604)]
GPU Device 0: "GeForce GTX 670" with compute capability 3.0
[New Thread 0x7fffd000d700 (LWP 15807)]
[Thread 0x7fffd000d700 (LWP 15807) exited]
[New Thread 0x7fffd000d700 (LWP 15861)]
[New Thread 0x7fffcf80c700 (LWP 15872)]
[New Thread 0x7fffcd98b700 (LWP 15874)]
[New Thread 0x7fffcd18a700 (LWP 15875)]
[New Thread 0x7fffcc989700 (LWP 15876)]
[New Thread 0x7fffbe97f700 (LWP 15877)]
[New Thread 0x7fffbe17e700 (LWP 15883)]
[New Thread 0x7fffbd17d700 (LWP 15896)]
creating depth filter
init gpu matrices
calling prepareCUDA
0
Allocating and initializing CUDA arrays... 640 480
8 307200 8
640 480
prepareCUDA done
NormalExtractSimpleGpu<T>::computeGpu 640 480
[New Thread 0x7fffbc444700 (LWP 15921)]
[New Thread 0x7fffb7fff700 (LWP 15922)]
[New Thread 0x7fffb7bfe700 (LWP 15923)]
[New Thread 0x7fffb6d3d700 (LWP 15924)]
[New Thread 0x7fffb653b700 (LWP 15926)]
[New Thread 0x7fffb693c700 (LWP 15925)]
[New Thread 0x7fffb613a700 (LWP 15927)]
[New Thread 0x7fffb489d700 (LWP 15959)]
[New Thread 0x7fff93fff700 (LWP 15960)]
Program received signal SIGSEGV, Segmentation fault.
PointCloud (pc=..., this=0x29d14e0)
    at /usr/local/include/pcl-1.7/pcl/point_cloud.h:193
193         *this = pc;
(gdb) bt
#0  PointCloud (pc=..., this=0x29d14e0)
    at /usr/local/include/pcl-1.7/pcl/point_cloud.h:193
#1  cudaPcl::OpenniSmoothNormalsGpu::visualizeNormals (
    this=this@entry=0x7fffffffa300)
    at /home/cpaxton/src/cudaPcl/pod-build/include/cudaPcl/openniSmoothNormalsGpu.hpp:142
#2  0x00000000004265ab in main (argc=1, argv=0x7fffffffa6f8)
    at /home/cpaxton/src/cudaPcl/src/openniSmoothNormals.cpp:71
(gdb) 
jstraub commented 8 years ago

Thanks for the feedback =). I pushed fixes all issues:

Let me know if you encounter any other problems.

ahundt commented 8 years ago

Thanks for the quick turnaround! We'll give it a try we pulled and saw your changes then reran the dependency build and primary build steps. We're still getting a segfault on openniSmoothNormals. We'll post a stack trace shortly. We can also try recompiling from scratch.

Side note, any chance you're also aware of anything that does temporal smoothing based on data over several frames?

ahundt commented 8 years ago
gdb ./openniSmoothNormals
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./openniSmoothNormals...done.
(gdb) r
Starting program: /home/cpaxton/src/cudaPcl/pod-build/bin/openniSmoothNormals 
warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffd3b17700 (LWP 4059)]
GPU Device 0: "GeForce GTX 670" with compute capability 3.0

[New Thread 0x7fffd020a700 (LWP 4178)]
[Thread 0x7fffd020a700 (LWP 4178) exited]
[New Thread 0x7fffd020a700 (LWP 4201)]
[New Thread 0x7fffcfa09700 (LWP 4213)]
[New Thread 0x7fffcdb88700 (LWP 4222)]
[New Thread 0x7fffcd387700 (LWP 4223)]
[New Thread 0x7fffccb86700 (LWP 4224)]
[New Thread 0x7fffbe97f700 (LWP 4225)]
[New Thread 0x7fffbe17e700 (LWP 4226)]
[New Thread 0x7fffbd17d700 (LWP 4229)]
creating depth filter
init gpu matrices
calling prepareCUDA internal processing size 640x512
0
Allocating and initializing CUDA arrays... 640 480
Internalt size ... 640 512
8 307200 8
640 480
prepareCUDA done
NormalExtractSimpleGpu<T>::computeGpu 640 480
[New Thread 0x7fffbc544700 (LWP 4239)]
[New Thread 0x7fffb769e700 (LWP 4240)]
[New Thread 0x7fffb729d700 (LWP 4241)]
[New Thread 0x7fffb669a700 (LWP 4244)]
[New Thread 0x7fffb6e9c700 (LWP 4242)]
[New Thread 0x7fffb6a9b700 (LWP 4243)]
[New Thread 0x7fffb6299700 (LWP 4250)]
[New Thread 0x7fffb49fc700 (LWP 4272)]
[New Thread 0x7fff93fff700 (LWP 4273)]

Program received signal SIGSEGV, Segmentation fault.
0x0000000000431021 in pcl::visualization::PCLVisualizer::updatePointCloud<pcl::PointXYZRGB> (this=this@entry=0x0, cloud=..., color_handler=..., id=...)
   at /usr/local/include/pcl-1.7/pcl/visualization/impl/pcl_visualizer.hpp:1490
1490    pcl::visualization::PCLVisualizer::updatePointCloud (const typename pcl::PointCloud<PointT>::ConstPtr &cloud,
(gdb) bt
#0  0x0000000000431021 in pcl::visualization::PCLVisualizer::updatePointCloud<pcl::PointXYZRGB> (this=this@entry=0x0, cloud=..., color_handler=..., id=...)
   at /usr/local/include/pcl-1.7/pcl/visualization/impl/pcl_visualizer.hpp:1490
#1  0x0000000000447015 in pcl::visualization::PCLVisualizer::updatePointCloud (this=0x0, cloud=..., id=...) at /usr/local/include/pcl-1.7/pcl/visualization/pcl_visualizer.h:887
#2  0x000000000042bbec in cudaPcl::OpenniSmoothNormalsGpu::visualizePC (this=this@entry=0x7fffffffa280)
   at /home/cpaxton/src/cudaPcl/pod-build/include/cudaPcl/openniSmoothNormalsGpu.hpp:154
#3  0x0000000000427f50 in main (argc=1, argv=0x7fffffffa678) at /home/cpaxton/src/cudaPcl/src/openniSmoothNormals.cpp:71
jstraub commented 8 years ago

That is weird. I added a check that the point cloud is non-empty before it calls the updatePointCloud(). But I dont think that should be the problem. Did it go away?

Re side note: temporal smoothing of what? I do have a temporal filtering of the directional segmentation implemented here https://github.com/jstraub/rtDDPvMF.

ahundt commented 8 years ago

We may just have to recompile, sorry ran out of time today to try it.

side note: Meant temporal filtering of depth, perhaps with a median filter over n frames on a per pixel basis. Sorry for not being specific enough :-)

jstraub commented 8 years ago

Okay try recompiling.

I dont have that kind of temporal filtering code flying around at this point ;)