MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001051VCMIAI - Adventure Mappublic2012-08-11 16:242014-05-30 17:41
Reporterdouggie_m 
Assigned ToWarmonger 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformPowerPCOSGNU/LinuxOS VersionDebian Sid
Product Version 
Target VersionFixed in Version0.9 
Summary0001051: Connection.h:302: Assertion `oInfo.vector->size() > id' failed.
DescriptionI got the following error:

vcmiclient: Connection.h:302: T* CSerializer::getVectorItemFromId(const VectorisedObjectInfo<T>&, ui32) const [with T = CQuest, ui32 = unsigned int]: Assertion `oInfo.vector->size() > id' failed.
Aborted

With gdb:

Breakpoint 1, CSerializer::getVectorItemFromId<CGObjectInstance> (this=0x10aeff84, oInfo=..., id=2028) at ../lib/Connection.h:302
302 assert(oInfo.vector->size() > id);
(gdb) p id
$1 = 2028
(gdb) p oInfo.vector->size()
$2 = 2035
Steps To ReproduceLoad save1 game (attached to this report). End turn.
TagsNo tags attached.
Attached Filesbz2 file icon save1.tar.bz2 [^] (137,819 bytes) 2012-08-11 16:24
bz2 file icon allforone1.tar.bz2 [^] (137,642 bytes) 2012-08-11 18:21
png file icon faerie_ring-mage_guild-what.png [^] (724,107 bytes) 2012-08-11 20:09

- Relationships
related to 0001149closedIvan Crash(es) on visiting Shipwreck survivor 

-  Notes
(0002897)
douggie_m (reporter)
2012-08-11 16:37

Oh, that was just a first breakpoint hit, and 2035 is greater than 2028. It fails a bit further on 0 > 5 actually:

...
        Looking into Death's Gate
        Player 1 will build Upg. Cursed Temple in town of Death's Gate at 36 59 0
        Looking into Isra, MP=1500
                Isra will try to visit Subterranean Gate at (34 67 1)
[Switching to Thread 0xee354450 (LWP 16375)]

Breakpoint 1, CSerializer::getVectorItemFromId<CGObjectInstance> (this=0xea0818d4, oInfo=..., id=2028) at ../lib/Connection.h:302
302 assert(oInfo.vector->size() > id);
(gdb) printf "%d > %d\n", oInfo.vector->size(), id
2035 > 2028
(gdb) c
Continuing.

Breakpoint 1, CSerializer::getVectorItemFromId<CGObjectInstance> (this=0xea0818d4, oInfo=..., id=1460) at ../lib/Connection.h:302
302 assert(oInfo.vector->size() > id);
(gdb) printf "%d > %d\n", oInfo.vector->size(), id
2035 > 1460
(gdb) c
Continuing.
                Found a pair of subterranean gates between 34 67 1 and 34 67 0!

...
Continuing.
                Hero Isra moved from 34 67 0 to 38 65 0
                Isra will try to visit Subterranean Gate at (34 67 0)
                Hero Isra moved from 38 65 0 to 35 68 0
                Hero Isra apparently used all MPs (0 left)

        Looking into Xsi, MP=1500
                Xsi will try to visit Seer's Hut at (31 64 0)

Breakpoint 1, CSerializer::getVectorItemFromId<CGObjectInstance> (this=0xea0818d4, oInfo=..., id=2031) at ../lib/Connection.h:302
302 assert(oInfo.vector->size() > id);
(gdb) printf "%d > %d\n", oInfo.vector->size(), id
2035 > 2031
(gdb) c
Continuing.

Breakpoint 1, CSerializer::getVectorItemFromId<CGObjectInstance> (this=0xea0818d4, oInfo=..., id=1228) at ../lib/Connection.h:302
302 assert(oInfo.vector->size() > id);
(gdb) printf "%d > %d\n", oInfo.vector->size(), id
2035 > 1228
(gdb) c
Continuing.

Breakpoint 1, CSerializer::getVectorItemFromId<CQuest> (this=0xea0818d4, oInfo=..., id=5) at Connection.h:302
302 assert(oInfo.vector->size() > id);
(gdb) printf "%d > %d\n", oInfo.vector->size(), id
0 > 5
(gdb) c
Continuing.
vcmiclient: Connection.h:302: T* CSerializer::getVectorItemFromId(const VectorisedObjectInfo<T>&, ui32) const [with T = CQuest, ui32 = unsigned int]: Assertion `oInfo.vector->size() > id' failed.

Program received signal SIGABRT, Aborted.
0x0dda29ac in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(0002898)
Warmonger (administrator)
2012-08-11 16:42

Does this error occur after first map launch, or only reload?
(0002899)
douggie_m (reporter)
2012-08-11 16:46

> Does this error occur after first map launch, or only reload?

It is 6th turn, 1st week. Previous 5 turns have been finished w/o errors. Map itself is okay ;)
(0002900)
douggie_m (reporter)
2012-08-11 16:50
edited on: 2012-08-11 16:56

Backtrace:

Breakpoint 1, CSerializer::getVectorItemFromId<CQuest> (this=0x11e84d94, oInfo=..., id=5) at Connection.h:302
302 assert(oInfo.vector->size() > id);
(gdb) printf "%d > %d\n", oInfo.vector->size(), id
0 > 5
(gdb) bt
#0 CSerializer::getVectorItemFromId<CQuest> (this=0x11e84d94, oInfo=..., id=5) at Connection.h:302
#1 0x0fa6eb48 in CISer<CConnection>::loadPointer<CQuest const*> (this=0x11e84cf0, data=@0x13cf2c80: 0x200020) at Connection.h:820
0000002 0x0fa536c4 in LoadPointer<CConnection, CQuest const*>::invoke (s=..., data=@0x13cf2c80: 0x200020) at Connection.h:156
0000003 0x0fa4865c in CISer<CConnection>::load<CQuest const*> (this=0x11e84cf0, data=@0x13cf2c80: 0x200020) at Connection.h:758
0000004 0x0fa3c2c0 in CISer<CConnection>::operator>><CQuest const*> (this=0x11e84cf0, t=@0x13cf2c80: 0x200020) at Connection.h:725
0000005 0x0fa2e400 in CISer<CConnection>::operator&<CQuest const*> (this=0x11e84cf0, t=@0x13cf2c80: 0x200020) at Connection.h:732
0000006 0x0fa1bea8 in QuestInfo::serialize<CISer<CConnection> > (this=0x13cf2c80, h=..., version=0) at CGameState.h:490
0000007 0x0fa82528 in CISer<CConnection>::loadSerializableBySerializeCall<QuestInfo> (this=0x11e84cf0, data=...) at Connection.h:783
0000008 0x0fa6c354 in CISer<CConnection>::loadSerializable<QuestInfo> (this=0x11e84cf0, data=...) at Connection.h:790
0000009 0x0fa52978 in LoadSerializable<CConnection, QuestInfo>::invoke (s=..., data=...) at Connection.h:180
0000010 0x0fa477e8 in CISer<CConnection>::load<QuestInfo> (this=0x11e84cf0, data=...) at Connection.h:758
0000011 0x0fa3b1fc in CISer<CConnection>::operator>><QuestInfo> (this=0x11e84cf0, t=...) at Connection.h:725
0000012 0x0fa2d464 in CISer<CConnection>::operator&<QuestInfo> (this=0x11e84cf0, t=...) at Connection.h:732
0000013 0x0fa16a3c in AddQuest::serialize<CISer<CConnection> > (this=0x13cf2c78, h=..., version=732) at NetPacks.h:563
0000014 0x0f9eb66c in CPointerLoader<CISer<CConnection>, AddQuest>::loadPtr (this=0x11dc4e68, ar=..., data=0xee353bec, pid=4294967295) at Connection.h:679
0000015 0x0fc30cc4 in CISer<CConnection>::loadPointerHlp<CPack*> (this=0x11e84cf0, tid=141, data=@0xee353bec: 0x13cf2c78, pid=4294967295) at Connection.h:867
0000016 0x0fc2dcbc in CISer<CConnection>::loadPointer<CPack*> (this=0x11e84cf0, data=@0xee353bec: 0x13cf2c78) at Connection.h:850
0000017 0x0fc2aa30 in LoadPointer<CConnection, CPack*>::invoke (s=..., data=@0xee353bec: 0x13cf2c78) at Connection.h:156
0000018 0x0fc26c58 in CISer<CConnection>::load<CPack*> (this=0x11e84cf0, data=@0xee353bec: 0x13cf2c78) at Connection.h:758
0000019 0x0fc2247c in CISer<CConnection>::operator>><CPack*> (this=0x11e84cf0, t=@0xee353bec: 0x13cf2c78) at Connection.h:725
0000020 0x0fc0fff8 in CConnection::retreivePack (this=0x11e84cf0) at Connection.cpp:241
0000021 0x10366f34 in CClient::run (this=0x11e809e0) at Client.cpp:142
0000022 0x1045bdac in boost::_mfi::mf0<void, CClient>::operator() (this=0x11dd00e4, p=0x11e809e0) at /usr/include/boost/bind/mem_fn_template.hpp:49
...

> Xsi will try to visit Seer's Hut at (31 64 0)
> AddQuest::serialize<CISer<CConnection> > (this=0x13cf2c78, h=..., version=732) at NetPacks.h:563

So it's obviously bound to: seer's hut quests and serialization ("new file system").

(0002902)
Warmonger (administrator)
2012-08-11 17:02

I think I found it, fixed in r2829.
(0002903)
douggie_m (reporter)
2012-08-11 18:19

Looks like not:

Arlach will try to visit Seer's Hut at (31 64 0)
vcmiclient: Connection.h:302: T* CSerializer::getVectorItemFromId(const VectorisedObjectInfo<T>&, ui32) const [with T = CQuest, ui32 = unsigned int]: Assertion `oInfo.vector->size() > id' failed.
Aborted

I got that playing rev2829. With new game (save I uploaded was incompatible). Got it on 6th day again.
(0002904)
douggie_m (reporter)
2012-08-11 18:33

Also, I'm randomly getting "double free or corruption ":


*** glibc detected *** vcmiclient: double free or corruption (!prev): 0xed000018 ***
======= Backtrace: =========
/lib/powerpc-linux-gnu/libc.so.6(+0x85504)[0xddf0504]
/lib/powerpc-linux-gnu/libc.so.6(cfree+0x8c)[0xddf5adc]
/usr/lib/powerpc-linux-gnu/libSDL-1.2.so.0(SDL_FreeSurface+0x148)[0xe1d24b4]
vcmiclient[0x1055daac]
vcmiclient[0x105b0c78]
vcmiclient[0x105b0d04]
vcmiclient[0x1020eee8]
vcmiclient[0x10231310]
vcmiclient[0x105b0afc]
vcmiclient[0x1061f778]
vcmiclient[0x10617c84]
vcmiclient[0x1060ea38]
vcmiclient[0x10607964]
vcmiclient(_ZNK5boost9function0IvEclEv+0x74)[0x10233550]
vcmiclient[0x102339a4]
vcmiclient[0x10221af0]
vcmiclient[0x10210364]
vcmiclient[0x1020f59c]
vcmiclient[0x1048e398]
...
(0002905)
Warmonger (administrator)
2012-08-11 19:01

Lol, I just spot major bug. It's ridiculous that Seer Huts have been ever working for all this time :D

Check r2830.
(0002906)
douggie_m (reporter)
2012-08-11 20:04

Well.

That's great that Seer's Huts work now. I.e. it was nothing before when you visit, now they are fully functional.

But...

        Looking into Saurug, MP=1630
                Saurug will try to visit Seer's Hut at (31 64 0)
vcmiclient: Connection.h:302: T* CSerializer::getVectorItemFromId(const VectorisedObjectInfo<T>&, ui32) const [with T = CQuest, ui32 = unsigned int]: Assertion `oInfo.vector->size() > id' failed.
Aborted

Now on 5th day ;)

Also, minor thing. Faerie Ring screen displays Mage Guild level 2.
(0002907)
douggie_m (reporter)
2012-08-11 20:21

From VCMI_Client_log.txt:

...
Listening... Saurug will try to visit Seer's Hut at (31 64 0)
Sending a request "8MoveHero". It'll have an ID=113.
Sending to server a pack of type 8MoveHero
We'll wait till request 113 is answered.
    received server message of type 11TryMoveHero
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... received server message of type 14PackageApplied
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... Sending a request "8MoveHero". It'll have an ID=114.
Sending to server a pack of type 8MoveHero
We'll wait till request 114 is answered.
    received server message of type 11TryMoveHero
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... received server message of type 14PackageApplied
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... Sending a request "8MoveHero". It'll have an ID=115.
Sending to server a pack of type 8MoveHero
We'll wait till request 115 is answered.
    received server message of type 11TryMoveHero
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... received server message of type 14PackageApplied
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... Sending a request "8MoveHero". It'll have an ID=116.
Sending to server a pack of type 8MoveHero
We'll wait till request 116 is answered.
    received server message of type 11TryMoveHero
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... received server message of type 9HeroVisit
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... received server message of type 17SetObjectProperty
    Made first apply on cl
    Applied on gs
    Made second apply on cl
Listening... [EOF here]

From server_log.txt:

...
Creating a query for player 1 with ID=31
Creating a query for player 1 with ID=32
const PlayerState* CGameInfoCallback::getPlayer(int, bool) const: Cannot find player 3info!
const PlayerState* CGameInfoCallback::getPlayer(int, bool) const: Cannot find player 4info!
const PlayerState* CGameInfoCallback::getPlayer(int, bool) const: Cannot find player 5info!
const PlayerState* CGameInfoCallback::getPlayer(int, bool) const: Cannot find player 6info!
const PlayerState* CGameInfoCallback::getPlayer(int, bool) const: Cannot find player 7info!
read: Connection reset by peer
Ended handling connection
Warning: an orphaned child!
Warning: an orphaned child!
Warning: an orphaned child!
Warning: an orphaned child!
Warning: an orphaned child!
Warning: an orphaned child!
Warning: an orphaned child!
write: Broken pipe
(0002908)
douggie_m (reporter)
2012-08-11 22:09

Another SIGABRT on another failed assertion:

CStupidAI [0xe4b6b7c8]: actionFinished called
CStupidAI [0xe72967b0]: actionFinished called
    Player 2: I lost the Starting battle of Gundula attacking Mithril at 15 111 0!
CStupidAI [0xe4b6b7c8]: battleEnd called
CStupidAI [0xe4b6b7c8]: destroyed
CStupidAI [0xe72967b0]: battleEnd called
Warning: an orphaned child!
    I lost my hero Gundula. It's best to forget and move on.

Cannot get object with id 2289. Object was removed.
vcmiclient: VCAI.cpp:3648: const CGHeroInstance* HeroPtr::get(bool) const: Assertion `cb->getObj(h->id)' failed.
Aborted

Looks like AI hero has been lost in battle, and VCMI crashed due to that.
(0002909)
Warmonger (administrator)
2012-08-12 06:03

Could you please report ONE error at a time? Especially not report same bug twice.

Set category to AI, as only it seems to be able to trigger that bug.
(0002933)
Warmonger (administrator)
2012-08-27 08:03
edited on: 2012-08-27 08:07

Confirmed. The issue is that Quests are not properly serialized on map. However, it's not simple to fix it.

(0003065)
Warmonger (administrator)
2012-09-28 15:46

Fixed in r2939.

- Issue History
Date Modified Username Field Change
2012-08-11 16:24 douggie_m New Issue
2012-08-11 16:24 douggie_m File Added: save1.tar.bz2
2012-08-11 16:37 douggie_m Note Added: 0002897
2012-08-11 16:42 Warmonger Note Added: 0002898
2012-08-11 16:46 douggie_m Note Added: 0002899
2012-08-11 16:50 douggie_m Note Added: 0002900
2012-08-11 16:56 douggie_m Note Edited: 0002900 View Revisions
2012-08-11 17:02 Warmonger Note Added: 0002902
2012-08-11 18:19 douggie_m Note Added: 0002903
2012-08-11 18:21 douggie_m File Added: allforone1.tar.bz2
2012-08-11 18:33 douggie_m Note Added: 0002904
2012-08-11 19:01 Warmonger Note Added: 0002905
2012-08-11 19:02 Warmonger Severity minor => crash
2012-08-11 20:04 douggie_m Note Added: 0002906
2012-08-11 20:09 douggie_m File Added: faerie_ring-mage_guild-what.png
2012-08-11 20:21 douggie_m Note Added: 0002907
2012-08-11 22:09 douggie_m Note Added: 0002908
2012-08-12 06:03 Warmonger Note Added: 0002909
2012-08-12 06:04 Warmonger Category Mechanics - Other => AI - Adventure Map
2012-08-27 08:03 Warmonger Note Added: 0002933
2012-08-27 08:03 Warmonger Assigned To => Warmonger
2012-08-27 08:03 Warmonger Status new => confirmed
2012-08-27 08:07 Warmonger Note Edited: 0002933 View Revisions
2012-09-28 15:46 Warmonger Note Added: 0003065
2012-09-28 15:46 Warmonger Status confirmed => resolved
2012-09-28 15:46 Warmonger Fixed in Version => 0.9
2012-09-28 15:46 Warmonger Resolution open => fixed
2012-11-15 18:12 Ivan Relationship added related to 0001149
2014-05-30 17:41 beegee Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean