Skip to content

Index out of bounds #769

Open
Open
@RGBCube

Description

@RGBCube

Platform: Linux, NixOS
Terminal software: Ghostty

I get this when I do ffmpeg -i RGBCube.gif -crf, assuming ffmpeg is installed.

thread 'main' panicked at /build/rustc-1.75.0-src/library/core/src/str/mod.rs:666:13:
byte index 4 is out of bounds of `dds`
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::str::slice_error_fail_rt
   3: core::str::slice_error_fail
   4: reedline::menu::columnar_menu::ColumnarMenu::create_string
   5: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
   6: <alloc::string::String as core::iter::traits::collect::FromIterator<alloc::string::String>>::from_iter
   7: <reedline::menu::columnar_menu::ColumnarMenu as reedline::menu::Menu>::menu_string
   8: reedline::painting::painter::Painter::print_menu
   9: reedline::painting::painter::Painter::repaint_buffer
  10: reedline::engine::Reedline::repaint
  11: reedline::engine::Reedline::read_line
  12: nu_cli::repl::evaluate_repl
  13: nu::run::run_repl
  14: nu::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Here is a recording, but it doesn't show the trace as it appears for a split second: https://asciinema.org/a/oO8bzFkNpKFd3aFVq7Bfatr2d

The .cast file has it, though.

Here is my completer config:

$env.config.completions = {
  algorithm:      prefix
  case_sensitive: false
  partial:        true
  quick:          true
  external: {
    enable:      true
    max_results: 100
    completer:   {|tokens: list<string>|
      let expanded = scope aliases | where name == $tokens.0 | get --ignore-errors expansion.0

      mut expanded_tokens = if $expanded != null and $tokens.0 != "cd" {
        $expanded | split row " " | append ($tokens | skip 1)
      } else {
        $tokens
      }

      $expanded_tokens.0 = ($expanded_tokens.0 | str trim --left --char "^")

      fish --command $"complete '--do-complete=($expanded_tokens | str join ' ')'"
      | $"value(char tab)description(char newline)" + $in
      | from tsv --flexible --no-infer
    }
  }
}

Everything is from nixpkgs unstable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions