To investigate the effects of the maximum principal stress direction (theta) and cross- shape on the failure characteristics of sandstone, true-triaxial compression experiments were conducted using cubic samples with rectangular, circular, and D-shaped holes. As theta increases from 0 degrees to 60 degrees in the rectangular hole, the left failure location shifts from the left corner to the left sidewall, the left corner, and then the floor, while the right failure location shifts from the right corner to the right sidewall, right roof corner, and then the roof. Furthermore, the initial failure vertical stress first decreases and then increases. In comparison, the failure severity in the rectangular hole decreases for various theta values as 30 degrees > 45 degrees > 60 degrees > 0 degrees. With increasing theta, the fractal dimension (D) of rock slices first increases and then decreases. For the rectangular and D-shaped holes, when theta = 0 degrees, 30 degrees, and 90 degrees, D for the rectangular hole is less than that of the D-shaped hole. When theta = 45 degrees and 60 degrees, D for the rectangular hole is greater than that of the D-shaped hole. Theoretical analysis indicates that the stress concentration at the rectangular and D-shaped corners is greater than the other areas. The failure location rotates with the rotation of theta, and the failure occurs on the side with a high concentration of compressive stress, while the side with the tensile and compressive stresses remains relatively stable. Therefore, the fundamental reason for the rotation of failure location is the rotation of stress concentration, and the external influencing factor is the rotation of theta. (c) 2025 Institute of Rock and Soil Mechanics, Chinese Academy of Sciences. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/ 4.0/).