MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002390VCMIAI - Adventure Mappublic2016-01-19 17:292016-01-23 19:15
Reportervmarkovtsev 
Assigned Tovmarkovtsev 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
PlatformDarwinOSMacOSXOS Version10.11.2
Product Version0.98f 
Target VersionFixed in Version0.98g 
Summary0002390: VisitHero::fulfillsMe segfaults if the object is not found
DescriptionAI/VCAI/Goals.cpp, near line 438:

if (goal->goalType == Goals::VISIT_TILE && cb->getObj(ObjectInstanceID(objid))->visitablePos() == goal->tile)

In my particular case, cb->getObj(ObjectInstanceID(objid)) returns nullptr and the game crashes.
Steps To ReproduceMap "Resource War" (standard), load the provided save. End turn.
TagsNo tags attached.
Attached Fileszip file icon save.zip [^] (1,054,581 bytes) 2016-01-19 17:29

- Relationships
duplicate of 0002374assignedSXX VisitHero::fulfillsMe goal check used after battle with killed hero 

-  Notes
(0006315)
vmarkovtsev (developer)
2016-01-19 17:32

https://github.com/vcmi/vcmi/pull/159 [^]
(0006316)
vmarkovtsev (developer)
2016-01-19 17:34

Crash stack trace:

0 libvcmi.dylib 0x00000001088bedf1 CGObjectInstance::visitablePos() const + 17
1 libVCAI.dylib 0x0000000112220dda Goals::VisitHero::fulfillsMe(std::__1::shared_ptr<Goals::AbstractGoal>) + 74
2 libVCAI.dylib 0x0000000112195158 VCAI::striveToGoalInternal(std::__1::shared_ptr<Goals::AbstractGoal>, bool) + 8312
3 libVCAI.dylib 0x000000011217cc27 VCAI::striveToGoal(std::__1::shared_ptr<Goals::AbstractGoal>) + 167
4 libVCAI.dylib 0x000000011217b887 VCAI::makeTurnInternal() + 2327
5 libVCAI.dylib 0x0000000112172df7 VCAI::makeTurn() + 1863
6 libboost_thread-mt.dylib 0x00000001092f2715 boost::(anonymous namespace)::thread_proxy(void*) + 53
7 libsystem_pthread.dylib 0x00007fff883bdc13 _pthread_body + 131
8 libsystem_pthread.dylib 0x00007fff883bdb90 _pthread_start + 168
9 libsystem_pthread.dylib 0x00007fff883bb375 thread_start + 13
(0006320)
SXX (administrator)
2016-01-19 22:07

It's a fix for crash, but sadly it's not a fix for an actual bug in goals code.
(0006360)
SXX (administrator)
2016-01-23 19:15

Crash is fixed in pull request above. Though I'll leave 0002374 open for actual logical bug within VCAI. I'm really want to find out if fact how invalid logic affect goals there.

So this one is fixed while underlying problem need more work.

- Issue History
Date Modified Username Field Change
2016-01-19 17:29 vmarkovtsev New Issue
2016-01-19 17:29 vmarkovtsev Status new => assigned
2016-01-19 17:29 vmarkovtsev Assigned To => Warmonger
2016-01-19 17:29 vmarkovtsev File Added: save.zip
2016-01-19 17:32 vmarkovtsev Note Added: 0006315
2016-01-19 17:34 vmarkovtsev Note Added: 0006316
2016-01-19 21:58 SXX Relationship added duplicate of 0002374
2016-01-19 22:07 SXX Note Added: 0006320
2016-01-23 19:15 SXX Note Added: 0006360
2016-01-23 19:15 SXX Status assigned => resolved
2016-01-23 19:15 SXX Fixed in Version => 0.98g
2016-01-23 19:15 SXX Resolution open => fixed
2016-01-23 19:15 SXX Assigned To Warmonger => vmarkovtsev

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2018 MantisBT Team
Hosting provided by DigitalOcean