New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproducible segfault in nemo #1415

Closed
zeehio opened this Issue Feb 14, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@zeehio
Copy link

zeehio commented Feb 14, 2017

This segfault is reproducible both on fully updated Linux Mint 18 and 18.1. I have tested it in two computers (one laptop, one desktop workstation).

  1. Assuming you have some files or folders in the desktop
  2. Click on the desktop, on any empty region
  3. Type some letters that match the beginning of a file, as if you were looking for it. The typed letters appear on the bottom right of the desktop and the file is selected.
  4. Erase those letters using Backspace so the text on the bottom right is empty
  5. Press Esc. The text dialog disappears.
  6. Press Del. As there is no file selected nothing should happen. However you will get a segfault.
  7. Open nemo if you want the icons in the desktop to appear again.
segfault at 0 ip 00000000004ebe2d sp 00007ffc62653ce0 error 4 in nemo[400000+1c4000]

I installed nemo-dbg package and ran gdb nemo. When I reproduced the bug I got on the console:

Thread 1 "nemo" received signal SIGSEGV, Segmentation fault.
0x00000000004ebe2d in job_is_local (files=0x0, destination=0x0)
    at nemo-file-operations.c:6784
6784	nemo-file-operations.c: El fitxer o directori no existeix. (File or directory not found)
(gdb) 

Based on the offending line I believe a fix would be to check if files == NULL and return, before accessing files->data, but maybe files should not have been NULL in the first place and the patch needs to be elsewhere.

Thanks for your time and great work

JosephMcc added a commit to JosephMcc/nemo that referenced this issue Feb 15, 2017

Fix a crash when attempting to delete an empty selection on the desktop
Bail out early if there is no selection and and add a bit of extra protection
in case we are inadvertently doing this elsewhere.

Closes: linuxmint#1415
@JosephMcc

This comment has been minimized.

Copy link
Contributor

JosephMcc commented Feb 15, 2017

I PR'd a fix for this. Thanks for the excellent bug report. Made fixing easy.

mtwebster added a commit to mtwebster/nemo that referenced this issue Mar 20, 2017

Fix a crash when attempting to delete an empty selection on the desktop
Bail out early if there is no selection and and add a bit of extra protection
in case we are inadvertently doing this elsewhere.

Closes: linuxmint#1415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment