artType->id, 0, 466, 100), true"> artType->id, 0, 466, 100), true">
MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000964VCMIGUI - Hero screen / Exchange windowpublic2012-05-22 10:212014-05-30 17:41
ReporterWarmonger 
Assigned ToIvan 
PriorityurgentSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformPCOSWindows 7OS VersionSP1
Product Version 
Target Version0.89Fixed in Version0.89 
Summary0000964: Assertion fail when drawing stack/commander artifact in CreatureWindow
DescriptionIt worked well before image improvements were added. The assumption that artifactImage is non-existant seems wrong, as it's a part of Creature Window.

assert(!vstd::contains(children, child));

addChild(artifactImage = new CAnimImage("ARTIFACT", creatureArtifact->artType->id, 0, 466, 100), true);

I'm living it for Ivan, he knows what it was supposed to do.
Steps To ReproduceCommander artifacts now drop as random relics. Creature artifacts can be added in editor.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002519)
Ivan (developer)
2012-05-22 15:38

Probably you're trying to add already present child to object.
This may happen if you have OBJ_CONSTRUCTION macro in scope. As result any CIntObject-based class will get parent during construction.

To fix - either remove addChild (it will be called in CIntObject construction)
OR add BLOCK_CAPTURING macro before call.
(0002520)
Ivan (developer)
2012-05-22 16:22

Sorry - don't have sources right now. This should fix it:
function void CCreatureWindow::setArt
add OBJ_CONSTRUCTION_CAPTURING_ALL macro at the beginning and remove addChild call. This should be all.
(0002523)
Warmonger (administrator)
2012-05-22 17:18

Fixed crash. However, I'm not sure how properly set CAnimImage to display no artifact at all. But we cna live with it in dev release.

- Issue History
Date Modified Username Field Change
2012-05-22 10:21 Warmonger New Issue
2012-05-22 10:21 Warmonger Status new => assigned
2012-05-22 10:21 Warmonger Assigned To => Ivan
2012-05-22 15:38 Ivan Note Added: 0002519
2012-05-22 16:22 Ivan Note Added: 0002520
2012-05-22 17:18 Warmonger Note Added: 0002523
2012-05-22 17:18 Warmonger Status assigned => resolved
2012-05-22 17:18 Warmonger Fixed in Version => 0.89
2012-05-22 17:18 Warmonger Resolution open => fixed
2014-05-30 17:41 beegee Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean