-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BOV lacks very basic error checking #2792
Comments
Not saying we can't do better, but Visit doesn't do this either. Some onus is on the user to get their header right. From their documentation: Page 11 to page 12 of Getting Data Into VisIt:
|
Well, a sanity check based on grid resolution and data types is less than 10 lines of code. I'd think it makes sense to improve the software quality of VAPOR even if VisIt fails to do so. |
@shaomeng - I believe that Bx.bot is the correct size, so bug4.bov (specified with DOUBLE for its format) shouldn't throw an error. Either way, the checks for data files being too big or small are currently on the branch. 128x512x256 = 16,777,216
|
Thanks @sgpearse . Though this bug report is buggy, good to know that you have implemented error checking. To be specific, did you restrict the error checking to check both "file being too big" and "file being too small" problems, or only the "file being too small" problem? If the code wants to read N bytes, and the file has M bytes, where M > N, it shouldn't be an error. Such scenarios could happen when
Anyway, if you only detect "file being too small" problem, but not do anything about "file being too big," actually, you don't even need to detect "file being too big," then the code will be good. |
File too big has been removed. File too small has always been there. |
Describe the bug
/glade/p/cisl/vast/vapor/Bugs/BOV_Bugs/bug4.bov
However, this shouldn't happen, because the BOV header claims a certain data size (128x512x256) and data format (double) but the data file is only half of the required size. This means, VAPOR read in twice the amount of data that the data file provides and rendered something. Not good...
The text was updated successfully, but these errors were encountered: