MantisBT - VCMI
View Issue Details
0001163VCMIGUI - Otherpublic2012-12-15 12:382014-05-30 17:41
Warmonger 
Ivan 
normalblockalways
closedfixed 
 
0.91 
0001163: Crash caused by new file caching
auto data = CResourceHandler::get()->loadData(rid);

Crashes with

rid {name="SPRITES/CRADVNTR" type=ANIMATION }

tested in Debug version.
Crash occurs after line
Initializing VCMI_lib
> msvcr100d.dll!operator delete(void * pUserData) Line 52 + 0x3 bytes C++
     VCMI_client.exe!CFileCache::FileData::~FileData() Line 89 + 0x18 bytes C++
     VCMI_client.exe!CFileCache::getCachedFile(ResourceID && rid) Line 107 C++
     VCMI_client.exe!CDefFile::CDefFile(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Name) Line 138 + 0x80 bytes C++
     VCMI_client.exe!CAnimation::getFile() Line 1030 + 0x45 bytes C++
     VCMI_client.exe!CAnimation::CAnimation(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Name, bool Compressed) Line 1048 + 0x8 bytes C++
     VCMI_client.exe!CAnimImage::CAnimImage(std::basic_string<char,std::char_traits<char>,std::allocator<char> > name, unsigned int Frame, unsigned int Group, int x, int y, unsigned char Flags) Line 1176 + 0x44 bytes C++
     VCMI_client.exe!CCursorHandler::changeGraphic(ECursor::ECursorTypes type, int index) Line 46 + 0x58 bytes C++
     VCMI_client.exe!CCursorHandler::initCursor() Line 32 C++
     VCMI_client.exe!init() Line 142 C++
     VCMI_client.exe!boost::detail::thread_data<void (__cdecl*)(void)>::run() Line 61 + 0xa bytes C++
     VCMI_client.exe!boost::`anonymous namespace'::thread_start_function(void * param) Line 172 C++
     msvcr100d.dll!_callthreadstartex() Line 314 + 0xf bytes C
     msvcr100d.dll!_threadstartex(void * ptd) Line 297 C
     kernel32.dll!760933aa()
     [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
     ntdll.dll!774c9ef2()
     ntdll.dll!774c9ec5()
No tags attached.
Issue History
2012-12-15 12:38WarmongerNew Issue
2012-12-15 12:38WarmongerStatusnew => assigned
2012-12-15 12:38WarmongerAssigned To => Ivan
2012-12-15 13:13IvanNote Added: 0003257
2012-12-15 13:24WarmongerNote Added: 0003258
2012-12-15 13:24WarmongerDescription Updatedbug_revision_view_page.php?rev_id=2069#r2069
2012-12-15 13:24WarmongerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=2071#r2071
2012-12-15 13:24WarmongerAdditional Information Updatedbug_revision_view_page.php?rev_id=2073#r2073
2012-12-15 13:41IvanNote Added: 0003259
2012-12-15 13:41IvanStatusassigned => resolved
2012-12-15 13:41IvanResolutionopen => fixed
2014-05-30 17:41beegeeStatusresolved => closed

Notes
(0003257)
Ivan   
2012-12-15 13:13   
Stacktrace? Crash message? When does it happens?
(0003258)
Warmonger   
2012-12-15 13:24   
Added some info.
(0003259)
Ivan   
2012-12-15 13:41   
Found it, should be fixed.
I also ran check for any other usage of uninitialized data and it looks clear.