Comments (7)
Got the test_work.lv2 plugin running here,... However I really don't know whether what or when it ever fails: I do see "worker N called!" messages and I think the respective "response N called" afterwards. I do activate/deactivate the plugin in quick succession to let it spawn 10 of those each time. Unfortunately I cannot say it ever failed. Maybe I'm doing it wrong or not looking in the right direction.
Care to explain or demonstrate what am I supposed to see when it is said to "fail" ?
Thanks in advance.
from qtractor.
Thanks for looking!
So here's a sample output of a normal run:
plugin activated!
worker 0 scheduled!
worker 1 scheduled!
worker 2 scheduled!
worker 3 scheduled!
worker 4 scheduled!
worker 5 scheduled!
worker 6 scheduled!
worker 7 scheduled!
worker 8 scheduled!
worker 9 scheduled!
worker 0 called! sleeping 0 seconds..
worker 1 called! sleeping 0 seconds..
worker 2 called! sleeping 0 seconds..
worker 3 called! sleeping 0 seconds..
worker 4 called! sleeping 0 seconds..
worker 5 called! sleeping 0 seconds..
worker 6 called! sleeping 0 seconds..
worker 7 called! sleeping 0 seconds..
worker 8 called! sleeping 0 seconds..
worker 9 called! sleeping 0 seconds..
response 0 called!
response 1 called!
response 2 called!
response 3 called!
response 4 called!
response 5 called!
response 6 called!
response 7 called!
response 8 called!
response 9 called!
but after retrying a few times I get the failed version, note I only get the running message and response from worker 0, and no more:
plugin activated!
worker 0 scheduled!
worker 1 scheduled!
worker 2 scheduled!
worker 3 scheduled!
worker 4 scheduled!
worker 5 scheduled!
worker 6 scheduled!
worker 7 scheduled!
worker 8 scheduled!
worker 9 scheduled!
worker 0 called! sleeping 0 seconds..
response 0 called!
Oddly if I deactivate, then reactivate agan, the previous workers finally do run eventually, along with the 10 new workers. But they never ran when they were supposed to.
from qtractor.
Ok I figured out how to trigger the bug every time, just like my sampler code. I pass a char array containing the path in the data field of the work callback. I have it set to 256 chars long. Now it always fails on the third worker, consistently, just like my sampler does in qtractor.
I have pushed the update here if you'd like to pull / retry
https://github.com/jmage619/test_work.lv2
from qtractor.
Now that explains it: the qtractor ring-buffer capacity for each plugin instance is fixed to 1KB, so that it will only accommodate at least 3 of those 256B+ worker schedules on each run--all else will get dropped and lost into oblivion, sorry.
ps. just to compare on other lv2 hosts: jalv does 4KB fixed; ardour is 4x current jack-buffer-size in frames x 4Bytes; or 4x 8KB if using the alsa backend (=32KB).
pps. hopefully fixed on git head master 9502a07
from qtractor.
Ah ok, so just to be sure I'm understanding, my jack frames / period is 128, period is 3, so buf size is 384. For ardour this would give 4 x 384 x4 = 6k
I'd like to support O(100) wavs being loaded at any given time. Even in ardour with those settings I won't be able to schedule more than 24 workers.
Based on what I'm observing is it true that lv2 workers don't run concurrently? only one can run at a time anyway? Perhaps I can change my scheduling to just schedule the next wav loading worker after the previous finishes from its response callback without too much of a performance hit?
Also, I think you've explained the main problem I reported, but I'm not convinced it's related to the random freezing of workers I observed when the data size was sizeof (int) when I was only passing the worker id.
Let me know your thoughts, and thanks again for taking the time out to help me get to the bottom of this! I'll try your updated master later this weekend.
from qtractor.
maybe you can try passing just the pointers (8bytes) as payload to the schedule/response messages? instead of copies of the complete path and/or file-name as you suggest (256byte+)?
there's not really a problem as the whole happens under the same process address-space, just over separate threads, one of them being the real-time one (the one that issues the schedule() calls, which you want to offload from non-realtime processing, like opening and actually read/loading the sample files from disk (the worker thread that issues the response calls), right?
from qtractor.
I retested with the latest master, and it looks like both the issues with not enough ring buffer space, and also the earlier random failures are no longer happening.
Also I took your suggestion and came up with a way to pass pointers rather than the char arrays, that seems to do the trick!
from qtractor.
Related Issues (20)
- piano roll painting issue HOT 8
- Qtractor doesn't fully draw VST3 GUI HOT 8
- automation gets switched on when it shouldn't HOT 2
- MIDI recording with countdown issue HOT 12
- Send MIDI start/stop HOT 3
- MIDI off is not sent on transport stop HOT 10
- Dont Work: Reverse Keyboard modifiers role (Shift/Ctrl) HOT 2
- Incorrect scaling in volumeters MIDI track with audio output HOT 4
- Proposed improvements to the status bar HOT 2
- Direct connections between buses do not work HOT 3
- Strange behaviour of audio inserts HOT 2
- Audio export is unreliable HOT 26
- commit 10dfd45 crashed when loading existing project HOT 20
- Time signature change breaks MIDI snapping HOT 2
- Feature Request: Step Input HOT 9
- Crashes badly with LSP-plugins HOT 15
- Distorted sound in Windows plugins via Carla HOT 1
- GUI is shown in a gigantic window larger than the screen with Calf Gate LV2 plugin, and other Calf LV2 plugins
- Application crashes when the GUI window of the noise-suppression-for-voice LV2 plugin
- Split MIDI clip doesn't work HOT 5
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 qtractor.