Wrongly reported external document changes #758

Closed
miczac opened this Issue Mar 6, 2013 · 20 comments

Projects

None yet

7 participants

@miczac
Contributor
miczac commented Mar 6, 2013

Every now and then this notice from the editor, claiming

"The following documents have changed externally"

pops up asking for user action.
It's not clear what causes it,
because the the IDE Editor (supposedly) is (should be) the only
thing which touches/alters the source files.

(OS X 10.6.8 / SC 3.6.3)

@miczac
Contributor
miczac commented Mar 6, 2013

For the time being I can run a suitable debug version of IDE if needed to track down this issue.

@jleben
Member
jleben commented Apr 8, 2013

Is this still an issue in latest 3.6 branch?

@miczac
Contributor
miczac commented Apr 8, 2013

EDIT: Let me PLS verify that! This was from the top of my head.

@miczac
Contributor
miczac commented Apr 8, 2013

The last time that issue bugged me was on April 6th (Sat), afternoon.
Did you set any action in this regard since then?
(just searched the mailing list)

@jleben
Member
jleben commented Apr 9, 2013

Can you please try to figure out what exact actions in the IDE cause this message to appear?
Or does it just mysteriously appear spontaneously, without any user action?

@miczac
Contributor
miczac commented Apr 9, 2013

Sure, I'm already doing this! And it's hard to say. My impression is it doesn't pop up from nowhere, but there's some (felt) delay of quite a few seconds between the action and the pop-up. It's not like hitting a key and bang there is it.
Would it be possible to have some rather simple debugging code in a patch I could add which posts where this call comes from or something like that? I'm willing to add that to my local 3.6-branch, I've got to code a lot the forthcoming days.

@jleben
Member
jleben commented Apr 9, 2013

Alright, thanks for helping. I'll form a patch that will print various debug messages and send it to the mailing list (within couple of hours...)

@miczac
Contributor
miczac commented Apr 9, 2013

Thanks a lot! This can be pretty annoying and cause stressful moments of uncertainty when trying to get a project ready in time. ;-)

@miczac
Contributor
miczac commented Apr 9, 2013

PS: would it be possible to have some start-up banner, or a dump of whatever you need at a key-press also to see that the patch itself is working properly? This is to avoid to misdirect our debugging efforts.

@jleben
Member
jleben commented Apr 19, 2013

My current theory is that the issue is due to disk-write buffering: when saving documents, the IDE stores last-modified-time of file just after closing the file that it has written to. However, the writing may be buffered on the system level, and trigger a notification of modification when the delayed writing finishes, with a later last-modified-time.

In any case, this will need further investigation and experimentation, so I'm postponing the issue beyond 3.6.4.

@danmackinlay

IMO this is a serious bug; For me the notification occurs every few minutes, enough that I reflexively close it without ever reading it. Every now and again I click the "close" button in the pop-up window to close that pop-up,instead of the "ignore" button, and then my document is closed and the work I have done is lost.
While an "external change" notification could be useful, the intended use-case occurs for me in maybe 5% of cases; the rest are spurious. Of those, some, but not all are dangerous, telling nme that my code has external changes, when in fact the only changes are internal. In these cases, selecting the default "reload" option causes me to lose data.
It would be nice if the change notification actually used a checksum or something to detect whether the file was really changed, or simply had the datestamp touched etc; this is the behaviour I have grown to expect from, e.g. git. this is obviously more work and more CPU load.
A simpler workaround might simply be a setting in the SCIDE preferences to disable this "detect external changes" features. I am happy to take responsibility for shooting myself in the foot if it can stop that damn modal dialog from popping up at inappropriate times.
A second alternative work-around, if this dialog is especially beloved by the users, might simply be to make the safest options "ignore" be the default, so that the rogue keypresses that this modal dialog receives are least likely to destroy data.

@jamshark70
Contributor

@ howthebodyworks: Since this is an environment- and/or version-specific issue, it would be really valuable if you could tell us what SC version you're using, as well as which OS and version.

@danmackinlay

I beg your pardon; I have a nasty habit of presuming a universal default of "the latest point-release of everything", despite experience to the contrary.
OS X 10.9.2. Standard SC installer, 3.6.6.

@telephon
Member
telephon commented May 7, 2014

Can you check if the issue is still there with a newer build? Here is one: http://wertlos.org/~rohrhuber/things/SuperColliderNewNodeProxy.zip

@danmackinlay

Hmmm - the class library in that version doesn't compile for me, going down in flames with Duplicate Class errors like:

ERROR: duplicate Class found: 'TopScrollWidget' 
/Users/blah/Downloads/SuperColliderNewNodeProxy/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/QWindow.sc
/Users/blah/Downloads/SuperColliderNewNodeProxy/SuperCollider.app/Contents/Resources/SCClassLibrary/QtCollider/QWindow.sc
@telephon
Member
telephon commented May 7, 2014

Sorry, can you try again? It should be fixed now.

@danmackinlay

Hm. The spurious file-changed dialogs did not appear for several minutes, then the old behaviour appeared once more, appearing every minute or so. So, no, not fixed in whatever revision you just built from - thanks for building it for me though ;-)

@telephon
Member
telephon commented May 7, 2014

Thanks for trying it!

…, so the next step would be to see if it still persists in the new QT5 branch. You could try this one:
http://54.186.62.40/job/supercollider-qt52-mac/17/
The order of files seems to be wrong though, but maybe you can just replace the sc-ide application file and see if it works.

@seansay
Contributor
seansay commented Oct 26, 2014

currently in using 3.7 master branch on mac os x 10.9, it's about 10 alert in 5 minutes....(I'm constantly command+s to save the file)

@miczac
Contributor
miczac commented Oct 26, 2014

I moved to a new (faster) machine, now running 10.8.5., about 10 months ago. The issue is still there, but less often. It occurred very persistently the other day, while overloading the machine heavily.
Restarting SC helped. At some point I had to reboot anyway, lots of swap used.
To me the pattern seems to be still the same and it appears to be connected to system load, in particular disk I/O (lots of swapping lets other processes wait for data).

@jleben jleben added this to the 3.7 milestone Oct 26, 2014
@scztt scztt self-assigned this Mar 25, 2015
@telephon telephon closed this in #1371 May 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment