MantisBT - VCMI
View Issue Details
0000594VCMIMechanics - Objectspublic2010-08-02 19:042014-05-30 17:39
anonymous 
Ivan 
normalcrashalways
closedfixed 
PCWindows 77600
0.82 
0.83 
0000594: Crash on leaving the University
The game crashes every time you leave a University (tested on universities on adventure map only and without buying any skills).
- Find a university
- Enter it
- Leave it
Attached the dump. The log can be found here:
http://greatemerald.pastebin.com/xALa3R76 [^]
No tags attached.
? VCMI_client.exe_crashinfo.dmp (2,765,357) 2010-08-02 19:04
https://bugs.vcmi.eu/file_download.php?file_id=560&type=bug
zip UniversityCrashTest.zip (89,604) 2010-08-04 08:26
https://bugs.vcmi.eu/file_download.php?file_id=562&type=bug
Issue History
2010-08-02 19:04anonymousNew Issue
2010-08-02 19:04anonymousStatusnew => assigned
2010-08-02 19:04anonymousAssigned To => Tow
2010-08-02 19:04anonymousFile Added: VCMI_client.exe_crashinfo.dmp
2010-08-02 23:07IvanAssigned ToTow => Ivan
2010-08-02 23:35IvanNote Added: 0001277
2010-08-02 23:35IvanStatusassigned => feedback
2010-08-03 08:32GreatEmeraldNote Added: 0001278
2010-08-03 10:13IvanNote Added: 0001279
2010-08-03 10:30GreatEmeraldNote Added: 0001280
2010-08-03 12:41IvanNote Added: 0001282
2010-08-03 21:26ZamolxisNote Added: 0001283
2010-08-03 21:28ZamolxisNote Edited: 0001283bug_revision_view_page.php?bugnote_id=1283#r1107
2010-08-04 08:26GreatEmeraldFile Added: UniversityCrashTest.zip
2010-08-04 08:28GreatEmeraldNote Added: 0001284
2010-08-04 19:40ZamolxisNote Added: 0001285
2010-08-04 21:05GreatEmeraldNote Added: 0001286
2010-08-05 14:26TowNote Added: 0001291
2010-08-05 14:29TowNote Added: 0001292
2010-08-05 14:36TowNote Edited: 0001292bug_revision_view_page.php?bugnote_id=1292#r1113
2010-08-05 17:22IvanNote Added: 0001293
2010-08-05 17:23IvanStatusfeedback => assigned
2010-08-06 13:15IvanNote Added: 0001297
2010-08-06 13:15IvanStatusassigned => resolved
2010-08-06 13:15IvanFixed in Version => 0.89
2010-08-06 13:15IvanResolutionopen => fixed
2014-05-30 17:39beegeeStatusresolved => closed

Notes
(0001277)
Ivan   
2010-08-02 23:35   
Not reproducible for me. Maybe some specific hero or map to reproduce?

Don't see anything interesting in the log as well. Can someone look for useful info in crashdump?
(0001278)
GreatEmerald   
2010-08-03 08:32   
Not a specific hero or map for sure. After crashing the first time, I created a test map (h3maped, SoD random small map with 1 level), added a university, went there and crashed. But you must not buy anything! If you buy something, you don't crash. You need to enter and exit immediately.
(0001279)
Ivan   
2010-08-03 10:13   
Still no crash for me. Tried on my test map as well as on random one. With and without buying skills.

What version of Heroes and WoG you have? English or localised? This window should be identical to H3 so if you see some missing elements this may be source of crash

Maybe crashdump will explain something...
(0001280)
GreatEmerald   
2010-08-03 10:30   
Heroes III Complete, latest stable WoG, English. And it is identical. Also, it doesn't matter what skills they offer and if you already have any of them learnt, and if you buy something, it doesn't crash ever again if you revisit the university.
(0001282)
Ivan   
2010-08-03 12:41   
That's weird. Now I definitely need info from crashdump - don't see anything that can cause this...
(0001283)
Zamolxis   
2010-08-03 21:26   
(edited on: 2010-08-03 21:28)
@ GreatEmerald: could you maybe save the game before entering University, then load that game to double check you can still reproduce the issue, and if yes, zip it and attach it here to see if we can reproduce it for a map started/populated at your side?

PS: Nice to have you here btw. ;)

(0001284)
GreatEmerald   
2010-08-04 08:28   
Huh, that's interesting. Now if I load the game, I crash every single time, no matter what I do! Attached the map and the saved game (move the hero to the left until you see the University).

Nice to see you, Zamolxis :)
(0001285)
Zamolxis   
2010-08-04 19:40   
Hmm... I cannot reproduce it. And I tried various combinations. Could be still something related to your machine, version of Heroes and/or scripts installed in the folder.

Though I also have WoG 3.58f + script update installed on top of H3C (which apparently you have), so it must be something else. Did you have VCMI 0.81 (or previous) installed before in the folder. I wonder if it cannot be also related to a file we might have because we have all previous releases, which was missing from 0.82 (though in that case I suspect it would fail sooner and the crash wouldn't be related to University).

Let's hope the crashdump gives some relevant info to the devs.
(0001286)
GreatEmerald   
2010-08-04 21:05   
I don't have the script update. And yes, I had VCMI 0.81 installed there earlier.
(0001291)
Tow   
2010-08-05 14:26   
Stack trace:
     ntdll.dll!76f0e25b()
     [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
     ntdll.dll!76f0de63()
     kernel32.dll!74b414d1()
> VCMI_client.exe!CUniversityWindow::~CUniversityWindow() Line 6042 C++
     VCMI_client.exe!CUniversityWindow::`scalar deleting destructor'() + 0xb bytes C++
     VCMI_client.exe!CGuiHandler::popIntTotally(IShowActivable * top=0x0a2566a0) Line 59 C++
     VCMI_client.exe!boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,boost::_mfi::mf1<void,CGuiHandler,IShowActivable *>,boost::_bi::list2<boost::_bi::value<CGuiHandler *>,boost::_bi::value<CObjectListWindow *> > >,void>::invoke(boost::detail::function::function_buffer & function_obj_ptr={...}) Line 154 C++
     VCMI_client.exe!CFunctionList<void __cdecl(void)>::operator()() Line 63 + 0x12 bytes C++
     VCMI_client.exe!AdventureMapButton::clickLeft(boost::logic::tribool down={...}, bool previousState=true) Line 150 C++
     VCMI_client.exe!CGuiHandler::handleEvent(SDL_Event * sEvent=0x00000000) Line 243 C++
     VCMI_client.exe!CGuiHandler::handleEvents() Line 143 C++
     VCMI_client.exe!CPlayerInterface::update() Line 1325 C++
     VCMI_client.exe!CGuiHandler::run() Line 346 C++
(0001292)
Tow   
2010-08-05 14:29   
(edited on: 2010-08-05 14:36)
I guess the bug is in destructor of CUniversityWindow - you are deleting SDL_Surface*, while it should be freed by SDL_FreeSurface func.

Alternatively you may use CPicture that wraps SDL_Surface. If you set its recActions=DISPOSE then it'll be automatically deleted upon destruction of its parent (and no other calls will be redirected).

(0001293)
Ivan   
2010-08-05 17:22   
Thanks. I'll fix soon.
(0001297)
Ivan   
2010-08-06 13:15   
Fixed in rev 1737