linuxmint / linuxmint/nemo

Crash on undo after a failed rename due to an existing file

Open
#3,389 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.6k
Forks
368
Avg merge
4d 4h
Merged PRs (30d)
2

Description

Distribution

Mint 21.2

Package version

5.8.5

Frequency

Always

Bug description

Nemo crashes if you try to Undo immediately after a file rename cannot be completed.

The terminal gives the error below. This is simply and easily reproducible.

ERROR:../libnemo-private/nemo-file.c:680:nemo_file_get_internal: assertion failed: (location != NULL)
Bail out! ERROR:../libnemo-private/nemo-file.c:680:nemo_file_get_internal: assertion failed: (location != NULL)
Aborted (core dumped)
Steps to reproduce
  1. Create two files called file_a.txt and file_b.txt
  2. Try to rename file_b.txt to file_a.txt. Nemo correctly prompts that this isn't possible because it already exists.
  3. Undo (either via the menu bar or via Ctrl+Z)

Nemo crashes

Expected behavior

I think the correct behaviour in this scenario is for the action before the failed rename to be "undone".

Additional information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash with the two-file rename sequence and inspect the assertion at libnemo-private/nemo-file.c:680, then trace how Undo is reached from the menu bar or Ctrl+Z after the failed rename. Done means the same scenario no longer crashes and the action before the failed rename is undone.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.