How can I make Height Output overwrite existing files reliably?

Hi there!

Ever since updating to the latest release, it seems that World Machine often has problems writing over an existing output file.

In my specific situation, my height output (as 16 bit RAW) will be overwritten just fine, but my Ambient Occlusion output (16 bit PNG) and other similar outputs (Select Wetness, etc.) will not overwrite and I have to delete existing files and go through a lot of annoying extra work every time I make changes.

Is there anything that has changed in regards to this in the new version? Is there a setting I have to check so that it can overwrite files?
I have tried running the app as administrator but it doesn’t change anything.

Any help is appreciated!

1 Like

i did not try new WM releases yet, so dont know about that issue and how to possibly fix it
(writing about that at least to give you feedback that someone did read and think about your issue)

2 Likes

In a similar boat, haven’t updated since before Stephen rose from the dead as my maintenance period ran out and I can’t justify the cost right now.
But, just as a general checkup, some things I’d look into are:

  1. Make sure the files that you’re failing to overwrite aren’t open somewhere. Like if you opened the PNG files to quick check for accuracy, make sure that you close them before trying to overwrite.
  2. Just as troubleshooting, if you’re trying to overwrite in the same session as the original write, try saving, closing WM (maybe even restart your computer), then building and trying to overwrite again to make sure there’s not some hanging process somewhere preventing the overwrite. This is very obviously not a feasible workaround, but if it works, it’ll at least help identify where the issue is.
  3. Just as some background information, does the overwrite fail with an error message, or does it silently fail? If there’s an error message, what does it say?
2 Likes

thanks for your input!

curiously its actually the other way around: if i created the file and overwrite it within the same session it works without a problem. even weirder, if i restart world machine it still works. only after i restart my system and launch world machine to overwrite it fails.

the error message is:
There was an error saving file ā€˜***.png’. The File exporter module could not save to disk. Check for lack of disk space or an invalid path!

path exists and is correct, disk space also more than enough. deleting the existing file makes this work again but as mentioned it is not a very desirable workflow

there is one more weird behaviour that during the save dialog, when i create a new folder i will not be able to give it a name with the error
ā€œFolder In Useā€. this same process again works with the prior version flawlessly,
which does lead me to believe that some bug got introduced, possibly with rights management or something

1 Like

thanks, much appreciated! :slight_smile:

1 Like

There shouldn’t have been any changes here, but the libpng dependency was updated which theoretically could have broken this. Does this only occur with PNG files?

2 Likes

These symptoms sound very much like a permissions issue. The things I would check:

  1. Make sure you’re using the latest 4xxx build
  2. Make sure there is only one copy of WM running
  3. Temporarily disable any antivirus software and see if that makes a difference

The error code being reported almost certainly means that WM is unable to open the file for (over)writing, which means that either it never had permission in the first place, or some other process has the file open.

1 Like

yep, ive run some more tests and can confirm it happens only with .png

this is what i tested and how i can replicate the issue:

  • Create and save new project. Output heightmap as .png, .r16 and .tga → All exports successful.
  • Make changes and build and export again. → All exports successful.
  • Close and re-open World Machine and export again. → All exports successful.
  • Restart OS, open World Machine and export again. → .png export failed withe aforementioned error message, other exports succesful

When trying these exact steps with old World Machine release, it was always successful. I do feel like it might not be a permission thing after all, seeing as the old version can export just fine and the new version to up until i restart the system. it seems really weird

2 Likes

I will see if I can replicate this issue locally, thank you for the repro steps!

2 Likes

I’m sorry, I have somehow missed your last suggestion as indeed my antivirus seemed to be the problem. If I deactivate it, the export goes through succesfully and after subsequent activation it still works.

So yeah, for me this is essentially solved then (hopefully).

Thank you for the help!

2 Likes

Glad to hear you tracked it down. There’s not a lot I can do to work around antivirus that leaves a file locked, so hopefully they fix whatever bug is happening.

2 Likes