Add backtraces for allocation failures #30
This commit is contained in:
parent
cf72a796f4
commit
c980fe2b4b
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -144,8 +144,10 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "assert_no_alloc"
|
name = "assert_no_alloc"
|
||||||
version = "1.1.2"
|
version = "1.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "git+https://github.com/robbert-vdh/rust-assert-no-alloc.git?branch=nih-plug#95120d996240a2c279a6067502e11b62d30563a6"
|
||||||
checksum = "55ca83137a482d61d916ceb1eba52a684f98004f18e0cafea230fe5579c178a3"
|
dependencies = [
|
||||||
|
"backtrace",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-channel"
|
name = "async-channel"
|
||||||
|
@ -4153,7 +4155,7 @@ version = "1.6.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
|
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 0.1.10",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
]
|
]
|
||||||
|
|
12
Cargo.toml
12
Cargo.toml
|
@ -88,8 +88,16 @@ serde_json = "1.0"
|
||||||
simplelog = "0.12"
|
simplelog = "0.12"
|
||||||
widestring = "1.0.0-beta.1"
|
widestring = "1.0.0-beta.1"
|
||||||
|
|
||||||
# Used for the `assert_process_allocs` feature
|
# Used for the `assert_process_allocs` feature. This fork includes support for
|
||||||
assert_no_alloc = { version = "1.1", optional = true }
|
# the log crate and printing backtraces on allocation failure so you can trace
|
||||||
|
# the allocation back to a place in the code.
|
||||||
|
# TODO: The `log` feature causes would pipe these messages through our logger
|
||||||
|
# which is great in theory, but if the allocation failure happens as part
|
||||||
|
# of the logger then this will cause the program to hang indefinitely
|
||||||
|
# because simplelog gates the log function behind a mutex. At some point
|
||||||
|
# we should implement our own logger and enable this feature. That way we
|
||||||
|
# can also use CLAP's logging extension.
|
||||||
|
assert_no_alloc = { git = "https://github.com/robbert-vdh/rust-assert-no-alloc.git", branch = "nih-plug", features = ["backtrace"], optional = true }
|
||||||
|
|
||||||
# Used for the `standalone` feature
|
# Used for the `standalone` feature
|
||||||
# NOTE: OpenGL support is not needed here, but rust-analyzer gets confused when
|
# NOTE: OpenGL support is not needed here, but rust-analyzer gets confused when
|
||||||
|
|
Loading…
Reference in a new issue