firemodels/smv

Clipping of vector slice results crashes smokeview

Opened this issue · 14 comments

If a vector slice is displayed in smokeview, and if clipping of results is then activated, then smokeview immediately crashes with message "smokeview: terminated by signal 11" or "Segmentation fault". This does not happen if the clipping is of blockages only.

I've attached a test case that demonstrates this bug. Rename to .fds and .ssf, then run "fds clip-vectors.fds" and "smokeview -script clip-vectors.ssf clip-vectors.smv". On my machine, this produces two images (vect-t0001.png with no clipping, vect-t0002.png with blockage clipping) then crashes without producing the third image.

I see this on my current machine, running Ubuntu in WSL2 on Windows 11 Pro, for both the current smokeview (SMV-6.8.0-0-gd02fd6867-release) and the one corresponding to FDS6.7.9 (SMV6.7.21-0-gccbc561da-release). However, I am sure that I did not see this bug in FDS6.7.9 and SMV6.7.21 on a previous machine (which I cannot now test) running Windows 10. So the difference might be something connected to graphics engines, graphics cards, etc.

On my current machine, smokeview also issues the "Segmentation fault" message on quitting, even if no vector slice and no clipping is involved.

If I run smokeview on my current machine, but without GPU support, then there is no crash or message. This is a diagnostic rather than a workaround. Interestingly, if I run "glxinfo", it ends with "Segmentation fault". I've attached the output from "glxinfo" and "glxinfo -B".

Thanks for your efforts,
Ed
glxinfo-B.txt
glxinfo.txt

clip-vectors.ssf.txt
clip-vectors.fds.txt

I not able to reproduce problem. I ran smokeview 6.8.0 test in windows 11 pro and Centos 7 ) with GPU both on and off. you ran smokeview 6.8.0 in a virutal linux command shell under windows 11 pro ? did you try running under windows 11 itself?

I cannot reproduce the problem on a linux computer running Centos 7.

I have not installed FDS as a Windows application -- I could try it as a test case, but it would impede my workflow to use it routinely. If it does or does not reproduce the bug, I'm not sure that it helps to clarify the situation -- we already know that the bug does not occur in all setups.

I do not believe that memory is an issue. (Well, the error message is about segmentation fault, so memory is involved, but not memory sizes.) The machine has 32GB of RAM, and I do not think that Windows Subsystem for Linux is limited to any specific fraction of that. In particular, I do not think memory limits should be hit for the small test case that I posted. (I have processed much larger cases without any problems, so long as I don't try to clip vector slices.)

I agree that the bug seems to be specific to some collection of OS and hardware -- it could be smokeview calling a GL command (for example) with syntax that is tolerated by some GL libraries/engines/renderers/whatever but not tolerated by my current setup. The problem could be smokeview or it could be the library/engine/etc. Is there any troubleshooting you can recommend, apart from trying to compile smokeview from source in debug mode? (I could try the debug compile, but I will not have time for it in the next month or two.)

I use clipping fairly often, including to view vector slices, but mostly to clip the blockages that obscure the view. So, restricting the clip to blockages only is an acceptable workaround for me for now.

Yes to regular slice files. Yes to 3D smoke -- but that requires "Use GPU" to be deselected, and vector slices work then as well. (With "Use GPU" selected, the smoke disappears, as expected, and there is no crash.) I haven't tried boundary files yet.

Here is another 'Segmentation fault' crash:
• run the test case above (clip-vectors.fds);
• start smokeview interactively;
• press '&'.

I've added this to this Issue, but I have a feeling it could be a different bug entirely, because I can reproduce this on an Ubuntu machine.

The keyboard shortcut '&' is here intended to toggle between HVAC metro view modes. I think a part of the problem here is that there are no HVAC elements in the case. I have attached a modified test case with an HVAC VENT, and this does not crash with &.
clip-vectors_with-hvac.fds.txt

In that patched version of smokeview (SMV-6.8.0-110-gab3231e6d-master):
• The '&' keyboard shortcut is back to toggling antialiasflag, and does not cause a crash.
• Clipping a vector slice still crashes smokeview, at least on my specific machine.

Just for information, I still get this crash with SMV 6.9.0. I expect you still can't reproduce it, so there's no prospect of it being fixed -- and I suspect it's a wider issue in some libraries or whatever. My workaround is still to not clip vector slices.