emberrender cannot find flam3-palettes.xml if invoked from outside emberrender PATH

Issue #15 resolved
Former user created an issue

Version WIN-1.0.0.7.

If I put emberrender in my $PATH and attempt to invoke it from another directory (for example, to run a script that has it render all .flame files in another directory), it will look for the default flam3-palettes.xml palette file in whatever path I am in when I call it: it will not find it and read it from the path that emberrender is in. Example commands that lead to this, with the error:

PATH=C\Users\myUsername\AppData\Roaming\Fractorium;%PATH%

cd C:\tempRender

EmberRender.exe --in=test.flame --out=test.png

Error: Reading file .//flam3-palettes.xml failed: ios_base::failbit set: iostream stream error

Error parsing palette file flam3-palettes.xml. Reason:

EmberNs::PaletteList<float>::Add : Couldn't read palette file .//flam3-palettes.xml

Consequently I must either 1. always copy flam3-palettes.xml to whatever directory I call emberrender from, or 2. always work with emberrender from whatever directory it is installed in, or 3. pass it the full path to some palette file (I have tested the other two and they work; I haven't tested this last option).

All those solutions are cumbersome; it would be great if it searched for all resources it needs from whatever path it is installed in.

Possibly related issue (which I haven't tested in a while, so I don't know if it's still an issue) : even when I tell it (via a CLI switch) to use another palette file, it will complain that flam3-palettes.xml cannot be loaded (in the same scenario I describe here). I would think it shouldn't even attempt to load a palette file it won't use? Or is there something it needs from the default palette file even if I tell it to use a different palette file? If it would make more sense to file this possibly related issue as another issue, please say so and I will.

Comments (11)

  1. Matt Feemster repo owner

    I have fixed this and it will be included in the next release, 1.0.0.8

    It will always look for flam3-palettes.xml due to how I designed it, which was a carryover from flam3. Realistically, the palette file is not used for command line rendering anymore.

    Regardless, the problem you were seeing is now fixed with my latest commit.

  2. Former user Account Deleted reporter

    Great, thanks!

    Makes me wonder if other CLI tools might have the same problem--I think maybe embergenome does.

  3. Former user Account Deleted reporter

    I'm sorry, I forget to mention I see the same problem on the Mac; I would bet it's a problem on Linux also.

  4. Matt Feemster repo owner

    Makes me wonder if other CLI tools might have the same problem--I think maybe embergenome does.

    All three CLI programs share this same code, so it's fixed for all of them.

    I'm sorry, I forget to mention I see the same problem on the Mac; I would bet it's a problem on Linux also.

    I only fixed it for Windows, since it's a platform specific call. I will try to fix it for the other two now.

  5. Matt Feemster repo owner

    I've added code for all OSes, and have tested on Windows and Linux. Having my mac dev test on OSX now.

  6. Log in to comment