Comments (5)
We have solved this issue in an internal version and will publish a patch release in January that will include this fix.
from opensmile.
Does this happen every time when you attempt to use multiple threads or only sometimes? Does it happen with only specific config files? What would be the best approach to reproduce it?
In general, the SMILEapi should be fully thread-safe as long as you only use separate instances in each thread.
from opensmile.
@chausner-audeering I have also encountered this issue when trying to use multiple threads with the python library. It seems to occur randomly, which might indicate some kind of race condition. But I have found the issue with all of the standard configs and the IS13 config I adapted.
I have some test code below which is hopefully reproducible.
from threading import Thread
import numpy as np
import opensmile
signals = np.random.random_sample(size=(2, 80000)).astype(np.float32)
def test(i):
smile = opensmile.Smile(logfile=f"smile_{i}.log")
smile(signals[i], 16000)
del smile
threads = [Thread(target=test, args=(i,)) for i in range(2)]
for t in threads:
t.start()
for t in threads:
t.join()
When I run this code, it sometimes suceeds, sometimes fails with a segmentation fault, and sometimes raises the "Code 6" exception mentioned above. Sometimes the error occurs during Smile
initialisation and other times it occurs during processing a signal.
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "test.py", line 10, in test
smile = opensmile.Smile(logfile=f"smile_{i}.log")
File "/home/akee511/src/emotion/.venv/lib/python3.8/site-packages/audobject/core/decorator.py", line 109, in wrapper
func(self, *args, **kwargs)
File "/home/akee511/src/emotion/.venv/lib/python3.8/site-packages/audeer/core/utils.py", line 174, in new_func
return func(*args, **kwargs)
File "/home/akee511/src/emotion/.venv/lib/python3.8/site-packages/opensmile/core/smile.py", line 173, in __init__
self._feature_names(),
File "/home/akee511/src/emotion/.venv/lib/python3.8/site-packages/opensmile/core/smile.py", line 333, in _feature_names
smile = self._smile(options=options)
File "/home/akee511/src/emotion/.venv/lib/python3.8/site-packages/opensmile/core/smile.py", line 424, in _smile
smile.initialize(
File "/home/akee511/src/emotion/.venv/lib/python3.8/site-packages/opensmile/core/SMILEapi.py", line 240, in initialize
self._check_smile_result(smileapi.smile_initialize(self._smileobj,
File "/home/akee511/src/emotion/.venv/lib/python3.8/site-packages/opensmile/core/SMILEapi.py", line 478, in _check_smile_result
raise OpenSmileException(result)
opensmile.core.SMILEapi.OpenSmileException: Code: 6
When looking at the log files, one of them produces no errors but the other produces the error:
[ 26.11.2021 - 17:18:09 ]
(ERR) [1] configManager: ConfigType::findFieldH: referenced base field with name 'Extremes.max' not found!
[ 26.11.2021 - 17:18:09 ]
(ERR) [1] configManager: (line 29) cFileConfigReader::getInstance: unknown field type (name 'Extremes.max') (in ConfigType 'cFunctionals') ty=-1
from opensmile.
@agkphysics Thanks a lot, that's very useful information.
from opensmile.
Version 3.0.1 has been released with the fix.
from opensmile.
Related Issues (20)
- Execution failed for task ':opensmile:compileDebugKotlin'. > Compilation error. See log for more details(Android_template)) HOT 2
- Correct field in output .wav file header HOT 3
- Can I pass RTMP Link as input to opensmile? HOT 11
- Issue on recording using smileapi HOT 1
- Extract emotions from speech HOT 1
- Output Inconstancy of Feature set HOT 7
- libm.so.6: version 'GLIBC_2.27' not found HOT 7
- (MSG): No filename given HOT 3
- zsh: command not found: SMILExtract HOT 4
- OpenSmile output export HOT 2
- Ndst in ./src/lldcore/intensity.cpp HOT 2
- Why the output line in csv file always have some badlines? HOT 1
- eGeMAPS Implementation HOT 1
- build error no such file src/include/io/rosSink.hpp:55:10: fatal error: ros/ros.h: HOT 2
- AttributeError: module 'opensmile' has no attribute 'Smile' HOT 1
- version `GLIBC_***` is too low to run. HOT 1
- Reading features from output file HOT 4
- Custom `win_len` and `hop_dur` in openSmile python
- Compiling from Source m1 Mac; finite
- Issue with smileMath_csplint_init when migrating from version 2.0 to 3.*
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensmile.