gedit doesn't close files when canceling opening (and blocks CDROM eject)

Bug #82539 reported by psl
2
Affects Status Importance Assigned to Milestone
gedit
Fix Released
Medium
gedit (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

Ubuntu 6.10, x86, gedit 2.16.1

gedit doesn't close binary files properly. I tried to open (drag and drop) files from mounted CDROM in gedit. gedit warned me that it cannot detect character encoding, it offered some character sets. I selected CANCEL. Latter I found that file is still open in gedit when I was unable to umount CDROM. I used gedit to check files on CDROM, I was looking for some text files to read, I was not interested in binary files.

$ lsof /dev/cdrw
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
gedit 29196 oem 16r REG 22,64 10648 1871 /media/cdrom1/isolinux.bin
gedit 29196 oem 17r REG 22,64 2048 1863 /media/cdrom1/boot.cat
gedit 29196 oem 18r REG 22,64 10648 1871 /media/cdrom1/isolinux.bin

$ ps aux | grep 29196 | grep -v grep
oem 29196 0.1 1.5 66404 23696 ? S 20:20 0:04 gedit

Steps to replicate:
1) open some regular text in gedit; this step is needed to have gedit copy up and running
2) put CDROM with some Linux to your CDROM
3) Ubuntu should mount CDROM
4) start new copy of gedit from menu, we will use this new gedit for our demo
5) open CDROM folder and 'drag and drop' some binary file to gedit
6) gedit should display message that it "cannot detect character encoding"
7) select CANCEL
8) I expect that gedit will release binary file after CANCEL but it seems that file is still open. Test with lsof tool.

Related branches

Revision history for this message
psl (slansky) wrote :

When you will not chose CANCEL but RETRY, gedit will open file several times. vmlinuz in my list:

$ lsof /dev/cdrw
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
gedit 29196 oem 16r REG 22,64 10648 1871 /media/cdrom1/isolinux.bin
gedit 29196 oem 17r REG 22,64 2048 1863 /media/cdrom1/boot.cat
gedit 29196 oem 18r REG 22,64 10648 1871 /media/cdrom1/isolinux.bin
gedit 29196 oem 19r REG 22,64 1047363 1883 /media/cdrom1/vmlinuz
gedit 29196 oem 20r REG 22,64 1047363 1883 /media/cdrom1/vmlinuz
gedit 29196 oem 21r REG 22,64 1047363 1883 /media/cdrom1/vmlinuz
gedit 29196 oem 22r REG 22,64 1047363 1883 /media/cdrom1/vmlinuz
gedit 29196 oem 23r REG 22,64 1047363 1883 /media/cdrom1/vmlinuz
gedit 29196 oem 24r REG 22,64 1047363 1883 /media/cdrom1/vmlinuz
gedit 29196 oem 25r REG 22,64 1047363 1883 /media/cdrom1/vmlinuz
gedit 29196 oem 26r REG 22,64 1047363 1883 /media/cdrom1/vmlinuz

This is bug.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: http://bugzilla.gnome.org/show_bug.cgi?id=403140

Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in gedit:
status: Unknown → Unconfirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

fixed upstream

Changed in gedit:
status: Confirmed → Fix Committed
Changed in gedit:
status: Unconfirmed → Fix Released
Revision history for this message
Daniel Holbach (dholbach) wrote :

 gedit (2.17.5-0ubuntu1) feisty; urgency=low
 .
   * New upstream release:
     - Bugfixes to the filebrowser plugin
     - Bugfixes to the modelines plugin
     - Bind GeditStatusbar for python plugins
     - Updates to the manual
     - Misc bugfixes (LP: #82539)

Changed in gedit:
status: Fix Committed → Fix Released
Changed in gedit:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.