SIGSEGV with libXnVFeatures_1_5_2

539 views
Skip to first unread message

yousry

unread,
Jan 6, 2012, 8:58:51 AM1/6/12
to OpenNI
hi,

this bug is reproducible on an intel T6400 (core 2 duo notebook) and
amd phenom 2 system with MS Kinect and ubuntu 11.10 x64

You can reproduce this bug with :

OpenNI 1.5.2.23
NITE 1.5.2.21

SensorKinect 5.1.0.25
or
Sensor 5.1.0.41 with avin patches

- Start the java user tracker program: "UserTracker"
- identify at least two persons.
- end and restart the program.

Here is the output from the vm:

# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f9920a6cdc5, pid=6247,
tid=140295912699648
#
# JRE version: 6.0_30-b12
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.5-b03 mixed mode
linux-amd64 compressed oops)
# Problematic frame:
# C [libXnVFeatures_1_5_2.so+0x8cdc5]
Segmentation::detectionByPoint(bool, std::vector<Vector2D<int>,
std::allocator<Vector2D<int> > > const*)+0x85
#
# An error report file with more information is saved as:
# /home/yousry/Dokumente/workspace_sr1/skelTracker/hs_err_pid6247.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

...

Stack: [0x00007f992ffa3000,0x00007f99300a4000],
sp=0x00007f99300a2070, free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
C [libXnVFeatures_1_5_2.so+0x8cdc5]
Segmentation::detectionByPoint(bool, std::vector<Vector2D<int>,
std::allocator<Vector2D<int> > > const*)+0x85


A similar Segmentation fault can be created with the Sample-
NiUserTracker demo:

- Start Sample-NiUserTracker
- Identify at least two persons
- quit the program

Sample-NiUserTracker
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff198b700 (LWP 2489)]
1325852879 New User 1
1325852879 Calibration started for user 1
1325852881 Calibration complete, start tracking user 1
1325852890 New User 2
1325852890 Calibration started for user 2
[Thread 0x7ffff198b700 (LWP 2489) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff68bdc08 in XQueryExtension ()
from /usr/lib/x86_64-linux-gnu/libX11.so.6
(gdb) bt
#0 0x00007ffff68bdc08 in XQueryExtension ()
from /usr/lib/x86_64-linux-gnu/libX11.so.6
#1 0x00007ffff68b14f5 in XInitExtension ()
from /usr/lib/x86_64-linux-gnu/libX11.so.6
#2 0x00007ffff5e4c73b in XextAddDisplay ()
from /usr/lib/x86_64-linux-gnu/libXext.so.6
#3 0x00007ffff6e81009 in ?? () from /usr/lib/fglrx/libGL.so.1
#4 0x00007ffff6e77a72 in ?? () from /usr/lib/fglrx/libGL.so.1
#5 0x00007fffffffd790 in ?? ()
#6 0x00007ffff6eda6e1 in ?? () from /usr/lib/fglrx/libGL.so.1
#7 0x00007fffffffd790 in ?? ()
#8 0x00007ffff7deb105 in ?? () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

It is interesting, that without display of an image no error occurs.
For example with Sample-NiSimpleSkeleton

Xavier Mendez

unread,
Jan 6, 2012, 11:03:56 AM1/6/12
to openn...@googlegroups.com
Interesting. So, to clarify things:

1) The Ni-UserTracker program starts.


> [New Thread 0x7ffff198b700 (LWP 2489)]

2) The first user is detected. His calibration starts.


> 1325852879 New User 1
> 1325852879 Calibration started for user 1

3) It calibrates successfully and OpenNI starts tracking it.


> 1325852881 Calibration complete, start tracking user 1

4) The second user is detected. His calibration starts.


> 1325852890 New User 2
> 1325852890 Calibration started for user 2

5) BOOM!


> [Thread 0x7ffff198b700 (LWP 2489) exited]
> Program received signal SIGSEGV, Segmentation fault.

Anyway, in the first crash, the problem comes from NITE itself,
(libXnVFeatures_1_5_2.so) but in the second, the crash happens at the
FGLRX graphics driver --so it's not unexpected it gets removed when the
image is not displayed.

I'll try to reproduce and tell you something --I also have FGLRX.

Regards,
Xavier Mendez

signature.asc

yousry

unread,
Jan 7, 2012, 2:57:30 AM1/7/12
to OpenNI
I'm using the 11.12 AMD HD driver.
The segfault occurs after exit. My first thought was an
incompatibility with compiz (concurrent gl calls in same context). But
the error also occurs with unity 2d.
>  signature.asc
> < 1 KBAnzeigenHerunterladen

yousry

unread,
Jan 7, 2012, 4:04:21 AM1/7/12
to OpenNI
I found a very similar bug: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/902278
It seems to be a driver problem.

I also got a new bug from the java wrapper:

org.OpenNI.StatusException: A timeout has occurred when waiting for
new data!
at org.OpenNI.WrapperUtils.throwOnError(WrapperUtils.java:30)
at org.OpenNI.Context.waitAnyUpdateAll(Context.java:230)
at openni.updateDepth(UserTracker.java:198)
at openni.run(UserTrackerApplication.java:56)

Xavier Mendez

unread,
Jan 7, 2012, 8:46:00 AM1/7/12
to openn...@googlegroups.com
El ds 07 de 01 de 2012 a les 01:04 -0800, en/na yousry va escriure:

> I found a very similar bug: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/902278
> It seems to be a driver problem.
I think we are treating different bugs there.
* The SEGFAULT is probably crashed by the FGLRX driver,
so maybe it has nothing to do with OpenNI nor NITE.
Yes, I often see it on OpenNI samples, when I close them.

* The first crash is originated in the NITE-middleware,
not OpenNI itself.

> I also got a new bug from the java wrapper:
>
> org.OpenNI.StatusException: A timeout has occurred when waiting for
> new data!

* That's an OpenNI bug it sometimes starts appearing in *any* program
(not only Java).
On my system, it doesn't disappear until I restart the PC.

BUT, I've made a lot of programs with Java+OpenNI and my own programs
don't crash; the OpenNI samples do.

Anyway, I think that's a minor importance bug,
because it occurs at exit only.

signature.asc

yousry

unread,
Jan 7, 2012, 11:11:57 AM1/7/12
to OpenNI
Thank you for this information.
If I have any luck with my scala program I will write a short message
in this forum.


Moshe

unread,
Jan 10, 2012, 8:33:52 AM1/10/12
to OpenNI
When node is created and you don't do startGenerating(), then you
can't do context.waitAndUpdateAll(). even if other node start
generating. If you do, the result is "A timeout has occurred when
waiting for new data!" failure

Moshe

unread,
Jan 10, 2012, 8:42:47 AM1/10/12
to OpenNI
Hi

In regards to your statement about teh need to restart your PC to get
rid of the problem,
Can you please elaborate a bit more.
What is teh exact SDK version you are using?
What is the platform you are running on?
Please provide detailed description on how to reproduce the issue in a
way that only restart recovers openNI

Thanks
Moshe
>  signature.asc
> < 1KViewDownload

yousry

unread,
Jan 11, 2012, 12:49:17 AM1/11/12
to OpenNI
Dear Moshe,

>When node is created and you don't do startGenerating(), then you
can't do context.waitAndUpdateAll().

This error occurs in the UserTracker java demo, where
startGenerating() is done in the class constructor and
waitAndUpdateAll() is executed in update depth

This is most probably a problem with the swing thread.

>In regards to your statement about teh need to restart your PC to get
rid of the problem,

please excuse my reply for Mr. Mendez statement. Therefore this answer
could possibly be wrong:

Sometimes I get following error message during startup:

[info] # If you would like to submit a bug report, please visit:
[info] # http://java.sun.com/webapps/bugreport/crash.jsp
[info] # The crash happened outside the Java Virtual Machine in native
code.
[info] # See problematic frame for where to report the bug.
[info] #
java.lang.RuntimeException: Nonzero exit code returned from runner:
134
at scala.sys.package$.error(package.scala:27)

If the program is started from an ide (like eclipse) this error will
from now on reappear for each restart.

My workarounds for this problems are:

- I use sbt and a jvm fork with: fork in run := true
- start glview

Moshe Blitz

unread,
Jan 11, 2012, 1:00:28 AM1/11/12
to openn...@googlegroups.com
Hi

Can you advise back with your OS (32/64 bit ) and whether you are using the latest stable or unstable release? 

Regards,
Moshe
Sent from my mobile. 
--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To post to this group, send email to openn...@googlegroups.com.
To unsubscribe from this group, send email to openni-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.

yousry

unread,
Jan 11, 2012, 1:32:03 AM1/11/12
to OpenNI
> Can you advise back with your OS (32/64 bit ) and whether you are using the latest stable or unstable release?

Of course,

OS (64Bit Linux):
Linux 3.0.0-14-generic #23-Ubuntu SMP x86_64 GNU/Linux

Software (latest/unstable):

from sources:
OpenNI: Unstable-1.5.2.23
Sensors: Unstable-5.1.0.41 (+ kinect patch)

Download:
NITE: x64-v1.5.2.21

Compiler:
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1

Lior Cohen

unread,
Jan 16, 2012, 6:15:29 AM1/16/12
to openn...@googlegroups.com
Hi Yousry,

I tried to reproduce the crash you are describing but to no avail.

I used Ubuntu 10.10 64Bit with the latest stable release 20.4.2.20 on a Dell XPS M1530 laptop.
I installed all the packages on a "fresh" OS and everything just worked perfectly.

Can you please share some more information on the crash? E.g., activate the client and server logging mechanism and publish the logs for review.

In order to turn on the log mechanism:
1) Turning on the log of the OpenNI client:
Please make the highlighted change below into OpenNI_Installtion_Path\OpenNI\Data\SamplesConfig.xml file (or if you are using your own XML, please perform the changes to it). Then please re-run your application and send back the log file (name is composed of date and hour) created under Log folder in your working folder.

<Log writeToConsole="true" writeToFile="true">
<LogLevel value="0" />
<Mask name="ALL" on="true" />

2) Turning on the log of the OpenNI server:
Please make the highlighted change below into Sensor_Installtion_Path\Sensor\Config\GlobalDefaults.ini file. Then please re-run your application and send back the log file (name is composed of date and hour) created under Log folder: Sensor_Installtion_Path\Sensor\Bin\Log.

[Core]
; 0 - Verbose, 1 - Info, 2 - Warning, 3 - Error (default)
LogLevel=0
; leave empty for nothing (default). ALL - all masks
LogMasks=ALL
; 0 - No (default), 1 - Yes
;LogWriteToConsole=1
; 0 - No (default), 1 - Yes
LogWriteToFile=1

Thank you,

Regards,
Lior C.

hi,

OpenNI 1.5.2.23
NITE 1.5.2.21

...

--

Ying Yin

unread,
Jan 16, 2012, 7:31:54 PM1/16/12
to OpenNI
Hi,

I encountered exactly the same problem when running the sample OpenNI
program org.OpenNI.Samples.UserTracker. It runs fine the first time,
and then crashes in the subsequent runs.

#  SIGSEGV (0xb) at pc=0x00007f8c67dbfe56, pid=4742,
tid=140241298728704## JRE version: 6.0_23-b23# Java VM: OpenJDK 64-Bit
Server VM (20.0-b11 mixed mode linux-amd64 compressed oops)#
Derivative: IcedTea6 1.11pre# Distribution: Ubuntu 11.10, package
6b23~pre11-0ubuntu1.11.10# Problematic frame:# C
 [libXnVFeatures_1_5_2.so+0x8ce56]
 Segmentation::detectionByPoint(bool, std::vector<Vector2D<int>,
std::allocator<Vector2D<int> > > const*)+0x116#
OS (64Bit Linux):
Linux 3.0.0-14-generic #23-Ubuntu SMP x86_64 GNU/Linux

Software (latest/unstable):
from sources:
OpenNI: Unstable-1.5.2.23
SensorKinect: Unstable-5.1.0.25

Download:
NITE: x64-v1.5.2.21
Compiler:
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1


Ying Yin

unread,
Jan 16, 2012, 8:01:14 PM1/16/12
to OpenNI
org.OpenNI.Samples.UserTracker works if I remove
libXnVFeatures_1_5_2.so.

Lior Cohen

unread,
Jan 17, 2012, 1:17:37 AM1/17/12
to openn...@googlegroups.com
Dear Ying Yin,

I notice that you are using Ubuntu 11.10. PrimeSense package is currently supported on 10.10. I've tried everything on this version and it worked great for me. Please send us some logs if you experience same issue on 10.10.
Thanks,

Regards,
Lior C.

Hi,

--

oliveirafhm

unread,
Jan 17, 2012, 2:43:40 PM1/17/12
to OpenNI
With me too...only worked when I removed the libXnVFeatures_1_5_2.so.
I'm using ubuntu 11.04 x64, and last version of NITE (1.5.2.21
Stable).

now...I need of pose...
=/

better than nothing

oliveirafhm

unread,
Jan 17, 2012, 2:52:31 PM1/17/12
to OpenNI
Hi Lior,

about the logs, where they are?

Thanks!

Lior Cohen

unread,
Jan 18, 2012, 7:07:42 AM1/18/12
to openn...@googlegroups.com
Hi Oliver,

It is mentioned in my preview post:
Client Logs: "created under Log folder in your working folder."
Server Logs: "created under Log folder: Sensor_Installtion_Path\Sensor\Bin\Log."

Alexander Khovansky

unread,
Sep 21, 2012, 11:12:33 AM9/21/12
to openn...@googlegroups.com
I have experienced this bug under following conditions.
My program crashed (due to unknown cause) and after this every start of any program using NITE, including samples, ended with segfault. I checked Kinect and found that its IR projector is always working (even when XnSensorServer shut down). After re-connecting device problem has gone.

I see this Kinect "hang" from time to time but don't know how to reproduce it.

Ubuntu 12.04 x64

OpenNI 1.5.4.0
SensorKinect 5.1.2.1
NITE 1.5.2.21

Logs taken with Sample-NiSimpleSkeleton.

Backtrace:
#0  0x00007ffff3c39615 in Segmentation::detectionByPoint(bool, std::vector<Vector2D<int>, std::allocator<Vector2D<int> > > const*) () from /usr/lib/libXnVFeatures_1_5_2.so
#1  0x00007ffff3c40bc0 in Segmentation::update(Array2D<unsigned short> const&, MotionDetectorByEdges const&, Floor const&, Farfield&, std::vector<Vector2D<int>, std::allocator<Vector2D<int> > > const*) ()
   from /usr/lib/libXnVFeatures_1_5_2.so
#2  0x00007ffff3c2999b in SceneAnalyzer::Update(std::vector<Vector2D<int>, std::allocator<Vector2D<int> > > const*, unsigned int) () from /usr/lib/libXnVFeatures_1_5_2.so
#3  0x00007ffff3bff03f in XnVSceneAnalyzer::InitFromSM() () from /usr/lib/libXnVFeatures_1_5_2.so
#4  0x00007ffff3bff5bf in XnVSceneAnalyzer::UpdateData() () from /usr/lib/libXnVFeatures_1_5_2.so
#5  0x00007ffff7b9b8c7 in xnUpdateDataImpl(XnInternalNodeData*) () from /usr/lib/libOpenNI.so
#6  0x00007ffff7b9ba4e in xnUpdateTreeImpl(XnNodeInfo const*) [clone .isra.63] () from /usr/lib/libOpenNI.so
#7  0x00007ffff7b9b9c3 in xnUpdateTreeImpl(XnNodeInfo const*) [clone .isra.63] () from /usr/lib/libOpenNI.so
#8  0x00007ffff7b9bc75 in xnUpdateGraph(XnContext*, XnNodeInfo const*) () from /usr/lib/libOpenNI.so
#9  0x00007ffff7b9be9a in xnWaitOneUpdateAll () from /usr/lib/libOpenNI.so
#10 0x0000000000403189 in xn::Context::WaitOneUpdateAll (this=0x605190, node=...) at ../../Include/XnCppWrapper.h:9421
#11 0x0000000000401fcf in main () at NiSimpleSkeleton.cpp:215

OpenNI client and server logs attached.

client-2012_09_21__17_52_08_25883.log
server-2012_09_21__17_52_08_25885.log

Xavier Mendez

unread,
Sep 24, 2012, 12:18:14 PM9/24/12
to openn...@googlegroups.com
I don't know if others said that, but (sic!) as NITE is closed-source
we don't have access to the source and thus can't fix the issue.

The any thing we can't do is post it here,
so guys at NITE see it and fix it.

:'(

2012/9/21 Alexander Khovansky <khov...@cvisionlab.com>

--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openni-dev/-/xaNnN3EHuY0J.
Reply all
Reply to author
Forward
0 new messages