#227 new

"The file has been changed on disc" dialogue won't close

Reported by agmcleod | May 27th, 2010 @ 01:11 PM

I am running into this problem on my windows work machine, ill check my mac as well to see if it's on there as well. The dialogue warning me "This file has been changed on disc, and you have unchanged saves in redcar" won't close, regardless of the button pressed. This is from the 0.3.5 gem version.

1) Open up redcar, create a new file and save it as test.rb for example
2) Type in some code
3) Without saving it first, click the X on the window (not the tab, but the redcar window) to close it.

Comments and changes to this ticket

  • agmcleod

    agmcleod May 27th, 2010 @ 07:02 PM

    This is strange. Tried this out again, I had tested the previous steps before and still got the error. Now though, i just get the dialogue that I have a tab open that isnt saved, and it asks me to save it, not save it or cancel. That dialogue works as expected.

  • Deleted User

    Deleted User November 20th, 2010 @ 05:29 PM

    • Milestone order changed from “0” to “0”

    Could not reproduce on Redcar 0.8.1 on a Mac.

    1. Fire up redcar with no args
    2. New file
    3. "test"
    4. SAVE (/tmp/test.txt)
    5. "test2"
    6. Click window (not buffer) close
      You have 1 modified tabs.
      Save all before closing the window?
      No, Cancel, Yes

    All of them seem to do the right thing.

  • agmcleod

    agmcleod November 22nd, 2010 @ 09:08 PM

    Using the same steps as listed in my first post, I could reproduce the bug on windows XP. After pressing ok or cancel 10x+ the dialogue and window will close. A similar bug that involved focusing on another program and switching back to unsaved changes was fixed i believe. That bug also only existed on XP, I couldnt reproduce it on windows 7 or mac. I'll try this on my windows 7 machine at home.

  • Roger

    Roger November 26th, 2010 @ 06:04 PM

    what exact dialogues popup?

  • vinod

    vinod March 30th, 2011 @ 01:55 PM

    I have this issue too - this is the single most irritating part of using redcar for me because the only solution is to kill redcar from the task manager and restart it. Since redcar doesnt spawn a new process for each invocation, its takes down every instance of redcar with it :(

    Steps to reproduce:
    1. Open up a project/directory that outputs files during its execution
    2. Execute the app
    3. Open up one of the output files in redcar, and change it
    4. Rerun the app such that the opened file is modified by it
    5. Navigate back to the tab containing that file in redcar.
    6. A "file has been changed on disc" dialog shows up (see screenshot) and will not go away. Clicking yes or no has the same effect - the dialog pops up again.

    FWIW, here's the output from running redcar through a command line to capture any debug output. There is no message when the dialog showsup first or thereafter.

    Redcar 0.10 ( i386-mingw32 )
    java -client -Xbootclasspath/a:"USERHOMEDIR_GOES_HERE/.redcar/ass
    ets/jruby-complete-1.5.3.jar" -Xmx320m -Xss1024k -Djruby.memory.max=320m -Djruby
    .stack.max=1024k org.jruby.Main "RUBYHOME_GOES_HERE/lib/ruby/gems/1.9.1/gem s/redcar-0.10/bin/redcar" --no-sub-jruby --ignore-stdin
    Redcar 0.10 ( java )
    Redcar::ApplicationSWT"git version 2>&1"
    loading plugins took 4.906
    took 0.75s to load textmate assets
    initializing gui took 0.063s
    project start took 0.015s
    "git version 2>&1" start time: 8.547
    Couldnt find Setting class for textmate setting: spellchecking
    Couldnt find Setting class for textmate setting: spellchecking
    indent setting without scope! #<Redcar::Textmate::UnIndentedLinePatternSetting:0
    x1371a59 @plist="^\s*$", @scope=nil>
    Terminate batch job (Y/N)? y


  • Roger

    Roger April 27th, 2011 @ 05:18 PM

    • Tag set to save

    still reproducible with 0.12.0dev as of today

  • Roger

    Roger April 27th, 2011 @ 05:22 PM

    • Tag changed from save to save, windows

    only reproducible on windows, not linux

  • Roger

    Roger April 27th, 2011 @ 09:00 PM

    The problem appears to be that when it pops up the dialog "This tab has unsaved changes"

    when the dialog closes, it fires a focusGained message back, which in turn causes an (apparently non accurate)


    call, which did the file mtime check, which caused its own dialog to fire, which dialog recursively causes the loop by firing to itself as you hit cancel.


    shows the backtrace.

    I'm not sure
    1) why this only occurs with tabs that come from "new" command (OpenNewEditTab) and not from just opening a previously existing file. The latter work fine.

    2) What the best way is to fix this. Which probably depends on number 1.

    Possibly make


    also swallow tab focused events.

    Possibly make tab focused events only on app focus, like https://github.com/rdp/redcar/commit/f20de8672589363790b6343edb5d22... ?

    Another option that worked for me was
    to ignore focussed_edit_view= messages if they weren't news:


    I've been using that and it seemed to work fine.

    I also didn't see any feature tests that seemed to use these dialog popups, so wasn't sure how to make a feature for it, but there it is.


  • Roger

    Roger April 28th, 2011 @ 11:43 PM

    oops, looks like commit b204b341 fixed it but caused https://redcar.lighthouseapp.com/projects/25090/tickets/513-unable-...

    So that's not the right way to fix it...

  • Roger

    Roger April 29th, 2011 @ 05:51 PM

    Looks like it's related to


    which also has a cyclical message box, I believe.

  • Roger

    Roger May 5th, 2011 @ 10:52 PM


    seems to fix it (hopefully right...seems to be working well here)

  • Roger

    Roger May 13th, 2011 @ 04:34 PM

    that commit seemed to work fine for me after some days of testing, so merged it. Feel free to refactor it as/if desired.

  • Pockata

    Pockata May 24th, 2011 @ 09:38 PM

    This isn't completely solved!
    I have almost the same problem, but the main difference is that when i click "no", the window appears again, but when i click "yes", the window hides.
    The strange thing is that it only occurs when i have opened a remote sftp location via gvfs.

    Also there seems to be a big CPU usage when saving files and updating directory index on window focus (Maybe open another ticket for that?)

    Steps to reproduce:
    1. Mount remote sftp location via gvfs (mount in ~/.gvfs/remote)
    2. Open & edit a file in that directory in Redcar. Don't save it!!
    3. Focus another window (or desktop)
    4. Focus Redcar window
    5. Click NO on the "The file has been changed on disc" window

    Redcar info
    Version: 0.12.0dev
    Ruby Version: 1.8.7
    Jruby version: 1.6.1
    Redcar.environment: user

    OS: Linux, Fedora 14 x86 Gnome

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A programmer's text editor for Gnome.

People watching this ticket



Referenced by