2025-07-20 17:10 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003732Spring engineGfx driver issuespublic2013-04-27 23:05
Reporterabma 
Assigned Toabma 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
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
Attached Files

-Relationships
+Relationships

-Notes

~0010520

abma (administrator)

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

~0010524

abma (administrator)

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

~0010525

Kloot (developer)

Last edited: 2013-04-22 00:55

View 2 revisions

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

~0010526

abma (administrator)

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.

~0010545

Kloot (developer)

Last edited: 2013-04-23 12:51

View 2 revisions

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.

~0010546

abma (administrator)

Last edited: 2013-04-23 14:20

View 4 revisions

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.

~0010550

cleanrock (reporter)

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

~0010561

abma (administrator)

@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.

~0010564

cleanrock (reporter)

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

~0010573

abma (administrator)

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

-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 View Revisions
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 View Revisions
2013-04-23 14:18 abma Note Added: 0010546
2013-04-23 14:19 abma Note Edited: 0010546 View Revisions
2013-04-23 14:19 abma Note Edited: 0010546 View Revisions
2013-04-23 14:20 abma Note Edited: 0010546 View Revisions
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
+Issue History