visit-dav / visit

VisIt - Visualization and Data Analysis for Mesh-based Scientific Data
https://visit.llnl.gov
BSD 3-Clause "New" or "Revised" License
440 stars 116 forks source link

VisIt crashes down in VTK saving an image with more that 0.5 Gbytes of pixels. #20042

Open brugger1 opened 1 week ago

brugger1 commented 1 week ago

When you try and save an image that contains more than 0.5Gbytes of pixels, VTK crashes reading back the pixels from Mesa. Right now VisIt has logic that prevents the user from doing this, so that logic will need to be disabled to replicate the crash.

JustinPrivitera commented 1 week ago

Can you put a link here to the logic that would need to be removed?

brugger1 commented 1 week ago

The logic to remove is in ViewerWindowManager::SaveWindow.

        // if the total image size is too large, reduce them
        // proportionally.
        if (w * h > 536756224)
            {
                double image_size = (double)(w * h);
                w = (int)((double)w * std::sqrt(536756224. / image_size));
                h = (int)((double)h * std::sqrt(536756224. / image_size));
                GetViewerMessaging()->Message(
                    TR("The window was too large to save at the requested resolution.  "
                       "The resolution has been automatically reduced."));
            }