Bug 126408 - kdevelop-2.1.5-12.1 data loss on write attempt to write protected file
kdevelop-2.1.5-12.1 data loss on write attempt to write protected file
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kdevelop (Show other bugs)
3.0
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Ngo Than
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-21 05:56 EDT by Andreas Mohr
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-19 15:23:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andreas Mohr 2004-06-21 05:56:09 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040211 Firefox/0.8

Description of problem:
Trying to save an opened and modified write-protected file in kdevelop
2.1 as in RHEL3 current will lead to complete loss of modified edit
buffer content.

Version-Release number of selected component (if applicable):
kdevelop-2.1.5-12.1

How reproducible:
Always

Steps to Reproduce:
1. touch testfile.txt in a user's home directory
2. chmod a-w testfile.txt
3. open and modify that file in kdevelop 2.1 and try to save it. A
message box appears that says that the file is lacking write permission. 

Actual Results:  Once we confirm the message box, the MODIFIED
kdevelop edit buffer is LOST.

Expected Results:  kdevelop 2.1 should have shown the slightest notion
of source code quality
and thus NOT killed the buffer on save error.

Additional info:

Even worse, if the error message happens before a weekend, after the
weekend hundreds or thousands of "no write permission" error message
boxes are stacked on the screen, with the whole X11 environment slowed
to a standstill and more elevated problems trying to get the machine
back to life (probably due to an auto save mechanism of kdevelop).

kdevelop-3.0.3-0.1 (FC2) doesn't appear to have these issues any more.
An update towards kdevelop 3.0 would probably make a lot of sense,
given the simple nature of these terrible bugs in kdevelop 2.1,
which doesn't establish too much trust in the code quality of this
particular (old!) version.

I have to admit that I'd have expected Red Hat to have better overall
product quality in RHEL. It's quite astonishing that a major (and very
simple, code-wise!!) bug such as a complete edit buffer loss on a
write protected file hasn't been uncovered and fixed before. Also,
up2date is really dumb IMHO. It "crashes" on all sorts of
not-so-critical (soft) errors (e.g. wrong password issues or wrong
form data in RHN and similarly utterly trivial things, IIRC).

Since it was a whole odyssee trying to find any bug reporting link for
RHEL, I assume Red Hat doesn't need or care about any bug reports for
RHEL, which nicely explains the number of bugginess issues I found in
RHEL, AFAICS at a rate similar to the "unstable" Debian distribution.

Conclusion: I'd be happy if Red Hat could do better here, especially
given the supposedly "commercial-grade" product.
In contrast to that I'm rather satisfied with the RHN update frequency
for security issues, though.

Thanks!

Andreas Mohr, long-time OSS developer
Comment 1 Andreas Mohr 2004-06-21 07:18:27 EDT
Sorry, I failed to observe that the buffer-killing behaviour only
occurs when close-saving the file, not when simply saving the file.
Comment 2 Ngo Than 2004-06-25 12:35:48 EDT
i have built kdevelop-3.0.4 for RHEL3 today and uploaded it on
ftp://people.redhat.com/than/rawhide/kdevelop-3.0.4-0.1.i386.rpm

It would be nice if you could verify it please whether this issue is
fixed. thanks
Comment 3 Andreas Mohr 2004-07-01 10:34:38 EDT
Wow, thanks for an astonishingly speedy update!
Unfortunately I was rather slow to test it (had to ask some colleagues
to get it installed, sometime after the weekend).

Installation was painless, however I found one minor issue:
when Save'ing a write-protected file, everything is fine (warning
message, ...).
However, when Close'ing the same file, the "foobar modified, Save?"
occurs, and when I click Yes, nothing indicates that the file is
actually write-protected, thus endangering me of killing the program
by some means sometime and then losing my believed-to-be-saved yet
non-saved data!
In other words, the handling is much better now, since I don't
immediately lose my whole modified edit buffer; instead now at least I
cannot simply close the program any more before the write to the
write-protected file has succeeded.

Note that this buggy write protection handling does *NOT* happen with
kdevelop-3.0.3-0.1 from Fedora Core on a box with whole KDE
environment updated to Fedora Core packages (kdebase-3.2.2-0.1) to
accomodate the kdevelop Fedora package.
This only happens with the new kdevelop-3.0.4-0.1 package, on
kdebase-3.1.3-5.2.
Does bug depend on older 3.1.3 KDE version? Or is it actually a
regression from 3.0.3 to 3.0.4?? I certainly don't know for sure.
My 3.0.3 box is a medium-heavily updated RHEL3 (--> Fedora),
the 3.0.4 box is an almost completely stock RHEL3.

Apart from the write-protected document testing we haven't done any
extensive testing of the package, but so far it looks fine to me.

Thanks again for your fast reaction!
Comment 4 Andreas Mohr 2004-07-02 04:05:32 EDT
I found that setting a breakpoint with this package is problematic:
while kdevelop shows the breakpoint line in pink color in my updated
Fedora installation, this package (probably due to the fact that it
relies on an older kate editor installation from kde 3.1.3 instead of
3.2.2) doesn't recolor a breakpoint line, thus rendering the
breakpoint invisible to the user (unless explicitly looked up in the
"Breakpoints" window).

The only way to have breakpoint indicators in the editor is to do
Settings -> Configure Editor -> View defaults -> Show icon border

Finding a way to have this setting be default in your package might be
useful, since otherwise people won't see their breakpoints.

Thanks!
Comment 5 Andreas Mohr 2004-07-06 12:28:11 EDT
Oh, another one: the new package kicks out the Bluecurve menu entry of
the old kdevelop 2.1 RHEL package (it doesn't provide a suitable
replacement for a kdevelop.kdesktop entry that a menu symlink points to).

Apart from that further kdevelop testing went fine so far.
Comment 7 RHEL Product and Program Management 2007-10-19 15:23:50 EDT
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.

Note You need to log in before you can comment on or make changes to this bug.