Windows reports error when saving file
On Windows, we sometimes get an error popup saying “Requested operation could not be performed on a file with a user-mapped section open.”
Can be reproduced by opening MyLang.sdf. Editing, saving. Opening Common.sdf. Editing, saving. Repeat.
(Related to Spoofax/83.)
Submitted by Lennart Kats on 28 April 2010 at 22:40
Issue Log
For now, as a workaround in 0.4.4.4, the I disabled the SDF editor’s support for content completion of sorts in other files. Seems to work.
[edit]
Apparently, it doesn’t always work. One student reported that just rebuilding the project one or more times might help.[/edit]
Fixed in 0.4.4.5 (until someone says its not). With some luck this also fixes a memory leak, since apparently I had to clean up after NIO and close some file handle it opened.
Someone said it’s not fixed. May be something else dealing with NIO.
Looks like these problems may be caused by using memory-mapped IO for reading files before parsing them:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4715154
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4831749
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4469299
The bugs above are filed as open or wontfix. Workaround:
"Don't do FileChannel.map() if other file operations are planned on the file, such as File.delete(). Instead, do FileChannel.read()."
I eliminated all uses of memory-mapped IO in 0.4.5, hopefully fixing this issue.
Log in to post comments