Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

frequent SIGSEGV crashes when adding OnFrameAvailableListener to example application #78

Open
joep27182 opened this issue Sep 30, 2016 · 0 comments

Comments

@joep27182
Copy link

I noticed that adding an empty OnFrameAvailableListenerto the Tango service frequently causes a SIGSEGVcrash when a lifecycle transition happens (i.e. onPause() / onResume() etc.). This is quite a problem for me since I need to perform operations on image data itself using OpenCV. If someone has a workaround for accessing raw image data without crashes, please let me know.

Steps to reproduce:

  • add the following code at the end of setTangoListeners() in the java_augmented_reality_exampleproject:
mTango.experimentalConnectOnFrameListener(TangoCameraIntrinsics.TANGO_CAMERA_COLOR, new Tango.OnFrameAvailableListener() {
    @Override
    public void onFrameAvailable(TangoImageBuffer tangoImageBuffer, int i) {

    }
});
  • launch the app, trigger some lifecycle events by switching back and forth between android and the app

Logcat:

10-02 21:03:54.656 31675-31675/com.projecttango.experiments.augmentedrealitysample I/tango-client-api-jni: DisconnectTexture context 0x4b0cc0f0, camera 0
10-02 21:03:54.656 31675-31675/com.projecttango.experiments.augmentedrealitysample I/tango_client_api: TangoErrorType TangoService_disconnectCamera(TangoCameraId): Disconnecting camera_id = 0...
10-02 21:03:54.656 31675-31675/com.projecttango.experiments.augmentedrealitysample I/tango_client_api: TangoErrorType TangoService_disconnectCamera(TangoCameraId): Done disconnecting camera.
10-02 21:03:54.656 31675-31675/com.projecttango.experiments.augmentedrealitysample I/tango_client_api: void TangoService_disconnect(): Disconnecting from Tango...

Backtrace:

(lldb) bt
* thread #13: tid = 31692, 0x4b088ee0 libtango_client_api.so`Tango::TangoGraphicBuffer::unlock() const + 8, name = 'Binder_2', stop reason = signal SIGSEGV: invalid address (fault address: 0x44)
    frame #0: 0x4b088ee0 libtango_client_api.so`Tango::TangoGraphicBuffer::unlock() const + 8
    frame #1: 0x4b077df2 libtango_client_api.so`TangoListener::onGraphicBufferAvailable(android::sp<Tango::TangoGraphicBuffer> const&) + 162
    frame #2: 0x4b084722 libtango_client_api.so`Tango::ClientListener::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int) + 446
    frame #3: 0x401cb226 libbinder.so`android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int) + 62
    frame #4: 0x401cf79a libbinder.so`android::IPCThreadState::executeCommand(int) + 510
    frame #5: 0x401cfb1a libbinder.so`android::IPCThreadState::getAndExecuteCommand() + 42
    frame #6: 0x401cfb90 libbinder.so`android::IPCThreadState::joinThreadPool(bool) + 52
    frame #7: 0x401d39ac libbinder.so
    frame #8: 0x4019ea5a libutils.so`android::Thread::_threadLoop(void*) + 218
    frame #9: 0x4022beb2 libandroid_runtime.so`android::AndroidRuntime::javaThreadShell(void*) + 70
    frame #10: 0x4019e58c libutils.so
    frame #11: 0x401231b4 libc.so`__thread_entry + 76
  * frame #12: 0x4012334c libc.so`pthread_create + 244

Version Info:

Both Tango Core and TangoRelaseLibs / Tango Examples are at relase version "Vega".

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

No branches or pull requests

1 participant