MantisBT - VCMI
View Issue Details
0000647VCMIGUI - Hero screen / Exchange windowpublic2010-11-17 00:292014-05-30 17:40
Zamolxis 
Tow 
normalcrashrandom
closedfixed 
AMD 5600+WindowsXP SP3
0.83 
0.84 
0000647: Artifact Combo worked fine after many assemble/dissemble rounds, until a crash. Since then assembling always crashes.
I ran into this when verifying 0000416 is not an issue anymore. First I tested the combination of Bow of Sharpshooter & Cornucopia, which worked perfectly. I assemble/dissembled both multiple times, including the change of Misc slot for some before assembling, and everything worked perfectly.

But then I added Wizard's Well and the Elixir of Life in Map Editor, to test more combinations. Since then, the game now crashes always when I try to re-assemble a combo artifact. Removing the Well & Elixir in Map Editor didn't help - now the crash always happens if I try to re-assemble.

I'm not sure if it's because of the edited map or for another reason, but I hope the crashdump will help. The crashdump here is after the first crash. I wonder if that didn't actually overwrite some file permanently, causing the came to always crash afterwards. Let me know if you can identify the cause or if I have to investigate this further.
You can take the map from 0000570 in Map Editor, add Wizard's Well & Elixir of LIfe in Ivor's backpack (he's at 14x52), and see if it's this change that triggers the crash.
No tags attached.
related to 0000416closed OnionKnight Combination Artifacts: Disassembling Cornucopia has turned the locks of the Bow of Sharpshooter into Vials of Mercury 
jpg 2010-11-17_RClickOnVialOfMercury.jpg (220,134) 2010-11-17 00:30
https://bugs.vcmi.eu/file_download.php?file_id=601&type=bug
jpg

7z 2010-11-17_RClickOnVialOfMercury.7z (89,744) 2010-11-17 00:32
https://bugs.vcmi.eu/file_download.php?file_id=602&type=bug
Issue History
2010-11-17 00:29ZamolxisNew Issue
2010-11-17 00:29ZamolxisIssue generated from: 0000416
2010-11-17 00:29ZamolxisRelationship addedrelated to 0000416
2010-11-17 00:30ZamolxisFile Added: 2010-11-17_RClickOnVialOfMercury.jpg
2010-11-17 00:32ZamolxisFile Added: 2010-11-17_RClickOnVialOfMercury.7z
2010-11-17 00:43ZamolxisSummaryArtifact Combo worked fine after many assemble/dissemble rounds, until a crash. Since then they always crash => Artifact Combo worked fine after many assemble/dissemble rounds, until a crash. Since then assembling always crashes.
2010-11-17 00:43ZamolxisDescription Updatedbug_revision_view_page.php?rev_id=1178#r1178
2011-01-16 13:40OnionKnightNote Added: 0001488
2011-01-16 13:40OnionKnightAssigned To => OnionKnight
2011-01-16 13:40OnionKnightStatusnew => feedback
2011-01-16 15:01ZamolxisNote Added: 0001490
2011-01-16 15:01ZamolxisStatusfeedback => assigned
2011-01-16 23:11TowNote Added: 0001491
2011-01-16 23:13TowNote Added: 0001492
2011-01-16 23:13TowStatusassigned => resolved
2011-01-16 23:13TowResolutionopen => suspended
2011-01-16 23:13TowAssigned ToOnionKnight => Tow
2011-01-23 23:55TowNote Added: 0001506
2011-01-23 23:55TowNote Edited: 0001506bug_revision_view_page.php?bugnote_id=1506#r1235
2011-01-23 23:56TowResolutionsuspended => fixed
2011-01-23 23:56TowFixed in Version => 0.89
2014-05-30 17:40beegeeStatusresolved => closed

Notes
(0001488)
OnionKnight   
2011-01-16 13:40   
This is strange, I can't reproduce the crash but on the other hand the artifact disassembly is completely wrong, and I can't move an artifact from one slot to another. I've been out of loop for a while so I'm not sure what could be the cause or if these artifact issues are being dealt with on the bonusesFifthPart branch.
(0001490)
Zamolxis   
2011-01-16 15:01   
I hope Tow or someone can find in the crashdump either what the cause is, or at least what type of tests I should still do to help figure it out...
(0001491)
Tow   
2011-01-16 23:11   
Stacktrace from dump:

     VCMI_client.exe!ComponentResolved::ComponentResolved(SComponent * Comp=0x0543f8ec) Line 533 + 0x9 bytes C++
     VCMI_client.exe!ComponentsToBlit::ComponentsToBlit(std::vector<SComponent *,std::allocator<SComponent *> > & SComps=[...](), int maxw=88341044, SDL_Surface * _or=0x00000000) Line 566 + 0xa bytes C++
     VCMI_client.exe!CMessage::drawIWindow(CInfoWindow * ret=0x00000056, std::basic_string<char,std::char_traits<char>,std::allocator<char> > text=<Bad Ptr>, int player=0) Line 421 + 0x17 bytes C++
     VCMI_client.exe!CInfoWindow::CInfoWindow(std::basic_string<char,std::char_traits<char>,std::allocator<char> > Text=<Bad Ptr>, int player=0, const std::vector<SComponent *,std::allocator<SComponent *> > & comps=[1](...,...), std::vector<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CFunctionList<void __cdecl(void)> >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,CFunctionList<void __cdecl(void)> > > > & Buttons=[...](), bool delComps=true) Line 509 + 0x34 bytes C++
     VCMI_client.exe!CInfoWindow::showYesNoDialog(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & text=<Bad Ptr>, const std::vector<SComponent *,std::allocator<SComponent *> > * components=0x0543fc98 [1](...,...), const CFunctionList<void __cdecl(void)> & onYes={...}, const CFunctionList<void __cdecl(void)> & onNo={...}, bool DelComps=true, int player=0) Line 550 + 0xa6 bytes C++
     VCMI_client.exe!CPlayerInterface::showYesNoDialog(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & text=<Bad Ptr>, const std::vector<SComponent *,std::allocator<SComponent *> > & components=[1](...,...), CFunctionList<void __cdecl(void)> onYes={...}, CFunctionList<void __cdecl(void)> onNo={...}, bool DelComps=true) Line 882 + 0x1d bytes C++
     VCMI_client.exe!CPlayerInterface::showArtifactAssemblyDialog(unsigned long artifactID=111, unsigned long assembleTo=86, bool assemble=true, CFunctionList<void __cdecl(void)> onYes={...}, CFunctionList<void __cdecl(void)> onNo={...}) Line 1175 C++
> VCMI_client.exe!CArtPlace::clickRight(boost::logic::tribool down={...}, bool previousState=true) Line 4624 C++
     VCMI_client.exe!CGuiHandler::handleEvent(SDL_Event * sEvent=0x00000001) Line 234 C++
     VCMI_client.exe!CGuiHandler::handleEvents() Line 145 C++
     VCMI_client.exe!CPlayerInterface::update() Line 1328 C++
     VCMI_client.exe!CGuiHandler::run() Line 382 C++
     VCMI_client.exe!boost::`anonymous namespace'::thread_start_function() + 0x5b bytes C++


Feral line:
comp->pos.w = std::max(textSize.first, img->w); //bigger of: subtitle width and image width

Apparently img is NULL.
(0001492)
Tow   
2011-01-16 23:13   
The code is being rewritten in the bonusesFifthPart anyway, so the bug is most probably gone or totally different.

I'll resolve it for now, when a next build is out please check, if the issue is gone.
(0001506)
Tow   
2011-01-23 23:55   
I've encountered a reason of that when rewriting artifacts: img wasn't initialized properly.
Fixed in my branch in r1934