Skip to content

SIGSEGV when Alt+J or Alt+R in empty directory #5199

Closed as duplicate
Closed as duplicate

Description

@wojnilowicz

Is there an existing issue for this?

  • I have searched the existing issues

Midnight Commander version and build configuration

GNU Midnight Commander 4.8.33
Built with GLib 2.87.0
Built with S-Lang 2.3.3 with terminfo database
With builtin editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ftpfs, shell
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64; uintmax_t: 64;

Operating system

Linux my_host_name 7.2.2-300.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 28 18:59:37 UTC 2026 x86_64 GNU/Linux

Is this issue reproducible using the latest version of Midnight Commander?

  • I confirm the issue is still reproducible with the latest version of Midnight Commander

How to reproduce

  1. Alt+7 to create a tmp dir
  2. Enter to that tmp dir
  3. Press Alt+R which moves the selection bar to the middle visible entry in the panel

Expected behavior

No crash.

Actual behavior

Crash

Additional context

(gdb) bt full
#0  mc_g_string_copy.isra.0 (dest=0x55f505fa1da0, src=0xe143e) at ../lib/glibcompat.c:248
        __func__ = <optimized out>
#1  0x000055f4df50ee57 in string_file_name (fe=<optimized out>, len=<optimized out>) at filemanager/panel.c:497
No locals.
#2  0x000055f4df513cec in format_file (panel=panel@entry=0x55f505faec90, file_index=file_index@entry=-47, width=width@entry=94, attr=attr@entry=FATTR_MARKED, isstatus=isstatus@entry=0,
    field_length=field_length@entry=0x7ffd19c907e4) at filemanager/panel.c:860
        len = <optimized out>
        perm = 0
        prepared_text = <optimized out>
        name_offset = 0
        str_len = <optimized out>
        i = <optimized out>
        txt = 0x55f4df5c7615 " "
        fi = 0x55f506009160
        color = 3
        length = 1
        format = 0x55f505fedce0 = {0x55f506009160, 0x55f5060091f0, 0x55f506009280, 0x55f5060094d0, 0x55f506009600}
        home = <optimized out>
        fe = 0x55f505fcef00
        res = <optimized out>
#3  0x000055f4df5147f8 in repaint_file (panel=0x55f505faec90, file_index=-47, attr=FATTR_MARKED) at filemanager/panel.c:980
        w = 0x55f505faec90
        nth_column = 0
        width = 94
        offset = 0
        ret_frm = <optimized out>
        ypos = 2
        panel_is_split = <optimized out>
        fln = 0
#4  0x000055f4df514911 in paint_dir (panel=0x55f505faec90) at filemanager/panel.c:1124
        attr = <optimized out>
        n = <optimized out>
        marked = <optimized out>
        i = 0
        items = 48
#5  0x000055f4df51d251 in move_down.part.0.lto_priv.0 (panel=0x55f505faec90) at filemanager/panel.c:2212
        items = <optimized out>
#6  0x000055f4df5161fb in move_down (panel=<optimized out>) at filemanager/panel.c:2198
        items = <optimized out>
#7  chdir_other_panel (panel=<optimized out>) at filemanager/panel.c:3106
        entry = <optimized out>
        new_dir_vpath = <optimized out>
        curr_entry = <optimized out>
        p = <optimized out>
#8  panel_execute_cmd (panel=0x55f505faec90, command=<optimized out>) at filemanager/panel.c:3643
        res = 1
#9  0x000055f4df5abeb6 in send_message (w=<optimized out>, sender=0x0, msg=MSG_KEY, parm=<optimized out>, data=0x0) at ../lib/widget/../../lib/widget/widget-common.h:255
        ret = MSG_NOT_HANDLED
#10 group_handle_key (g=0x55f505fc6d60, key=<optimized out>) at ../lib/widget/group.c:507
        handled = <optimized out>
#11 group_default_callback (w=0x55f505fc6d60, sender=<optimized out>, msg=<optimized out>, parm=<optimized out>, data=<optimized out>) at ../lib/widget/group.c:637
        g = 0x55f505fc6d60
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x000055f4df5ac40d in dlg_key_event (h=0x55f505fc6d60, d_key=16398) at ../lib/widget/dialog.c:252
        w = 0x55f505fc6d60
        g = 0x55f505fc6d60
        handled = <optimized out>
#13 dlg_process_event (h=0x55f505fc6d60, key=16398, event=<optimized out>) at ../lib/widget/dialog.c:539
No locals.
#14 0x000055f4df5ac8a7 in frontend_dlg_run (h=0x55f505fc6d60) at ../lib/widget/dialog.c:321
        d_key = <optimized out>
        wh = 0x55f505fc6d60
        event = {buttons = 224 '\340', modifiers = 9 '\t', vc = 6601, dx = 32765, dy = 0, x = -1, y = -8358,
          type = (GPM_DOWN | GPM_SINGLE | GPM_DOUBLE | GPM_TRIPLE | GPM_MFLAG | GPM_HARD | GPM_LEAVE | unknown: 0x5000), clicks = 100326304, margin = (GPM_TOP | GPM_LFT | unknown: 0x55f0),
          wdx = 0, wdy = 0}
#15 0x000055f4df508974 in dlg_run (h=0x55f505fc6d60) at ../lib/widget/dialog.c:573
No locals.
#16 do_nc () at filemanager/filemanager.c:1826
        ret = <optimized out>
#17 0x000055f4df4f35f4 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/mc-4.8.33-3.fc44.x86_64/src/main.c:469
        mcerror = 0x0
        exit_code = 1
        tmpdir = 0x55f4df62ee20 <buffer> "/tmp/mc-ZIALX3"

Activity

  1. added theissue type on Oct 21, 2026
  2. zyv commented on Oct 21, 2026

    @zyv
    Member
    • I confirm the issue is still reproducible with the latest version of Midnight Commander

    I can't reproduce it in 4.8.33-803-g7d52855e6; can you confirm it's still not fixed in master?

  3. egmontkob commented on Oct 22, 2026

    @egmontkob
    Contributor

    Was fixed in #4761.

  4. removed this from the Future Releases milestone on Oct 22, 2026
  5. added
    area: coreIssues not related to a specific subsystem
    and removed
    needs triageNeeds triage by maintainers
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues not related to a specific subsystemprio: mediumHas the potential to affect progress

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions