Cannot access source error on macOS
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 840
- Forks
- 137
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 1
Description
I get the following error when I run the latest commit on master (6dbec44). I had a font use issue using the plotters crate, which I submitted here. Then I figured I'd check font kit.
❯ RUST_BACKTRACE=1 cargo test --all
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
--> src/loaders/core_text.rs:318:17
|
318 | drop(self.typographic_bounds(glyph_id)?);
| ^^^^^----------------------------------^
| |
| argument has type `RectF`
|
= note: use `let _ = ...` to ignore the expression or result
= note: `#[warn(dropping_copy_types)]` on by default
warning: `font-kit` (lib) generated 1 warning
warning: `font-kit` (lib test) generated 1 warning (1 duplicate)
warning: function `check_filename` is never used
--> tests/select_font.rs:52:4
|
52 | fn check_filename(handle: &Handle, filename: &str) {
| ^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `font-kit` (test "select_font") generated 1 warning
Finished test [unoptimized + debuginfo] target(s) in 0.05s
Running unittests src/lib.rs (target/debug/deps/font_kit-e862f2696a9109b9)
running 5 tests
test loaders::core_text::test::test_core_text_to_css_font_stretch ... ok
test loaders::core_text::test::test_core_text_to_css_font_weight ... ok
test sources::core_text::test::test_css_to_core_text_font_stretch ... ok
test sources::core_text::test::test_css_to_core_text_font_weight ... ok
test loaders::core_text::test::test_from_core_graphics_font ... FAILED
failures:
---- loaders::core_text::test::test_from_core_graphics_font stdout ----
thread 'loaders::core_text::test::test_from_core_graphics_font' panicked at src/loaders/core_text.rs:940:14:
called `Result::unwrap()` on an `Err` value: CannotAccessSource
stack backtrace:
0: rust_begin_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1653:5
3: core::result::Result<T,E>::unwrap
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1077:23
4: font_kit::loaders::core_text::test::test_from_core_graphics_font
at ./src/loaders/core_text.rs:938:21
5: font_kit::loaders::core_text::test::test_from_core_graphics_font::{{closure}}
at ./src/loaders/core_text.rs:937:38
6: core::ops::function::FnOnce::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
7: core::ops::function::FnOnce::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failures:
loaders::core_text::test::test_from_core_graphics_font
test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
error: test failed, to rerun pass `--lib`
Version Information
I'm on macOS 14.0, x86; rustc 1.75.0.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running RUST_BACKTRACE=1 cargo test --all and inspect src/loaders/core_text.rs around line 940, where test_from_core_graphics_font unwraps CannotAccessSource. Trace the Core Text source-access path involved by that test; done means the macOS test completes without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100