Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#6436 closed defect (fixed)

Engine should handle malformed DDS more gracefully

Reported by: Andy Alt Owned by: Vladislav Belov
Priority: Should Have Milestone: Alpha 26
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Andy Alt)

Itms asked me to report this:

In version 0.25.10 of community maps 2, a segfault would happen if selecting the Povorotnaya random map.

I had added the png provided by the author for the map preview.

Before the release, I didn't have any problems when testing with git. But after I created the pyromod file and issued the release, someone opened a ticket which reported a segfault.

Function call failed: return value was -120102 (Invalid/unsupported texture format)
Location: tex_dds.cpp:562 (decode_sd)

Call stack:

(0x555a5ffc0c26) pyrogenesis(+0x611c26) [0x555a5ffc0c26]
(0x555a5ff5fb50) pyrogenesis(+0x5b0b50) [0x555a5ff5fb50]
(0x555a5ff6168a) pyrogenesis(+0x5b268a) [0x555a5ff6168a]
(0x555a5ff5fd87) pyrogenesis(+0x5b0d87) [0x555a5ff5fd87]
(0x555a5ffe2c95) pyrogenesis(+0x633c95) [0x555a5ffe2c95]
(0x555a5ffe1994) pyrogenesis(+0x632994) [0x555a5ffe1994]
(0x555a5ffb53c1) pyrogenesis(+0x6063c1) [0x555a5ffb53c1]
(0x555a5ffb8013) pyrogenesis(+0x609013) [0x555a5ffb8013]
(0x555a5fdab44a) pyrogenesis(+0x3fc44a) [0x555a5fdab44a]
(0x555a5fdabc86) pyrogenesis(+0x3fcc86) [0x555a5fdabc86]
(0x555a5fda5978) pyrogenesis(+0x3f6978) [0x555a5fda5978]
(0x555a5ff4c4a1) pyrogenesis(+0x59d4a1) [0x555a5ff4c4a1]
(0x555a5fed5c70) pyrogenesis(+0x526c70) [0x555a5fed5c70]
(0x555a5ff33d74) pyrogenesis(+0x584d74) [0x555a5ff33d74]
(0x555a5fec34ef) pyrogenesis(+0x5144ef) [0x555a5fec34ef]
(0x555a5fc7f198) pyrogenesis(+0x2d0198) [0x555a5fc7f198]

errno = 11 (Try again later)
OS error = ?

tex_dds.cpp(562): Function call failed: return value was -120102 (Invalid/unsupported texture format)
zsh: segmentation fault (core dumped) pyrogenesis community-maps-2-0.25.10.pyromod

I made a new png map preview and created a pyromod file for the new release (v0.25.11) and the issue is fixed.

The original png was not designed properly for a map preview file, and while testing the git version, it did not appear properly in the upper-right corner of the game setup menu, but did not cause any crash.

Attachments (1)

povorotnaya.png.cached.dds (200.2 KB ) - added by Andy Alt 2 years ago.
likely malformed dds file

Download all attachments as: .zip

Change History (6)

by Andy Alt, 2 years ago

Attachment: povorotnaya.png.cached.dds added

likely malformed dds file

comment:1 by Andy Alt, 2 years ago

Description: modified (diff)

comment:2 by Stan, 2 years ago

Milestone: Alpha 26Alpha 27

Unlikely to get done for A26

comment:3 by Vladislav Belov, 2 years ago

Avoids a crash if a texture size is not a power of two added in rP26774.

comment:4 by Vladislav Belov, 2 years ago

Owner: set to Vladislav Belov
Resolution: fixed
Status: newclosed

In 26783:

Allows tex clients decide how to handle invalid textures instead of assertions. Fixes #6436

comment:5 by Vladislav Belov, 2 years ago

Milestone: Alpha 27Alpha 26
Note: See TracTickets for help on using tickets.