jeffsp / matleap

MATLAB mex interface for the Leap Motion Controller
29 stars 24 forks source link

Matlab 14b + Leap SDK 2.2.0 segfaults on Fedora 20 #6

Open jeffsp opened 9 years ago

jeffsp commented 9 years ago
>> matleap(0)
Unexpected unknown exception from MEX file..
MATLAB crash file:[$HOME]/matlab_crash_dump.32444-1:

   Segmentation violation detected at Sun Nov 30 19:27:10 2014

Configuration: Crash Decoding : Disabled Current Visual : None Default Encoding : UTF-8 GNU C Library : 2.18 stable MATLAB Architecture: glnxa64 MATLAB Root : [$HOME]/MATLAB/R2014b MATLAB Version : 8.4.0.150421 (R2014b) Operating System : Linux 3.17.3-200.fc20.x86_64 #1 SMP Fri Nov 14 19:45:42 UTC 2014 x86_64 Processor ID : x86 Family 6 Model 23 Stepping 6, GenuineIntel Software OpenGL : 0 Virtual Machine : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode Window System : No active display

Fault Count: 1

Abnormal termination: Segmentation violation

jeffsp commented 9 years ago

I have verified that this error occurs on Ubuntu 12.04 with Matlab version 2012b. If you comment out the Leap::controller variable, the error does not occur, indicating that the sigfault occurs within the Leap SDK controller initialization.

jeffsp commented 9 years ago

reposting stacktrace:

Stack Trace (from fault): [ 0] 0x00007f3703f56895 /usr/local/MATLAB/R2014b/bin/glnxa64/libboost_chrono.so.1.49.0+00014485 _ZN5boost6chrono12system_clock3nowEv+00000037 [ 1] 0x00007f35ac719119 /usr/lib/libLeap.so+00925977 [ 2] 0x00007f35ac6c325d /usr/lib/libLeap.so+00574045 _ZN11BasicThread11ThreadSleepENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE+00000093 [ 3] 0x00007f35ac7279f9 /usr/lib/libLeap.so+00985593 [ 4] 0x00007f35ac7244db /usr/lib/libLeap.so+00971995 [ 5] 0x00007f35ac6c24b9 /usr/lib/libLeap.so+00570553 _ZN11BasicThread5DoRunEOSt10shared_ptrI6ObjectE+00000201 [ 6] 0x00007f37092b5df0 /usr/local/MATLAB/R2014b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6+00740848 [ 7] 0x00007f3708adae9a /lib/x86_64-linux-gnu/libpthread.so.0+00032410 [ 8] 0x00007f370880831d /lib/x86_64-linux-gnu/libc.so.6+01000221 clone+00000109

maatti commented 9 years ago

Hey everyone, i receive a crash while running the matleap as well, but before it crashes one frame is grabbed. Using Ubuntu 14.04 Matlab 2013a. This is the Stack Trace:

Stack Trace (from fault): [ 0] 0x00007f6123955472 /usr/local/MATLAB/R2013a/bin/glnxa64/libboost_chrono.so.1.49.0+00013426 _ZN5boost6chrono12system_clock3nowEv+00000034 [ 1] 0x00007f60408a5119 /home/robot_user/Documents/LEAP/LeapDeveloperKit_2.2.0+23475_linux/LeapSDK/lib/x64/libLeap.so+00925977 [ 2] 0x00007f6040891d0c /home/robot_user/Documents/LEAP/LeapDeveloperKit_2.2.0+23475_linux/LeapSDK/lib/x64/libLeap.so+00847116 [ 3] 0x00007f6040892f2b /home/robot_user/Documents/LEAP/LeapDeveloperKit_2.2.0+23475_linux/LeapSDK/lib/x64/libLeap.so+00851755 [ 4] 0x00007f6040893e45 /home/robot_user/Documents/LEAP/LeapDeveloperKit_2.2.0+23475_linux/LeapSDK/lib/x64/libLeap.so+00855621 [ 5] 0x00007f604085cd12 /home/robot_user/Documents/LEAP/LeapDeveloperKit_2.2.0+23475_linux/LeapSDK/lib/x64/libLeap.so+00630034 _ZN13DispatchQueue19DispatchEventUnsafeERSt11unique_lockISt5mutexE+00000098 [ 6] 0x00007f604085c2bb /home/robot_user/Documents/LEAP/LeapDeveloperKit_2.2.0+23475_linux/LeapSDK/lib/x64/libLeap.so+00627387 _ZN10CoreThread12WaitForEventEv+00000139 [ 7] 0x00007f604085c3d8 /home/robot_user/Documents/LEAP/LeapDeveloperKit_2.2.0+23475_linux/LeapSDK/lib/x64/libLeap.so+00627672 _ZN10CoreThread3RunEv+00000024 [ 8] 0x00007f604084e4b9 /home/robot_user/Documents/LEAP/LeapDeveloperKit_2.2.0+23475_linux/LeapSDK/lib/x64/libLeap.so+00570553 _ZN11BasicThread5DoRunEOSt10shared_ptrI6ObjectE+00000201 [ 9] 0x00007f612824fbf0 /usr/lib/x86_64-linux-gnu/libstdc++.so.6+00728048 [ 10] 0x00007f6127a6c182 /lib/x86_64-linux-gnu/libpthread.so.0+00033154 [ 11] 0x00007f6127798efd /lib/x86_64-linux-gnu/libc.so.6+01027837 clone+00000109

Before matlab crashed i changed the R2013a/sys/os/glnx86/libstdc++.so.6 link to /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19

maatti commented 9 years ago

TI posted the issue at the mathwork page and got a response: http://www.mathworks.com/matlabcentral/answers/169687-crash-while-running-mex-file What do you think of it?

jeffsp commented 9 years ago

I spent some time trying to fix this last month, but I didn't make any headway. I removed everything from the mex file except the Leap initialization, and it still crashed. It does not crash if you remove the Leap initialization call.

I recently moved to a different research lab, and I don't have a Matlab license. So, I currently have no way to debug this. This really stinks because I have code for adding raw image capture -- a feature that some users have requested -- but I have no way to add it.

That said, it's still not clear to me that the bug is in the Matleap code. It seems to involve something beyond Matleap's scope. I am hopeful that a newer version of the Leap SDK will have an effect.