firemodels/smv

Long directory names in smokeview SSF scripts crash

Opened this issue · 2 comments

If I run the following script in smokeview, it works:

RENDERDIR
short_smoke_dirname
LOAD3DSMOKE
SOOT DENSITY
RENDERALL
0
smok
UNLOADALL
////////
RENDERDIR
long_slice_dirname_aaaaaaaaaaaaaaaaaaaaaaaa
LOADSLICE
temperature
2       0.00000
RENDERALL
0
temp
UNLOADALL

(And if directories with those names exist, it saves the images being saved to ~/.smokeview.)

But if I add another character to the long directory name, then smokeview crashes. The error message from the crash is entirely unhelpful -- it says "***error: unknown script keyword LOAD3DSMOKE", even though that is not even the command with the long directory name. The crash appears to happen before any commands are completed.

Directory names of this length were allowed in the smokeview SMV-6.8.0 and earlier. (As you can guess, I used them, and now I need to abbreviate the information that I put into the directory names.)

I'll attach an .fds file and two .ssf files (with .txt appended) that reconstruct the crash, at least on my machine (running Ubuntu on WSL2 on Windows 11 Pro):

fds open-fire0002.fds
mkdir short_smoke_dirname
mkdir long_slice_dirname_aaaaaaaaaaaaaaaaaaaaaaaa
smokeview -script good_script.ssf open-fire0002.smv
smokeview -script bad_script.ssf open-fire0002.smv

open-fire0002.fds.txt
bad_script.ssf.txt
good_script.ssf.txt

should be fixed in smokeview posted below. the smokeview you are using should work if you put keywords in column 1 (you did) and data in column 2 or greater. smokeview looks for keywords in column 1 and was confused by data it found there. I'll make this clearer in the user manual.

https://github.com/firemodels/test_bundles/releases/tag/SMOKEVIEW_TEST2

I haven't tried the adjusted smokeview, but I can confirm that adding a space before the long directory name works with the standard release. I agree that it would be useful information in the user guide. I'm happy for this issue to be closed -- but I'll let you do it, in case you want it as a reminder for the documentation. Thanks!