View Issue Details

IDProjectCategoryView StatusLast Update
0003732Spring engineGfx driver issuespublic2013-04-27 23:05
Reporterabma Assigned Toabma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version94.1.1+git 
Target Version95.0Fixed in Version94.1.1+git 
Summary0003732: spring (=libdevil) supports jpeg2000 on windows but doesn't on linux (current ubuntu)
Descriptionleads to:

Error: Spring: Incorrect/Missing content: Could not load startpicture from file bitmaps/loadpictures/loadscreen_fire.jp2


on linux.
Additional Informationnot sure what to do:

1. restrict the list of supported image formats to something like:

- bmp
- png
- jpg
- ...

2. load an empty picture if loading fails (could that desync?)

3. write a proper wiki page about supported image formats
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

abma

2013-04-22 00:00

administrator   ~0010520

http://springrts.com/phpbb/viewtopic.php?p=539806#p539806

abma

2013-04-22 00:48

administrator   ~0010524

2.: https://github.com/spring/spring/commit/ef8451cb88a27aa508b81687c69f28517759e883

Kloot

2013-04-22 00:54

developer   ~0010525

Last edited: 2013-04-22 00:55

2 can't desync (something would be seriously wrong if it does) and is the easiest option, so I chose that

abma

2013-04-22 00:56

administrator   ~0010526

is devil used in other parts of the engine where all supported formats are allowed? if so, shouldn't it be restricted to some common formats?

if not, making a replacement of devil later on could be really difficult. devil atm seems to be unsupported.

Kloot

2013-04-23 12:50

developer   ~0010545

Last edited: 2013-04-23 12:51

Yes, but most other code that relies on devil (via CBitmap) doesn't throw exceptions anymore. Also we could always include devil's sources and build it ourselves with jpeg2000 support disabled.

devil's author moved on a few years ago (http://openil.sourceforge.net, http://www.dentonwoods.com/) so it is no longer under development. New image formats don't spring up all that often though.

abma

2013-04-23 14:18

administrator   ~0010546

Last edited: 2013-04-23 14:20

imo including devil is bad, as its more work for us, this increases difficulty to compile spring.

got an other idea how to white list image formats. load image and check if the type is allowed: if not throw an error, could be done like this (pseudo-code):

ilLoad*();
...
std::vector<int> allowedFormats= {IL_PNG, IL_JPG, IL_TGA, ...}
const int format = ilGetInteger(IL_IMAGE_FORMAT)
if (allowedFormats.find(format) == format.end()) {
    <error message>
}

i currently don't know which formats are needed, but imo this "restriction" is fine. maybe just throw an error message and don't really abort.

this way we have a defined list, which image formats are supported accross all platforms.

cleanrock

2013-04-23 20:40

reporter   ~0010550

perhaps move to freeimage: http://freeimage.sourceforge.net/features.html
its alive, C++ api and seem to not need image libs

abma

2013-04-26 16:17

administrator   ~0010561

@cleanrock:

looks interesting! but as we currently don't know which image formats of devil are used / needed i still suggest to limit the allowed image formats for 95.0. not sure when i've the time, but i'll add the code soon.

cleanrock

2013-04-26 17:36

reporter   ~0010564

Agree, that sounds like a proper fix.
I did not mean that we should switch to freeimage right now.

abma

2013-04-27 15:15

administrator   ~0010573

https://github.com/spring/spring/commit/9e890a5176d5eb789ea3e1afec33cf9e871fbc1a

Issue History

Date Modified Username Field Change
2013-04-21 23:59 abma New Issue
2013-04-22 00:00 abma Note Added: 0010520
2013-04-22 00:48 abma Note Added: 0010524
2013-04-22 00:54 Kloot Note Added: 0010525
2013-04-22 00:55 Kloot Note Edited: 0010525
2013-04-22 00:56 abma Note Added: 0010526
2013-04-23 12:50 Kloot Note Added: 0010545
2013-04-23 12:51 Kloot Note Edited: 0010545
2013-04-23 14:18 abma Note Added: 0010546
2013-04-23 14:19 abma Note Edited: 0010546
2013-04-23 14:19 abma Note Edited: 0010546
2013-04-23 14:20 abma Note Edited: 0010546
2013-04-23 20:40 cleanrock Note Added: 0010550
2013-04-26 16:17 abma Note Added: 0010561
2013-04-26 16:17 abma Assigned To => abma
2013-04-26 16:17 abma Status new => assigned
2013-04-26 16:18 abma Target Version => 95.0
2013-04-26 17:36 cleanrock Note Added: 0010564
2013-04-27 15:15 abma Note Added: 0010573
2013-04-27 23:05 Kloot Status assigned => resolved
2013-04-27 23:05 Kloot Fixed in Version => 94.1.1+git
2013-04-27 23:05 Kloot Resolution open => fixed