-
Notifications
You must be signed in to change notification settings - Fork 117
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
PyTable.C dereferencing elements of empty vector, crashing CLI #17381
Comments
@cyrush, can you direct me on how best to discover how/why the flatten query fails on Windows? |
@Laganellac, could this case be an issue b/c the results are empty and their aren't guards later in the process? (We move the vector, but it is just fundamentally empty?) |
Hi @cyrush and @biagas, I can remove the std::cout prints; at this point they probably wouldn't even be useful in the debug log. I must've missed them somehow when making my cleanup pass over the code. As for the results vector being empty - this indicates to me that the avtFlattenQuery has filled out the XMLResult with valid metadata about the size / shape of the results vector yet when it got to the CLI the results vector was empty. My gut tells me this is coming from this block of code in avtFlattenQuery.C: visit/src/avt/Queries/Queries/avtFlattenQuery.C Lines 708 to 735 in f7c9558
I can change this logic to only set the XMLResult after we've verified that the results vector will be populated. However, I'm not convinced this is the whole issue because I would expect the Flatten unit test to also fail on Linux if we were hitting the 'else if' branch in the above code. Are there debug logs from running the test on Windows that I could take a look at? |
@Laganellac here are the engine and viewer log files from a run of the test on Windows where I commented out all but |
Hi @biagas, I've made a small change related to this in PR #17423; however, I don't think this will solve the problem with the test on Windows. Unfortunately I cannot reproduce this bug on my Ubuntu machine and will have to setup a Windows build to try and debug. Based on the log output, everything coming from the engine looks correct - specifically line 479 has the correct input parameters, and lines 864 - 889 have the expected XMLInfo. Same goes later in the file when the test is run again with no shared memory. When the test fails on Windows does it still crash (now that there are no printouts)? Or does it just fail the text diff for the file contents? On Windows, both the shared memory and non shared memory approaches should result in the exact same behavior (shared memory support is turned off for Windows in Flatten), so maybe there is a bug in my logic that always disables shared memory on windows but I'm not seeing that in the log output. |
The test fails on Windows (no longer crashes). If I swap the order, is still the second call to test_box that fails, so this time the shared memory version. |
@cyrush, the offending code was removed, and the cli no longer crashes, so I don't think anything needs to be done for 3.3. However, the tests still fail on Windows, and the reason for the failure has yet to be discovered. #17423 may help, I can give it a try. Here the first line of values in the expected results:
and the same results on windows:
Looks like standard windows garbage for uninitialized vars. |
Describe the bug
The flatten.py test is crashing the CLI on Windows.
It is happening during the box_selection test, specifically the call to test_box(True):
Running through VS debugger, it segv's on this line in PyTable.C because 'results' is empty:
visit/src/visitpy/common/PyTable.C
Line 61 in c082687
I'm sure 'results' being empty indicates a bigger problem.
Adding if-test for results.size before printing out its contents fixes the segv, but these BoxSelectionNoSharedMemory tests fail:
multi_rect2d_box_nodes
andmult_rect2d_box_zones
Helpful additional information
Desktop
The text was updated successfully, but these errors were encountered: