OrbbecSDK icon indicating copy to clipboard operation
OrbbecSDK copied to clipboard

hang on exit - 1.8.1 sdk

Open ofTheo opened this issue 2 years ago • 0 comments

Experiencing this on Linux and Mac.

If I exit my app while the camera ( Femto Mega ) is running I get a hang in one of the non main threads at pthread_kill and the following message printed out: libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument

The main thread while not crashed is stuck here:

    try{
		if( mPipe ){	
			mPipe->stop();  <------- 
			mPipe.reset();
			pointCloud.reset();
                }
    }catch(ob::Error &e) {
        std::cerr << "function:" << e.getName() << "\nargs:" << e.getArgs() << "\nmessage:" << e.getMessage() << "\ntype:" << e.getExceptionType() << std::endl;
    }

Is the OrbbecSDK listening for signals and terminating threads in some weird way? As this only seems to happen on my app's exit.

If I delete my camera object while my app is running I get zero issues, it is only if I try and close and delete my camera on exit that this issue seems to occur.

Maybe this is still unresolved from #12 ?

The only useful log info seems to be:

[*** LOG ERROR #0001 ***] [2023-11-29 11:30:35] [OrbbecSDK] {mutex lock failed: Invalid argument}
libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument

ofTheo avatar Nov 29 '23 19:11 ofTheo