View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002743 | FSSCP | graphics | public | 2012-11-30 22:26 | 2012-12-04 16:50 |
| Reporter | The_E | Assigned To | Valathil | ||
| Priority | low | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.6.16 | ||||
| Target Version | 3.7.2 | ||||
| Summary | 0002743: 16-bit PNG textures cause crash | ||||
| Description | In TAP, we're using converted HW2 backgrounds as skyspheres. While testing this, pecenipicek found that a sufficiently large png (4096*2048 in this case) will crash the engine while trying to load the image. Test skysphere can be found here: http://blueplanet.fsmods.net/E/TAP/data.7z ; try adding it as a background and watch the explosion. Based on my (admittedly cursory) look at the code in question, I _think_ the culprit is found in png_read_bitmap, specifically lines 196/197 of pngutils.cpp. Here, the bpp value is changed, which isn't much of an issue if it gets changed downwards (as it is assumed to be 32 prior to the call to png_read_bitmap, and the image_data pointer allocated accordingly), but in this case, it was changed upwards, causing the memcpy in line 202 hitting bad memory after some time. I should also add that this is specifically related to png, the skybox works fine when used with tga textures, hence the low priority on this bug. | ||||
| Tags | No tags attached. | ||||
|
|
I am probably an idiot on this front, the texture i tried feeding the game is a 16-bit PNG instead of an 8-bit one. I know i hit a similar snag earlier while trying to use a png for an effect as well... |
|
|
I am going to have to confirm that this is an issue with 16-bit png's, NOT the resolution itself, as i got it to load without problems when i manually switched the png to 8-bit. |
|
|
Can you attach a 16-bit png for us to test with? |
|
|
Its in the zip, maps folder, m15.png |
|
|
I tried to attach it, but the resulting 7z was too large. So I linked to it in the description. |
|
|
Fix committed to Trunk @ 9393 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-11-30 22:26 | The_E | New Issue | |
| 2012-11-30 22:26 | The_E | File Added: asttest.fs2 | |
| 2012-11-30 22:27 | The_E | File Deleted: asttest.fs2 | |
| 2012-12-03 10:52 | pecenipicek | Note Added: 0014270 | |
| 2012-12-03 10:57 | pecenipicek | Note Added: 0014271 | |
| 2012-12-04 08:28 | niffiwan | Summary | Large PNG textures cause crash => 16-bit PNG textures cause crash |
| 2012-12-04 14:36 | MjnMixael | Note Added: 0014285 | |
| 2012-12-04 14:52 | pecenipicek | Note Added: 0014286 | |
| 2012-12-04 15:26 | The_E | Note Added: 0014287 | |
| 2012-12-04 16:49 | Valathil | Assigned To | => Valathil |
| 2012-12-04 16:49 | Valathil | Status | new => assigned |
| 2012-12-04 16:50 | Valathil | Note Added: 0014289 | |
| 2012-12-04 16:50 | Valathil | Status | assigned => resolved |
| 2012-12-04 16:50 | Valathil | Resolution | open => fixed |