Kevin Yank wrote: > I'm seeing some odd behavior beginning with XXE 3.3. This has been > reproduced on multiple machines and Java versions, including 1.5.0_05 > and the current Java 6 snapshot. > > Sometimes, when saving a file that was opened via the "Edit referenced > document" command, the file is saved with the filename extension > .xmlepgXXXXX, where XXXXX is a seemingly random series of characters. > The actual .xml file that should have been saved is not touched. For > example, the file blueprint_progress-indicator.xml might be saved as > blueprint_progress-indicator.xmlepg3k06l. > > Could this be a bug in the enhancements to "Edit referenced/ing > document" in XXE 3.3?
Not a bug, but rather a consequence of the enhancements to "Edit referenced/ing document" in XXE 3.3. > Also, I can confirm that no error messages are output to the console when > this problem occurs. This is the real bug. > Reproducing this reliably is proving to be a challenge; however, I find that > if I open a document of ours containing some 31 different referenced files > and systematically make a small edit and then save each referenced file in > turn (using the Edit referenced/referencing toolbar buttons to move into and > out of each file), leaving each referenced file open in a tab after making > the edit, the last 15 or so referenced files get saved under an incorrect > .xmlepgXXXXX file name. I've reproduced the problem you describe. I think you have had hard times finding how to reproduce it. Many thanks for doing this. Here what happens: * You want to save "foo.xml". * XXE saves "foo.xml" to temporary file "foo.xmlepg3k06l". * If the above steps are successful (and they were always successful in your case), [A] XXE moves "foo.xml" to "foo.xml~" and then renames "foo.xmlepg3k06l" to "foo.xml". [B] OR XXE deletes "foo.xml" and renames "foo.xmlepg3k06l" to "foo.xml". Technically speaking, [A]/[B] have *no* reason to fail. But on Windows, with a lot of files visited by XXE, they sometimes fail. Why? A Java bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6213298 I've added *two* workarounds: * The code which is used to update modular documents now ``puts less pressure on Java in term of files'' than it did before. * XXE now attempts to delete/rename the saved file twice (the second time after performing a garbage-collection). Moreover, if all this fails, an error dialog box is displayed. That is, from now, this problem cannot be unnoticed. After making all these changes, I was no longer able to reproduce the problem. You'll get these fixes in v3.4. Meanwhile: * If you open a modular document containing a lot of modules, try not to use "Edit Referencing Document" too often (i.e. just click on its tab). * Similarly, do not use Ctrl-L on it too often. * If you notice you have problems saving files, use "Help|About XMLmind XML Editor" and retry to save your files. ("Help|About XMLmind XML Editor" performs a garbage-collection before displaying memory usage.)

