MantisBT - VCMI
View Issue Details
0001302VCMIModspublic2013-06-04 19:212013-07-08 16:31
krs 
Ivan 
normalcrashalways
closedno change required 
0.93 
 
0001302: Game crashes upon entering Cove Town
Running VCMI in debug mode. Game crashes upon entering Cove-Town with the log message : "Failed to open cove/town-screen/background via SDL_Image"

Crash is on following line (I think it was "fixed" recently)
> VCMI_client.exe!BitmapHandler::loadBitmapFromDir(std::basic_string<char,std::char_traits<char>,std::allocator<char> > path, std::basic_string<char,std::char_traits<char>,std::allocator<char> > fname, bool setKey) CBitmapHandler.cpp Line 161 C++


CBitmapHandler.cpp Line 161

    // When modifying anything here please check two use cases:
    // 1) Vampire mansion in Necropolis (not 1st color is transparent)
    // 2) Battle background when fighting on grass/dirt, topmost sky part (NO transparent color)
    // 3) New objects that may use 24-bit images for icons (e.g. witchking arts)
161: auto colorID = SDL_MapRGB(ret->format, 0, 255, 255);
No tags attached.
Issue History
2013-06-04 19:21krsNew Issue
2013-06-04 21:27IvanNote Added: 0003663
2013-06-04 21:45krsNote Added: 0003665
2013-06-04 22:16IvanNote Added: 0003666
2013-06-04 22:16IvanNote Edited: 0003666bug_revision_view_page.php?bugnote_id=3666#r2278
2013-06-10 19:17IvanAssigned To => Ivan
2013-06-10 19:17IvanStatusnew => feedback
2013-07-08 16:31IvanNote Added: 0003745
2013-07-08 16:31IvanStatusfeedback => closed
2013-07-08 16:31IvanResolutionopen => no change required

Notes
(0003663)
Ivan   
2013-06-04 21:27   
My guess is that (some of) libraries to load *.png are missing. Check if libpng.dll (or something like that) is present.
(0003665)
krs   
2013-06-04 21:45   
Since the other towns are working, I would expect to lie entirely with the mod. But if it is working on your side...

I have "libpng15-15.dll" in the root.
(0003666)
Ivan   
2013-06-04 22:16   
That error may appear only if call to SDL_Image failed. Not sure what may trigger it. Perhaps there are more required libraries apart from libpng?

Check if converting that image to bmp will fix this (Or replace it with another one).

ALSO
find place where this error is reported (line 153) and add this to get (hopefully) text description on what's wrong:
logGlobal->errorStream()<<"Reason: " << IMG_GetError();

(0003745)
Ivan   
2013-07-08 16:31   
Closing, not a bug. Or at least not VCMI bug.