Open evanescente-ondine opened 2 years ago
Please indicate your OS and console and provide the debug log of the crashing session.
12:02:51.674 [INFO] cli_log::init: Starting broot v1.9.2 with log level DEBUG 12:02:51.674 [DEBUG] broot: env::args(): [ "broot", "--outcmd", "/tmp/tmp.FKLE1D750S", ] 12:02:51.680 [DEBUG] broot::cli: Conf::from_default_location() took 4.988359ms 12:02:51.680 [DEBUG] broot::cli: config: Conf { files: [ "/home/drm/.config/broot/conf.hjson", ], default_flags: Some( "h", ), date_time_format: None, verbs: [ VerbConf { invocation: Some( "touch {new_file}", ), internal: None, external: None, execution: Some( String( "touch {directory}/{new_file}", ), ), cmd: None, cmd_separator: None, key: None, keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "edit", ), internal: None, external: Some( String( "micro +{line} {file}", ), ), execution: None, cmd: None, cmd_separator: None, key: None, keys: [], shortcut: Some( "e", ), leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "enter", ), internal: None, external: Some( String( "handlr open {file}", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "enter", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "file", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "names", ), internal: None, external: Some( String( "bash -r -c wl-copy $(basename -a {file})", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "ctrl-n", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "any", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "enter_folder", ), internal: Some( ":open_stay_filter", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "enter", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "directory", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "enter_without_maintaining_focus", ), internal: Some( ":focus", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "shift-enter", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "directory", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "delete", ), internal: None, external: Some( String( "rm -r {file}", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "ctrl-del", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "any", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: None, external: None, execution: None, cmd: Some( ":toggle_stage {file};:line_down;", ), cmd_separator: None, key: Some( "tab", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: Some( ":clear_stage", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "alt-c", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "create {subpath}", ), internal: None, external: Some( String( "micro {directory}/{subpath}", ), ), execution: None, cmd: None, cmd_separator: None, key: None, keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "git_diff", ), internal: None, external: Some( String( "git difftool -y {file}", ), ), execution: None, cmd: None, cmd_separator: None, key: None, keys: [], shortcut: Some( "gd", ), leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "home", ), internal: Some( ":focus ~", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "ctrl-H", ), keys: [], shortcut: None, leave_broot: None, from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: Some( ":line_down", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "alt-j", ), keys: [], shortcut: None, leave_broot: None, from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "backup {version}", ), internal: None, external: None, execution: Some( String( "cp -r {file} {parent}/{file-stem}-{version}{file-dot-extension}", ), ), cmd: None, cmd_separator: None, key: Some( "ctrl-b", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: Some( false, ), }, VerbConf { invocation: Some( "terminal", ), internal: None, external: None, execution: Some( String( "$SHELL", ), ), cmd: None, cmd_separator: None, key: Some( "ctrl-t", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: Some( true, ), working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: None, external: Some( String( "cp -R {file} {other-panel-directory}", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "F5", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: None, external: Some( String( "mv {file} {other-panel-directory}", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "F6", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, ], skin: Some( { "default": SkinEntry { focused: CompoundStyle { object_style: ContentStyle { foreground_color: None, background_color: None, attributes: Attributes( 0, ), }, }, unfocused: Some( CompoundStyle { object_style: ContentStyle { foreground_color: Some( Green, ), background_color: None, attributes: Attributes( 0, ), }, }, ), }, }, ), special_paths: {}, search_modes: None, disable_mouse_capture: None, cols_order: None, show_selection_mark: Some( true, ), ext_colors: {}, syntax_theme: None, true_colors: Some( true, ), icon_theme: None, modal: None, max_panels_count: None, quit_on_last_cancel: None, file_sum_threads_count: None, } 12:02:51.708 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 108ns 12:02:51.710 [DEBUG] broot::tree_build::builder: blines before trimming: 91 12:02:51.710 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted 12:02:51.731 [DEBUG] broot::app::app: display panel took 11.917583ms 12:02:51.731 [INFO] broot::app::app: pending_tasks took 1.535µs 12:02:52.549 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60871, tv_nsec: 710740225 }, event: Key(KeyEvent { code: Char('n'), modifiers: NONE }), double_click: false } 12:02:52.550 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "n", expr: BeTree { atoms: [PatternParts { parts: ["n"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } } 12:02:52.551 [DEBUG] broot::app::app: display panel took 307.332µs 12:02:52.551 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 132ns 12:02:52.576 [DEBUG] broot::tree_build::builder: blines before trimming: 294 12:02:52.576 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted 12:02:52.577 [INFO] broot::browser::browser_state: tree filtering on "n" took 25.352542ms 12:02:52.579 [DEBUG] broot::app::app: display panel took 1.844662ms 12:02:52.579 [INFO] broot::app::app: pending_tasks took 27.780149ms 12:02:52.652 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60871, tv_nsec: 813662470 }, event: Key(KeyEvent { code: Char('t'), modifiers: NONE }), double_click: false } 12:02:52.653 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt", expr: BeTree { atoms: [PatternParts { parts: ["nt"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } } 12:02:52.655 [DEBUG] broot::app::app: display panel took 1.10261ms 12:02:52.655 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 132ns 12:02:52.740 [DEBUG] broot::tree_build::builder: blines before trimming: 370 12:02:52.740 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted 12:02:52.741 [INFO] broot::browser::browser_state: tree filtering on "nt" took 86.024521ms 12:02:52.743 [DEBUG] broot::app::app: display panel took 1.872385ms 12:02:52.744 [INFO] broot::app::app: pending_tasks took 88.644812ms 12:02:53.056 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60872, tv_nsec: 217540423 }, event: Key(KeyEvent { code: Char('/'), modifiers: NONE }), double_click: false } 12:02:53.057 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt/", expr: BeTree { atoms: [PatternParts { parts: ["nt", ""] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } } 12:02:53.058 [DEBUG] broot::app::app: display panel took 648.003µs 12:02:53.059 [INFO] broot::app::app: pending_tasks took 600ns 12:02:53.435 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60872, tv_nsec: 596431020 }, event: Key(KeyEvent { code: Char('i'), modifiers: NONE }), double_click: false } 12:02:53.436 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt/i", expr: BeTree { atoms: [PatternParts { parts: ["nt", "i"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } } 12:02:53.437 [DEBUG] broot::app::app: display panel took 625.414µs 12:02:53.437 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 120ns 12:02:53.442 [DEBUG] broot::tree_build::builder: blines before trimming: 68 12:02:53.443 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted 12:02:53.456 [INFO] broot::browser::browser_state: tree filtering on "nt/i" took 18.21111ms 12:02:53.458 [DEBUG] broot::app::app: display panel took 1.819691ms 12:02:53.458 [INFO] broot::app::app: pending_tasks took 20.566735ms 12:02:53.588 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60872, tv_nsec: 749377095 }, event: Key(KeyEvent { code: Char('m'), modifiers: NONE }), double_click: false } 12:02:53.589 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt/im", expr: BeTree { atoms: [PatternParts { parts: ["nt", "im"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } } 12:02:53.591 [DEBUG] broot::app::app: display panel took 1.757251ms 12:02:53.591 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 132ns 12:02:53.611 [DEBUG] broot::tree_build::builder: blines before trimming: 85 12:02:53.612 [INFO] broot::browser::browser_state: tree filtering on "nt/im" took 20.551139ms 12:02:53.613 [DEBUG] broot::app::app: display panel took 867.535µs 12:02:53.614 [INFO] broot::app::app: pending_tasks took 22.208028ms 12:02:53.781 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60872, tv_nsec: 942280655 }, event: Key(KeyEvent { code: Char('m'), modifiers: NONE }), double_click: false } 12:02:53.782 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt/imm", expr: BeTree { atoms: [PatternParts { parts: ["nt", "imm"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } } 12:02:53.783 [DEBUG] broot::app::app: display panel took 1.156813ms 12:02:53.784 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 132ns
By the way, I'm sorry, when I past in the editing panel the text is formatted normally, but in the preview and final post, all line feeds disappear !
Don't worry for the formatting, I can read it.
12:02:51.674 [INFO] cli_log::init: Starting broot v1.9.2 with log level DEBUG
12:02:51.674 [DEBUG] broot: env::args(): [ "broot", "--outcmd", "/tmp/tmp.FKLE1D750S", ]
12:02:51.680 [DEBUG] broot::cli: Conf::from_default_location() took 4.988359ms
12:02:51.680 [DEBUG] broot::cli: config: Conf { files: [ "/home/drm/.config/broot/conf.hjson", ], default_flags: Some( "h", ), date_time_format: None, verbs: [ VerbConf { invocation: Some( "touch {new_file}", ), internal: None, external: None, execution: Some( String( "touch {directory}/{new_file}", ), ), cmd: None, cmd_separator: None, key: None, keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "edit", ), internal: None, external: Some( String( "micro +{line} {file}", ), ), execution: None, cmd: None, cmd_separator: None, key: None, keys: [], shortcut: Some( "e", ), leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "enter", ), internal: None, external: Some( String( "handlr open {file}", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "enter", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "file", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "names", ), internal: None, external: Some( String( "bash -r -c wl-copy $(basename -a {file})", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "ctrl-n", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "any", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "enter_folder", ), internal: Some( ":open_stay_filter", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "enter", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "directory", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "enter_without_maintaining_focus", ), internal: Some( ":focus", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "shift-enter", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "directory", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "delete", ), internal: None, external: Some( String( "rm -r {file}", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "ctrl-del", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: Some( "any", ), set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: None, external: None, execution: None, cmd: Some( ":toggle_stage {file};:line_down;", ), cmd_separator: None, key: Some( "tab", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: Some( ":clear_stage", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "alt-c", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "create {subpath}", ), internal: None, external: Some( String( "micro {directory}/{subpath}", ), ), execution: None, cmd: None, cmd_separator: None, key: None, keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "git_diff", ), internal: None, external: Some( String( "git difftool -y {file}", ), ), execution: None, cmd: None, cmd_separator: None, key: None, keys: [], shortcut: Some( "gd", ), leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "home", ), internal: Some( ":focus ~", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "ctrl-H", ), keys: [], shortcut: None, leave_broot: None, from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: Some( ":line_down", ), external: None, execution: None, cmd: None, cmd_separator: None, key: Some( "alt-j", ), keys: [], shortcut: None, leave_broot: None, from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: Some( "backup {version}", ), internal: None, external: None, execution: Some( String( "cp -r {file} {parent}/{file-stem}-{version}{file-dot-extension}", ), ), cmd: None, cmd_separator: None, key: Some( "ctrl-b", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: Some( false, ), }, VerbConf { invocation: Some( "terminal", ), internal: None, external: None, execution: Some( String( "$SHELL", ), ), cmd: None, cmd_separator: None, key: Some( "ctrl-t", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: Some( true, ), working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: None, external: Some( String( "cp -R {file} {other-panel-directory}", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "F5", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, VerbConf { invocation: None, internal: None, external: Some( String( "mv {file} {other-panel-directory}", ), ), execution: None, cmd: None, cmd_separator: None, key: Some( "F6", ), keys: [], shortcut: None, leave_broot: Some( false, ), from_shell: None, apply_to: None, set_working_dir: None, working_dir: None, description: None, auto_exec: None, }, ], skin: Some( { "default": SkinEntry { focused: CompoundStyle { object_style: ContentStyle { foreground_color: None, background_color: None, attributes: Attributes( 0, ), }, }, unfocused: Some( CompoundStyle { object_style: ContentStyle { foreground_color: Some( Green, ), background_color: None, attributes: Attributes( 0, ), }, }, ), }, }, ), special_paths: {}, search_modes: None, disable_mouse_capture: None, cols_order: None, show_selection_mark: Some( true, ), ext_colors: {}, syntax_theme: None, true_colors: Some( true, ), icon_theme: None, modal: None, max_panels_count: None, quit_on_last_cancel: None, file_sum_threads_count: None, }
12:02:51.708 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 108ns
12:02:51.710 [DEBUG] broot::tree_build::builder: blines before trimming: 91
12:02:51.710 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted
12:02:51.731 [DEBUG] broot::app::app: display panel took 11.917583ms
12:02:51.731 [INFO] broot::app::app: pending_tasks took 1.535µs
12:02:52.549 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60871, tv_nsec: 710740225 }, event: Key(KeyEvent { code: Char('n'), modifiers: NONE }), double_click: false }
12:02:52.550 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "n", expr: BeTree { atoms: [PatternParts { parts: ["n"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } }
12:02:52.551 [DEBUG] broot::app::app: display panel took 307.332µs
12:02:52.551 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 132ns
12:02:52.576 [DEBUG] broot::tree_build::builder: blines before trimming: 294
12:02:52.576 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted
12:02:52.577 [INFO] broot::browser::browser_state: tree filtering on "n" took 25.352542ms
12:02:52.579 [DEBUG] broot::app::app: display panel took 1.844662ms
12:02:52.579 [INFO] broot::app::app: pending_tasks took 27.780149ms
12:02:52.652 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60871, tv_nsec: 813662470 }, event: Key(KeyEvent { code: Char('t'), modifiers: NONE }), double_click: false }
12:02:52.653 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt", expr: BeTree { atoms: [PatternParts { parts: ["nt"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } }
12:02:52.655 [DEBUG] broot::app::app: display panel took 1.10261ms
12:02:52.655 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 132ns
12:02:52.740 [DEBUG] broot::tree_build::builder: blines before trimming: 370
12:02:52.740 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted
12:02:52.741 [INFO] broot::browser::browser_state: tree filtering on "nt" took 86.024521ms
12:02:52.743 [DEBUG] broot::app::app: display panel took 1.872385ms
12:02:52.744 [INFO] broot::app::app: pending_tasks took 88.644812ms
12:02:53.056 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60872, tv_nsec: 217540423 }, event: Key(KeyEvent { code: Char('/'), modifiers: NONE }), double_click: false }
12:02:53.057 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt/", expr: BeTree { atoms: [PatternParts { parts: ["nt", ""] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } }
12:02:53.058 [DEBUG] broot::app::app: display panel took 648.003µs
12:02:53.059 [INFO] broot::app::app: pending_tasks took 600ns
12:02:53.435 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60872, tv_nsec: 596431020 }, event: Key(KeyEvent { code: Char('i'), modifiers: NONE }), double_click: false }
12:02:53.436 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt/i", expr: BeTree { atoms: [PatternParts { parts: ["nt", "i"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } }
12:02:53.437 [DEBUG] broot::app::app: display panel took 625.414µs
12:02:53.437 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 120ns
12:02:53.442 [DEBUG] broot::tree_build::builder: blines before trimming: 68
12:02:53.443 [DEBUG] broot::tree_build::builder: trimming prematurely interrupted
12:02:53.456 [INFO] broot::browser::browser_state: tree filtering on "nt/i" took 18.21111ms
12:02:53.458 [DEBUG] broot::app::app: display panel took 1.819691ms
12:02:53.458 [INFO] broot::app::app: pending_tasks took 20.566735ms
12:02:53.588 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60872, tv_nsec: 749377095 }, event: Key(KeyEvent { code: Char('m'), modifiers: NONE }), double_click: false }
12:02:53.589 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt/im", expr: BeTree { atoms: [PatternParts { parts: ["nt", "im"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } }
12:02:53.591 [DEBUG] broot::app::app: display panel took 1.757251ms
12:02:53.591 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 132ns
12:02:53.611 [DEBUG] broot::tree_build::builder: blines before trimming: 85
12:02:53.612 [INFO] broot::browser::browser_state: tree filtering on "nt/im" took 20.551139ms
12:02:53.613 [DEBUG] broot::app::app: display panel took 867.535µs
12:02:53.614 [INFO] broot::app::app: pending_tasks took 22.208028ms
12:02:53.781 [INFO] broot::app::app: event: TimedEvent { time: Instant { tv_sec: 60872, tv_nsec: 942280655 }, event: Key(KeyEvent { code: Char('m'), modifiers: NONE }), double_click: false }
12:02:53.782 [DEBUG] broot::app::app: command after add_event: PatternEdit { raw: "nt/imm", expr: BeTree { atoms: [PatternParts { parts: ["nt", "imm"] }], nodes: [Node { operator: None, parent: None, left: Atom(0), right: None, unary: false }], head: 0, tail: 0, last_pushed: Atom, op_count: 0, openess: 0 } }
12:02:53.783 [DEBUG] broot::app::app: display panel took 1.156813ms
12:02:53.784 [DEBUG] broot::tree_build::builder: GitIgnorer::default() took 132ns
I can replicate the same panic and provide additional information. Here is what I did.
I compiled Broot (current master
at 3474c157ec41cc9fc17b4923903737faddcc87d8) in dev
mode after enabling the debug info in Cargo.toml
:
[profile.dev]
debug = true
Then I ran
BROOT_LOG=trace RUST_BACKTRACE=full ./broot 2> backtrace.txt
from the home directory and blindly typed nt/imm
(the TUI doesn't show up as I redirected stderr
).
This way I managed to capture both the Broot log and the Rust panic backtrace. Here is their content.
broot.log
backtrace.txt
The offending instruction is
which in my case get's called with
self = TokPattern { toks: [['i', 'm', 'm']], sum_len: 3 }
candidate = "😍"
cand_chars = ['😍']
cand_chars.len() = 1
l = 3
hence 1 + 1 - 3
causes underflow in unsigned subtraction.
The source of the bug seems to stem from a confusion between indexing a &str
as if it were a &[u8]
vs. treating it as a sequence of Unicode codepoints. This leads to different and incompatible ways to measure the "length" of a str
. The discrepancy is demonstrated by this playground. See also this question on StackOverflow.
In the specific case of the panic described above, the test
https://github.com/Canop/broot/blob/3474c157ec41cc9fc17b4923903737faddcc87d8/src/pattern/tok_pattern.rs#L83
fails because 4 < 3
, but then this does not imply that cand_chars.len() + 1 - l >= 0
, because cand_chars.len()
is merely 1
and not 4
.
Thanks for the report. I'll have a look as fast as possible, but that might be in several days
BTW, I was thinking about deprecating tokens search, which is almost useless IMO (which doesn't mean I don't want to fix it).
Then would we get the same feature as simply ? case-insensitive research is not automatic with regexp search so it's a pain in the behind to add /i each and everytime. I most only use nt/ to search, with bits of the file name.
Yes, there's an issue somewhere about a case insensitive regex search, and I'll do that before deprecating the tokens search.
You should also consider the fuzzy search: its rank algorithm ensures tokens are privileged.
Couldn't you just translate for instance "nt/abc,cfg, ifp" into: nr/(abc.cfg)|(cfg.abc)|(cfg.ifp)|(ifp.cfg)|(ifp.abc)|(afp.ifp) ? I would be fine with fuzzy search, if it could display results like fzf ignoring tree hierarchy, possibly hiding paths. Otherwise, while the token mode is precise to show almost only the desired result, fuzzy mode isn't, and regexp mode requires a lot more keystrokes.
BTW, I was thinking about deprecating tokens search, which is almost useless IMO (which doesn't mean I don't want to fix it).
I think the biggest problem is that the search for the tokens is not complete. For instance, the pattern abc,ca
should match the name cabcabc
like this
cabcabc
^^ ^^^
ca abc
but instead the longest token abc
is matched to the first occurrence
cabcabc
^^^
abc
and then we cannot find a non-overlapping ca
anymore.
You can verify this claim by adding
#[test]
fn test_match() {
// ...
check_match("abc,ca", "cabcabc", true);
}
and watch it fail.
Hi, yet another bug to report, yes sire !
when on my root repertory /home/drm/, and typing
nt/imm
broot crashes with this this bug is totally reproductive and consistent. Again, sorry I can't seem to get the trace in any other way ! token searching works as long as I'm elsewhere than /home/drm/. Or, well, it ain't as reproductive and I don't remember or it didn't show up yet. I can provide bettre traces, if someone explains how :smile: The white boxes are my editing.