New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 687360 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Editing mapped CSS file, suddenly deletes all contents and saves it

Reported by trendal....@gmail.com, Jan 31 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Steps to reproduce the problem:
1. This is a 2 step issue here to reproduce the bug
2. In the file edit (main middle) window, edit the width of a <div>.  DO NOT HIT SAVE (ctrl-s)
3. Now, find that div in the right side pane, where you can click on the width and use up/down arrows to adjust it also.
4.  Hold the up arrow and make the div grower wider and wider.  If it doesn't perform the bug, go on the down key for a while.  In less than 30 seconds of doing that, it will wipe all contents of the CSS file and save it.
5.  NOTE: It only does it when you have UNSAVED changes from the main window.  If you save first, it is stable.

What is the expected behavior?
Obviously the file contents should stay intact, rather than be destroyed

What went wrong?
File contents erased and empty file saved.

Did this work before? Yes Previous version unknown, whatever was main stream in Mint 18 before 55.0.2883.87 64-bit

Chrome version: 55.0.2883.87  Channel: stable
OS Version: Mint 18
Flash Version: Shockwave Flash 24.0 r0

I'm unaware if there is a auto-save backup file option in Dev Tools.  I got bit by trusting in the backup file technique of my text editor, but I do my CSS in Dev Tools.  If there is a backup file practice, I could have restored from the latest backup.

 
Labels: Needs-Milestone Needs-Bisect
Components: -Platform>DevTools Platform>DevTools>Authoring
Labels: -Pri-2 Pri-1
To clarify - you are using the workspace feature, right? You map a CSS URL that your page references to a file on your device and then follow those steps, right?
Labels: Needs-Feedback
Correct, files are on localhost.  If you also have the file open on a text editor it refreshes and is empty.  That doesn't affect the problem, just saying it for sure does empty the file. 
Update: Change:

I just experienced this bug with all changes saved now.  But it had one different twist.  The CSS file was only cleared in memory.  It remained intact on my HDD.  I was able to recover the CSS code with a separate text editor.  I.E. hitting F5(refresh) pulled in the correct, up to date, CSS file.
Owner: lushnikov@chromium.org
Status: Assigned (was: Unconfirmed)
Hi Trendal!

The "main window" in your description is a sources Panel CSS file?
That is correct.  I'm sorry I'm not familiar with the terms here.  I've used the Dev Tools for years but I've been blind to a lot of it's abilities.

So to clarify, the bug has not manifested itself while editing code in the Sources panel, actually.  It crashes when the Elements panel is in use, and you are incrementing or decrementing a value in the live Style's tab on the right pane with the up/down arrow on the keyboard.

I've attached a file pointing to the area I'm talking about.

The issue is fairly consistent as in it does it most everytime I use that feature.  But it varies in length of time holding the arrow key to make it happen.


Comment 8 Deleted

My attachment isn't appearing, is there something limiting me from attaching an image file?
You should be able to attach... There might be some outage.
In the meantime, perhaps share it using Google Drive or something. :(
That is just showing WHERE the problem occurs.  I suspect it won't do anything on that page as it's just the Google home page in the browser, not a mapped file on the hard drive. 
I have another issue arising that may put light on the current problem.

I have my whole web app directory mapped in dev tools.  I only use the editing feature for CSS.  I code Javascript etc in a separate text editor.  A couple times a day, my separate text editor is warning me that the file was edited somewhere else.  This was not happening before.  There are no edits that I can find, but I feel like the dev tools is somehow tweaking the file enough to trigger this warning.
Thanks Trendal for all the input. I think I might have clues on what's going on regarding the CSS situation.

It's still unclear who/why triggers the write of your JS files. Do you switch branches in git or something like that?
I'm using git but I don't think it's related.  I'm not doing anything with git, haven't pushed, pulled, commited, etc.  I can't say for certain if it coincidences or not but I get an error in the Dev Tools console about the Live Edit failing when I am saving Javascript code in my text editor sometimes.

I've closed everything, restarted the computer, made for positive I don't have the file open anywhere else, read or write mode, and it continues to do it.  The only place that file is open in is gedit and Dev Tools.  I can't seem to find any consistent trigger for this error although I don't believe it happens if I don't have that JS file open in the Sources tab.
Okay, I just got the notice in Dev Tools that the CSS file I'm actively working with just changed somewhere else.  So I'm not sure what that means.  I don't have the file open in any other editor, it's in a git directory, but not in any other synchronization system, like Dropbox etc.

As far as I know that file is only being edited inside Dev Tools.  I tried yesterday to use auditctl to watch that file for changes but I failed.  I don't know enough about auditctl yet.
If someone can point me to some automated monitoring I could setup to troubleshoot this, I'd be happy to try it.
Status: Started (was: Assigned)
Started: https://codereview.chromium.org/2702583003/

This should never happen to you again after the patch lands.
Sweet, thanks.
Project Member

Comment 20 by bugdroid1@chromium.org, Feb 18 2017

Status: Fixed (was: Started)
The patch should hit Canary today or tomorrow; please, give it a try after that. If the issue happens again, feel free to either write here or file another bug!

Sign in to add a comment