Commit 2aeb09e
EffectsBackend: fix crash when AU manifest loading times out
AudioUnitBackend loads manifests asynchronously via dispatch_group_async
with a 6-second timeout. If the timeout fires, m_manifestsById is only
partially populated, but getEffectIds() was iterating m_componentsById
(populated synchronously for every discovered AU). Callers would then
receive null EffectManifestPointers from getManifest(), and the next
std::sort on the combined manifest list would dereference null in
EffectManifest::sortLexigraphically and segfault.
Fix:
- AudioUnitBackend::getEffectIds() now returns keys from m_manifestsById
so only fully loaded manifests are reported. The three map accessors
also take m_mutex (now mutable) to stop racing the loader threads.
- EffectManifest::sortLexigraphically null-checks both arguments as
defensive insurance for any other backend that might expose a null.1 parent 30a3fb9 commit 2aeb09e
2 files changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | | - | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
| |||
0 commit comments