# Troubleshooting

Start with `rlc --version`, installation method, OS/architecture and the exact
command. Check [known limitations](PRODUCTION_READINESS.md) before assuming an
unsupported format/platform is a regression. See [community channels](COMMUNITY.md)
for help and [SECURITY.md](../SECURITY.md) for vulnerability reports.

## Build or loader errors

- **FFmpeg/pkg-config not found:** confirm development headers and pkg-config
  files for avcodec, avformat, avutil, swresample and swscale. `ffmpeg -version`
  describes the CLI's build; it does not prove which libraries RLC linked.
- **libclang or resource headers missing:** install a matching libclang/header
  set and use `LIBCLANG_PATH` if discovery fails. Avoid mixing an unrelated
  compiler's builtin headers with libclang.
- **libass too old or missing:** runtime requires >= 0.17.5. Follow the developer
  guide's pinned helper and scoped PKG_CONFIG_PATH/LIBRARY_PATH/loader environment.
- **System ffmpeg reports undefined symbols:** remove distribution-specific
  LD_LIBRARY_PATH/DYLD_LIBRARY_PATH from the CLI's environment. The reduced
  bundled FFmpeg build may share a SONAME with a system build that needs more
  symbols. Do not install the reduced prefix globally.
- **AppImage reports GLIBC/GLIBCXX missing:** inspect the release's Linux build
  metadata. Local artifacts built here require glibc 2.44; do not replace your
  system C runtime to run them. Use an artifact built for your baseline once
  verified, or build the project in a suitable development environment.

## Playback and controls

`rlc info FILE` tests probing without opening a window/audio device. If that
fails, confirm a readable regular local file and a supported self-contained
container. Inputs use a format allowlist; manifests, secondary protocols and
network playback are intentionally excluded. File extensions are not proof of
container or codec support. Do not send suspected malicious media in public.

For a window/GPU failure, check that a display session and compatible graphics
backend are available. For audio failure, check the default device and your OS's
audio service. RLC currently does not provide an audio output-device chooser.
An early audio failure can prevent A/V playback from opening. Record the error;
do not assume disabling validation or globally changing drivers will fix it.

If shortcuts appear inactive, leave the path field so it no longer captures
keyboard input. For subtitles, verify text format/encoding, cue times, selected
track and fonts. Bitmap tracks and HDR tone mapping are not implemented. Large
embedded subtitle scans may take time; wait for the visible result or error.
Terminal `audio` playback does not apply parsed config defaults to its controls.

RLC reports scheduling drift and due-frame drops, not physical display/audio
loopback accuracy. A log showing zero drops does not prove lip-sync correctness.
See [benchmarks](BENCHMARKS.md) for measurement conditions rather than comparing
numbers from different files or hardware.

## Useful diagnostics

```sh
rlc --version
rlc info /path/to/media.mkv
# Review and sanitize the resulting log before sharing it.
RUST_LOG=rlc=info RUST_BACKTRACE=1 rlc play /path/to/media.mkv --exit-at-eof
```

Logs and backtraces can contain local paths and other private information. If
sharing a build report, also include rustc/cargo versions, FFmpeg/libass versions,
feature flags, GPU/audio details and precise reproduction steps. Prefer a tiny
fixture generated with FFmpeg lavfi to redistributing personal media. Do not
upload crash dumps or private clips by default. A suspected memory-safety/security
issue belongs in the private reporting process, including its current limitations.

For CI failures distinguish compile/test errors, failed strict dependency health,
missing native/device requirements and hosted service issues. Strict maintenance
warnings remain failing gates by policy; follow the audit rather than ignoring
them. No response time or fix is guaranteed for unsupported platform reports.
