Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oniStreamDestroy freezes thread #82

Open
micuat opened this issue Apr 19, 2016 · 3 comments
Open

oniStreamDestroy freezes thread #82

micuat opened this issue Apr 19, 2016 · 3 comments

Comments

@micuat
Copy link

micuat commented Apr 19, 2016

From OpenNI#90

When playing oni files sequentially (or frequent open/close of any openni devices), oniStreamDestroy freezes once in a while. I tested 2.2.0.33 beta distribution but the same issue occurs. When pausing the program and see call stack, Xcode shows

libOpenNI2.dylib`oniStreamDestroy:
    0x1487870 <+0>:  pushl  %ebp
    0x1487871 <+1>:  movl   %esp, %ebp
    0x1487873 <+3>:  pushl  %edi
    0x1487874 <+4>:  pushl  %esi
    0x1487875 <+5>:  subl   $0x10, %esp
    0x1487878 <+8>:  calll  0x148787d                 ; <+13>
    0x148787d <+13>: popl   %edi
    0x148787e <+14>: leal   0x3165b(%edi), %esi
    0x1487884 <+20>: movl   %esi, (%esp)
    0x1487887 <+23>: calll  0x14789b0                 ; oni::implementation::Context::clearErrorLogger()
    0x148788c <+28>: movl   0x30797(%edi), %eax
    0x1487892 <+34>: cmpl   $0x0, (%eax)
    0x1487895 <+37>: je     0x14878a6                 ; <+54>
    0x1487897 <+39>: movl   0x8(%ebp), %eax
    0x148789a <+42>: movl   %eax, 0x4(%esp)
    0x148789e <+46>: movl   %esi, (%esp)
    0x14878a1 <+49>: calll  0x14780f0                 ; oni::implementation::Context::streamDestroy(_OniStream*)
    0x14878a6 <+54>: addl   $0x10, %esp   <-------------- waiting for mutex here
    0x14878a9 <+57>: popl   %esi
    0x14878aa <+58>: popl   %edi
    0x14878ab <+59>: popl   %ebp
    0x14878ac <+60>: retl   
    0x14878ad <+61>: nopl   (%eax)
#0  0x9b319422 in __psynch_mutexwait ()
#1  0x01545e1d in _pthread_mutex_lock_wait ()
#2  0x0154327d in _pthread_mutex_lock_slow ()
#3  0x01543106 in pthread_mutex_lock ()
#4  0x013519a7 in xnOSLockMutex ()
#5  0x0134fd5b in xnOSEnterCriticalSection ()
#6  0x0132f160 in xnl::EventInterface<void (*)(oni_file::PlayerSource::NewDataEventArgs const&, void*)>::Unregister(XnCallbackHandleImpl*) ()
#7  0x0132ef8d in oni_file::PlayerSource::UnregisterNewDataEvent(OniCallbackHandleImpl*) ()
#8  0x0132fb77 in oni_file::PlayerStream::~PlayerStream() ()
#9  0x0132faf3 in oni_file::PlayerStream::~PlayerStream() ()
#10 0x013274cb in oni_file::PlayerDevice::destroyStream(oni::driver::StreamBase*) ()
#11 0x01484cbb in oni::implementation::VideoStream::~VideoStream() ()
#12 0x01484ab3 in oni::implementation::VideoStream::~VideoStream() ()
#13 0x01477906 in oni::implementation::Context::streamDestroy(oni::implementation::VideoStream*) ()
#14 0x01478111 in oni::implementation::Context::streamDestroy(_OniStream*) ()
#15 0x014878a6 in oniStreamDestroy ()
...
@jselikof
Copy link

Are you in the develop branch?

@micuat
Copy link
Author

micuat commented May 12, 2016

@jselikof no, it's 2.2.0.33 beta distribution on structure.io website.

@jselikof
Copy link

@micuat please try building from the develop branch and report your results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants