UFO:Alien Invasion

Development => Coding => Topic started by: Bandobras on July 17, 2006, 01:21:45 pm

Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 01:21:45 pm
Hello guys! We are having a bug-squashing party on IRC channel #ufo:ai. Would you like to join? You don't even need to irc, you can share your ideas here...

Code: [Select]
<Bandobras> Hi guys! [13:02]
<Bandobras> the client/cl_parse.c error
<Bandobras> Com_Error (ERR_DROP, "CL_PlaceItem: Fix me!!!");
<Bandobras> seems ripe for fixing, but I have no clue
<Bandobras> first, what's the problem there? [13:03]
<Bandobras> second, what are the commented out fragments in this function?
<Bandobras> the "if" and "le->angles" [13:04]
<Bandobras> third: "The inventory is destroyed twice later!"
<Bandobras> where is "later"?


P.S. The lucky finder of this bug is  ssianky. Who will be the lucky conqueror, with the help of the others, is to be seen. ;)

P.P.S. The bug lurks in http://svn.sourceforge.net/viewcvs.cgi/ufoai/ufoai/trunk/src/client/cl_parse.c
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 02:00:23 pm
Follow up:

Code: [Select]
<ssianky> this is about "inventory bug" - when "There are more than the
 allowed entries in container..." message displayed. [13:50]
<ssianky> the inventory is destroyed two times (for actor->i.c[csi.idFloor]
 and le->i.c[csi.idFloor]), but must only once. [13:53]
<BTAxis> Isn't it a simple matter of checking if it exists whenever you
destroy it? [13:54]
<ssianky> no, it can't be checked when destroyed. [13:55]
<Bandobras> actor is the one who carries it and le is what? [13:56]
<ssianky> i don't know. thats way i let corections of this bug for
 others,.. how know. [13:58]
<Bandobras> is it only for items put on the floor, BTW?
<Bandobras> is the function CL_PlaceItem called only for dropping things?
[13:59]
<Bandobras> (We'll just gather what we know, look up what we don't and see
   then...)
<Bandobras> OK, so that we don't know yet. [14:00]
<Bandobras> Where are the two places where inventory is destroyed? [14:01]
<ssianky> Com_EmptyContainer
<Bandobras> 1st
<ssianky> Com_EmptyContainer - 2-nd
<Bandobras> which file?
<ssianky> q_shared.c [14:02]
<Bandobras> game/q_shared.c, indeed [14:03]
<Bandobras> so actor may be the soldier, le, I don't know, the floor? [14:04]
<Bandobras> and at some time you destroy the two inventories?
<Bandobras> in the result destroying the dropped item twice? [14:05]
<Bandobras> OK. Perhaps. Now, I presume the commented out "if" and "le->angles"
<Bandobras> have nothing to do with our bug?
<Bandobras> We know what we don't know, let's try to find out... [14:06]
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 02:23:55 pm
Code: [Select]
<ssianky> le - local entity. i think bulets are le too. [14:19]
<Bandobras> k
<Bandobras> I see Com_EmptyContainer take an inventory and an index of
   particular container [14:20]
<Bandobras> in that inventory and empties that container
<Bandobras> I see a container is a linked list [14:21]
<Bandobras> the first four lines after while I don't get [14:22]
<Bandobras> Anyway, at the very end: the container is set to null [14:23]
<Bandobras> what do the four lines do? [14:24]
<Bandobras> if the container, the linked list, is longer than MAX_INVLIST
[14:25]
<Bandobras> then the "Error: There are more than the allowed..." appears
<Bandobras> so the four lines move us forward one item on the list [14:26]
<Bandobras> but I wonder what invUnused is [14:27]
<Bandobras> static invList_t *invUnused;
<Bandobras> Oh, I see this is a list of all unused container cells, all lumped
   together [14:28]
<Bandobras> for all containers
<Bandobras> So nothing dangerous here [14:29]
<Bandobras> So the question is how can the length of any container exceed
   MAX_INVLIST? [14:30]
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 02:28:52 pm
Code: [Select]
<Bandobras> Back to  CL_PlaceItem [14:31]
<Bandobras> both actor->i.c[csi.idFloor] and le->i.c[csi.idFloor] are
   containers, right? [14:32]
<ssianky> this can be, when the list is linked in infinite loop.
<Bandobras> oh [14:33]
<Bandobras> oh
<Bandobras> oh
<Bandobras> oh
* Bandobras wanders off mumbling [14:34]
<Bandobras> #define MAX_INVLIST           1024 [14:37]
<Bandobras> so indeed it would be hard to achieve without a loop
<ssianky> ??? [14:40]
<ssianky> i talk about "how can the length of any container exceed
 MAX_INVLIST". it can only if links have loop.
<Bandobras> sure, this is what I say :) [14:41]
<Bandobras> because  MAX_INVLIST is so large [14:42]
<Bandobras> (come on, role-play some, people are watching) ;> [14:44]
<angel_7th> Bandobras: :))
<Bandobras> ;> [15:14]
* Bandobras scratches his head and breathes heavily staring at the code [15:15]
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 03:39:12 pm
Code: [Select]
<Bandobras> so, why do we have a looping list in CL_PlaceItem? [15:38]
<Bandobras> the argument of the function is le --- "<ssianky> le - local
   entity. i think bulets are le too."
<Bandobras> so the function gets a bullet, finds an actor [15:39]
<Bandobras> on the same position as the bullet
<Bandobras> and if the actor exists does something
<Bandobras> namely assigns a bullet container to the actor container [15:40]
<Bandobras> the bullet has a container in its inventory named csi.idFloor
[15:41]
<Bandobras> probably the container represents things on the floor
<Bandobras> so in case of the bullet, if it dropped to the ground [15:42]
<Bandobras>  the container is a linked list with one element --- the dropped
   bullet
<Bandobras> then the floor container of the actor, say, a soldier [15:43]
<Bandobras> is said to be exactly the single-item container with the dead
   bullet
<Bandobras> sounds strange [15:44]
<Bandobras> what if the soldier dropped something on the ground before that?
<Bandobras> then his floor container is overwritten with the one of the bullet
<Bandobras> to see if this is a problem we have to find out when CL_PlaceItem
   is called [15:45]
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 03:52:13 pm
Code: [Select]
<Bandobras> BTW, I don't see a possibility that this particular assignment
[15:51]
<Bandobras> creates a looping linked list [15:52]
<Bandobras> but it may cause that e.g. the soldier gets invUnused as his floor
   container [15:53]
<Bandobras> let's see
<Bandobras> what happens when later on the bullet floor container is emptied?
[15:54]
<Bandobras> I see: the head of the liked list (the container) [15:56]
<Bandobras> I mean the first cell of the list
<Bandobras> not its value
<Bandobras> is incorporated into the invUnused linked list [15:57]
<Bandobras> so that the next cells are all those of invUnused
<Bandobras> and the previous cells are the next cells of the empties floor
   container
<Bandobras> can invUnused ever be higher than 1024? [15:58]
<Bandobras> I guess quite likely...
<Bandobras> So if the bullet floor container is ever emptied, the soldier
   floor container will contain more than 1024 items (and vice versa)
<Bandobras> are you with me? does it make sense?
<ssianky> oh, yes... it make sense... [16:00]
<Bandobras> So, just as you said, when later the soldier floor container is
   emptied
<Bandobras> the Com_EmptyContainer function tries to empty the whole invUnused [16:01]
<Bandobras> and rightfully barfs after 1024 items
<Bandobras> ?
<Bandobras> Something like this is in your comment, right? [16:02]
<ssianky> yes.
<Bandobras> that may be why with your error trap the bugs appears early,
[16:04]
<Bandobras> while without the game was OK until 1024 items were destroyed [16:05]
<Bandobras>  while without the trap, the game run fine until 1024 items were
   destroyed
* Bandobras rubs his forehead [16:08]
* Bandobras picks his nose
<Bandobras> perhaps now analyze when CL_PlaceItem is called? [16:09]
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 04:30:05 pm
This episode is hot:

Code: [Select]
<ssianky> the game NOT run fine. it crash each time someone die. [16:10]
<Bandobras> even without your Com_Error (ERR_DROP...  ?
<ssianky> i said, that list have LOOP.
<Bandobras> yes, I suspected it, as well [16:11]
<ssianky> yes, even without Com_Error.
<Bandobras> oh
<Bandobras> so back to drawing board...
<Bandobras> or could they be separate errors?
<Bandobras> the crash and the "Error: There are more than the allowed [16:12]
<ssianky> this error is only a side effect.
<Bandobras> the "Error: There are more than the allowed? [16:13]
<ssianky> yes
<Bandobras> of what?
<ssianky> of bug.
<Bandobras> :)
*** TorF (n=torf@84.5.107.214) has joined channel #ufo:ai
<Bandobras> I think [ 1523002 ] object still on the floor after picked up
[16:14]
<Bandobras> might be related, too
<ssianky> maybe. this bug have many side effects.
<Bandobras> [ 1513825 ] it just crashed [16:16]
<Bandobras> that one says it does not happen immediately, nor at each death
[16:17]
<Bandobras> until you caught the issue earlier [16:18]
<Bandobras> with your  Com_Error (ERR_DROP...
<ssianky> it at each death, but a bit later, when messages from server are
 processed. [16:20]
<Bandobras> Sorry, I've just tested.for me (laset trunk)
<Bandobras> For me (latest trunk) is not after each death [16:21]
<Bandobras> I killed several of my soldiers and nothings wrong
<Bandobras> (without your Com_Error (ERR_DROP...))
<Bandobras> so perhaps it is OK until invUnused is too long? [16:22]
<ssianky> messages are processed LATER.
<Bandobras> after my game turn ends?
<Bandobras> when?
<Bandobras> I get a lot of [16:23]
<Bandobras> G_ActorDie: kill actor on team 1
<Bandobras> G_InventoryToFloor: item to floor: assault
<Bandobras> and no crash
<Bandobras> You can test yourself, commenting out your bug trap... [16:24]
* Bandobras shows his teeth
<ssianky> I already tested. I debugged for this bug 1.5 days, and I know what
 I say. [16:25]
<Bandobras> so, please, tell me when the "messages are processed LATER."
<Bandobras> I'd like to test some more to verify your data [16:26]
<Bandobras> So how long to wait for the crash?
<ssianky> in cl_parse.c [16:28]
<ssianky> search for evStorage [16:29]
<ssianky> also look at CL_Events [16:30]
<Bandobras> OK [16:31]
<Bandobras> I'll look there, thanks. I've made some more tests
<Bandobras> and they support my theory that until invUnused is full [16:32]
<Bandobras> nothing wrong happens (at least in my build)
<Bandobras> I can post the ufo log.
<Bandobras> evStorage, CL_Events: I probably can't understand it [16:35]
<Bandobras> or it applies to some other related bugs
<Bandobras> I'll post the ufo log on the forum, so that you can see what I mean
[16:36]
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 04:31:15 pm
The ufoconsole.log:

Code: [Select]

==== InitGame ====
------- Server Initialization -------
CM_AddMapTile: token: +s01
CM_AddMapTile: token: +h01
CM_AddMapTile: token: +h03
CM_AddMapTile: token: +drop
CM_AddMapTile: token: +r03
CM_AddMapTile: token: +d07
CM_AddMapTile: token: +r03
CM_AddMapTile: token: +h02
CM_AddMapTile: token: +d05
CM_AddMapTile: token: +h03
CM_AddMapTile: token: +d04
CM_AddMapTile: token: +d01
CM_AddMapTile: token: +d04
CM_AddMapTile: token: +d06
CM_AddMapTile: token: +d05
CM_AddMapTile: token: +s09
CM_AddMapTile: token: +d02
CM_AddMapTile: token: +d03
CM_AddMapTile: token: +d03
CM_AddMapTile: token: +s10
Created AI player (team 0)
Could not find alien armor ''
Could not find alien armor ''
Could not find alien armor ''
Created AI player (team 7)
-------------------------------------
0.0.0.0:0: client_connect




+villaged
Map: +villaged
                                     
pics
                                     
civilians/female/body02
                                     
civilians/female/head01a
                                     
civilians/female/body01
                                     
civilians/female/head01b
                                     
civilians/male/body01
                                     
civilians/male/head01
                                     
civilians/female/head02a
                                     
aliens/blue/body01
                                     
aliens/blue/head01
                                     
images
                                     
You are already on team 1
unnamed has taken control over team 1.
Particle definiton "water_fountain" not found
Particle definiton "water_fountain" not found
Particle definiton "water_fountain" not found
Particle definiton "water_fountain" not found
(player 0) It's team 1's round
New morale is 0.00 - entity morale is 1074936362
New morale is 0.00 - entity morale is 1075228026
New morale is 0.00 - entity morale is 1073602013
New morale is 0.00 - entity morale is 1072177867
New morale is 0.00 - entity morale is 1073887786
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1073275498
New morale is 0.00 - entity morale is 1073951539
New morale is 0.00 - entity morale is 1073959282
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075986981
New morale is 0.00 - entity morale is 1074936362
New morale is 0.00 - entity morale is 1075228026
New morale is 0.00 - entity morale is 1073602013
New morale is 0.00 - entity morale is 1072177867
New morale is 0.00 - entity morale is 1073887786
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1073275498
New morale is 0.00 - entity morale is 1073951539
New morale is 0.00 - entity morale is 1073959282
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075986981
New morale is 0.00 - entity morale is 1074936362
New morale is 0.00 - entity morale is 1075228026
New morale is 0.00 - entity morale is 1073602013
New morale is 0.00 - entity morale is 1072177867
New morale is 0.00 - entity morale is 1073887786
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1073275498
New morale is 0.00 - entity morale is 1073951539
New morale is 0.00 - entity morale is 1073959282
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075986981
New morale is 0.00 - entity morale is 1074936362
New morale is 0.00 - entity morale is 1075228026
New morale is 0.00 - entity morale is 1073602013
New morale is 0.00 - entity morale is 1072177867
New morale is 0.00 - entity morale is 1073887786
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1073275498
New morale is 0.00 - entity morale is 1073951539
New morale is 0.00 - entity morale is 1073959282
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075986981
Can't perform action - not enough TUs!
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: assault
New morale is 0.00 - entity morale is 1074992323
New morale is 0.00 - entity morale is 1075139925
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073820433
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073070889
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073621885
New morale is 0.00 - entity morale is 1070666001
New morale is 0.00 - entity morale is 1075997148
New morale is 0.00 - entity morale is 1074992323
New morale is 0.00 - entity morale is 1075139925
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073820433
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073070889
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073621885
New morale is 0.00 - entity morale is 1070666001
New morale is 0.00 - entity morale is 1075997148
New morale is 0.00 - entity morale is 1074992323
New morale is 0.00 - entity morale is 1075139925
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073820433
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073070889
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073621885
New morale is 0.00 - entity morale is 1070666001
New morale is 0.00 - entity morale is 1075997148
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: pistol
G_InventoryToFloor: item to floor: pistol
New morale is 0.00 - entity morale is 1074992323
New morale is 0.00 - entity morale is 1075139925
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073820433
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073070889
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073621885
New morale is 0.00 - entity morale is 1075997148
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1074962663
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073943747
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073435456
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1076039433
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1074962663
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073943747
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073435456
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1076039433
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1074962663
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073943747
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073435456
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1076039433
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1074962663
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073943747
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073435456
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1076039433
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1074962663
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073943747
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073435456
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1071846595
New morale is 0.00 - entity morale is 1076039433
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: shotgun
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1074962663
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073943747
New morale is 0.00 - entity morale is 1073042773
New morale is 0.00 - entity morale is 1073435456
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1076039433
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: flamer
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1074836011
New morale is 0.00 - entity morale is 1074287328
New morale is 0.00 - entity morale is 1073982233
New morale is 0.00 - entity morale is 1073043210
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075511678
Team 1 ended round, team 7's round started!
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074913646
New morale is 0.00 - entity morale is 1074680323
New morale is 0.00 - entity morale is 1074329683
New morale is 0.00 - entity morale is 1073785339
New morale is 0.00 - entity morale is 1072177867
New morale is 0.00 - entity morale is 1075355707
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074913646
New morale is 0.00 - entity morale is 1074680323
New morale is 0.00 - entity morale is 1074329683
New morale is 0.00 - entity morale is 1073785339
New morale is 0.00 - entity morale is 1072177867
New morale is 0.00 - entity morale is 1075355707
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074913646
New morale is 0.00 - entity morale is 1074680323
New morale is 0.00 - entity morale is 1074329683
New morale is 0.00 - entity morale is 1073785339
New morale is 0.00 - entity morale is 1072177867
New morale is 0.00 - entity morale is 1075355707
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074913646
New morale is 0.00 - entity morale is 1074680323
New morale is 0.00 - entity morale is 1074329683
New morale is 0.00 - entity morale is 1073785339
New morale is 0.00 - entity morale is 1072177867
New morale is 0.00 - entity morale is 1075355707
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
G_ActorDie: kill actor on team 0
New morale is 0.00 - entity morale is 1075293968
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075077358
New morale is 0.00 - entity morale is 1075335904
New morale is 0.00 - entity morale is 1075086503
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075882352
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
G_ActorDie: kill actor on team 0
New morale is 0.00 - entity morale is 1075468373
New morale is 0.00 - entity morale is 1076079866
New morale is 0.00 - entity morale is 1076135057
New morale is 0.00 - entity morale is 1076062698
New morale is 0.00 - entity morale is 1075915992
New morale is 0.00 - entity morale is 1075651161
New morale is 0.00 - entity morale is 0
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: rpg
New morale is 0.00 - entity morale is 1074568997
New morale is 0.00 - entity morale is 1075274961
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1073345894
New morale is 0.00 - entity morale is 1074199049
New morale is 0.00 - entity morale is 1076121359
New morale is 0.00 - entity morale is 1073661345
New morale is 0.00 - entity morale is 1075148663
New morale is 0.00 - entity morale is 1073413491
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1072895660
New morale is 0.00 - entity morale is 1075901243
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: smg
New morale is 0.00 - entity morale is 1073661345
New morale is 0.00 - entity morale is 1075148663
New morale is 0.00 - entity morale is 1073413491
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075901243
Astrid Hjelset is in mad rage!
Juriy Zaharov is in mad rage!
Can't perform action - not enough TUs!
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075167613
New morale is 0.00 - entity morale is 1074329683
New morale is 0.00 - entity morale is 1073150878
New morale is 0.00 - entity morale is 1075587391
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075167613
New morale is 0.00 - entity morale is 1074329683
New morale is 0.00 - entity morale is 1073150878
New morale is 0.00 - entity morale is 1075587391
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075167613
New morale is 0.00 - entity morale is 1074329683
New morale is 0.00 - entity morale is 1073150878
New morale is 0.00 - entity morale is 1075587391
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Team 1 ended round, team 7's round started!
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075524060
New morale is 0.00 - entity morale is 1075901208
New morale is 0.00 - entity morale is 1075524081
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075524060
New morale is 0.00 - entity morale is 1075901208
New morale is 0.00 - entity morale is 1075524081
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075524060
New morale is 0.00 - entity morale is 1075901208
New morale is 0.00 - entity morale is 1075524081
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075524060
New morale is 0.00 - entity morale is 1075901208
New morale is 0.00 - entity morale is 1075524081
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075524060
New morale is 0.00 - entity morale is 1075901208
New morale is 0.00 - entity morale is 1075524081
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075182953
New morale is 0.00 - entity morale is 1075524060
New morale is 0.00 - entity morale is 1075901208
New morale is 0.00 - entity morale is 1075524081
New morale is 0.00 - entity morale is 0
Astrid Hjelset panics!
Juriy Zaharov panics!
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Team 1 ended round, team 7's round started!
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074898958
New morale is 0.00 - entity morale is 1073345535
New morale is 0.00 - entity morale is 1071714577
New morale is 0.00 - entity morale is 1075442687
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074898958
New morale is 0.00 - entity morale is 1073345535
New morale is 0.00 - entity morale is 1071714577
New morale is 0.00 - entity morale is 1075442687
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074898958
New morale is 0.00 - entity morale is 1073345535
New morale is 0.00 - entity morale is 1071714577
New morale is 0.00 - entity morale is 1075442687
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: sniper
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074898958
New morale is 0.00 - entity morale is 1073345535
New morale is 0.00 - entity morale is 1075442687
New morale is 0.00 - entity morale is 1074012214
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074600004
New morale is 0.00 - entity morale is 1075312744
Astrid Hjelset panics!
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Team 1 ended round, team 7's round started!
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074913679
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1075048021
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074913679
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1075048021
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074913679
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1075048021
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1074913679
New morale is 0.00 - entity morale is 1072364569
New morale is 0.00 - entity morale is 1075048021
New morale is 0.00 - entity morale is 1074871208
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075091943
New morale is 0.00 - entity morale is 1074833915
New morale is 0.00 - entity morale is 1075319172
New morale is 0.00 - entity morale is 1075148744
New morale is 0.00 - entity morale is 1075444325
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075319172
New morale is 0.00 - entity morale is 1075148744
New morale is 0.00 - entity morale is 1075444325
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075319172
New morale is 0.00 - entity morale is 1075148744
New morale is 0.00 - entity morale is 1075444325
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075319172
New morale is 0.00 - entity morale is 1075148744
New morale is 0.00 - entity morale is 1075444325
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075319172
New morale is 0.00 - entity morale is 1075148744
New morale is 0.00 - entity morale is 1075444325
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075319172
New morale is 0.00 - entity morale is 1075148744
New morale is 0.00 - entity morale is 1075444325
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075319172
New morale is 0.00 - entity morale is 1075148744
New morale is 0.00 - entity morale is 1075444325
New morale is 0.00 - entity morale is 0
New morale is 0.00 - entity morale is 1075319172
New morale is 0.00 - entity morale is 1075148744
New morale is 0.00 - entity morale is 1075444325
New morale is 0.00 - entity morale is 0
Team 7 ended round, team 0's round started!
Astrid Hjelset panics!
Team 0 ended round, team 1's round started!
==== ShutdownGame ====
SDL audio device shut down.
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 05:01:22 pm
The story continues:

Code: [Select]
<ssianky> invUnused is a list. lists cant be full. [16:39]
<Bandobras> I've posted it at
   http://ufo.myexp.de/phpBB2/viewtopic.php?p=1707#1707
<Bandobras> as you can see the "Error: There are more than the allowed"
<Bandobras> messages appear only after several turns
<Bandobras> while in the first turn most of the soldiers die [16:40]
<Bandobras> My theory is that until invUnused is below 1023 the messages do
   not appear
<ssianky> and what if so? the bug happens each time when someone die. later
 you see only side effects of this bug. [16:42]
<Bandobras> the wrong behaviour appears each time, agreed
<Bandobras> but it seems to be caused not by a looping list
<Bandobras> but by the invUnused things, as explained earlier [16:43]
<Bandobras> ?
<Bandobras> afk for a moment
<ssianky> DEBUG yourself and look at elements in invUnused when floor
 container is destroyed. [16:46]
<ssianky> you will see the loop in first few elements.
*** TorF (n=torf@84.5.107.214) has quit: Read error: 104 (Connection reset by
    peer) [17:00]
<Bandobras> you mean with real grown-up debugger? [17:03]
<Bandobras> gdb?
<Bandobras> I can't
<Bandobras> How do you do it?
<Bandobras> Really a loop, or similar elements one after another? [17:04]
<CIA-18> tlh2000 * r1922 /ufoai/trunk/src/ (linux/gl_glx.c qcommon/cmodel.c):
[17:05]
<CIA-18> * (hopefully) fixed bug #1523414
<CIA-18> * (hopefully) fixed bug #1521436
<CIA-18> * fixed INT32 already defined on x86_64
<Bandobras> No one of ours... :( [17:07]
<Bandobras> Not one of our bugs... :(
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 05:23:46 pm
Don't get put off by the drastic beginning. It all ends well.

Code: [Select]
<ssianky> like msvc 2005. gdb is a sucks. [17:08]
*** ssianky (n=Miranda@host-212-0-211-250.moldtelecom.md) has quit: Read
    error: 104 (Connection reset by peer) [17:09]
<Bandobras> hehe
<Bandobras> sorry
<Bandobras> come back! [17:10]
*** mattn (n=mattn@134.76.62.145) has joined channel #ufo:ai [17:12]
<Bandobras> come back you coward! [17:13]
<Bandobras> Oh my, of course there is a loop in invUnused
<Bandobras> and I can't tell you that you were right from the very beginning
<Bandobras> come back!
<Bandobras> hi mattn [17:14]
<mattn> hi
<Bandobras> we are playing with bugs
<mattn> invUnused? Someone fixed that bug :-D
<mattn> ??
<mattn> well i'm fighting them :-D
<Bandobras> no mercy
<Bandobras> let me concentrate [17:15]
<BTAxis> mattn is riding out on his tiny little horse, waving around a tiny
sword and a tiny shield, fighting the bugs.
<Bandobras> let's say there is a one element invUnused called i
<Bandobras> and a bullet with a two-element floor inventory container b1,b2
[17:16]
<Bandobras> THE BUGS respond with plasma fire!
<mattn> a bullet with a two-element floor inventory container b1,b2???
<Bandobras> I mean, a local entity [17:17]
<Bandobras> any local entity, even a bullet (say, it split in two and dropped
   to the ground)
*** BTAxis (i=BTAxis@wit395304.student.utwente.nl) has changed mode for
    #ufo:ai to +o mattn
<Bandobras> and a soldier is standing there
<Bandobras> (waving his little sword) [17:18]
<Bandobras> so in CL_PlaceItem the floor inventory of the soldier
<Bandobras> is made to be the same as of the bullet, that is b1,b2
<Bandobras> (I wonder where and when CL_PlaceItem is called, but let's go on)
[17:19]
<mattn> on the event "add to inventory" and "delete from inventory"
<Bandobras> Now when the bullet inventory is emptied in Com_EmptyContainer
<mattn> ^^but go on
<Bandobras> k
<Bandobras> b1->next is set to i [17:20]
<Bandobras> and invUnused is set to b1
<Bandobras> then b2-> next is set to bl,i
<Bandobras> and invUnused is set to b2 [17:21]
<Bandobras> so invUnused becomes b2,b1,i
<Bandobras> now comes the tricky part
<Bandobras> the soldier inventory is emptied (why not)
<Bandobras> the soldier floor container points at b1 still [17:22]
<mattn> yeah, i see - there is our endless loop
<Bandobras> I don't see yet, sorry, let's go on
<Bandobras> so in Com_EmptyContainer b1->next is set to the beginning of
   b2,b1,i
<Bandobras> and invUnused is set to b1 [17:23]
<Bandobras> then i-> next is set to b1,b2,b1,i [17:24]
<Bandobras>  and invUnused is set to i
<Bandobras> done
<Bandobras> or not
<Bandobras> ?
* Bandobras is lost
* Bandobras is swarmed with bugs [17:25]
* Bandobras loops
<Bandobras> ah, I see [17:26]
<Bandobras> rewind
<Bandobras> so in Com_EmptyContainer b1->next is set to the beginning of
<Bandobras>    b2,b1,i
<Bandobras> so b1->next is set to the beginning of b2,b1,b2,b1,b2,b1 [17:27]
<Bandobras> here
<Bandobras>  and invUnused is set to b1
<Bandobras> then b2->next is set to b1,b2,b1,b2,b1...
<Bandobras> etc. so Com_EmptyContainer loops [17:28]
<Bandobras> but after 1024 cycles it emits the error
<Bandobras> ------------------------------------------------
<Bandobras> ssianky, you were right, you can now come back [17:29]
<Bandobras> you were right all along
<Bandobras> (even if you think msvc 2005 is better than gdb)
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 05:35:29 pm
The story unfolds (notice the actor's exquisite performance):

Code: [Select]
<Bandobras> and my tests without ssianky bug trap show [17:31]
<Bandobras> that the loop happens not immediately after soldiers die
<Bandobras> and even in the next turn
<Bandobras> and not even in the next turn [17:32]
<Bandobras> mattn, can it be that CL_PlaceItem is called both for the bullet
   and for the soldier? [17:34]
<Bandobras> I mean  Com_EmptyContainer
<Bandobras> sorry
*** SlaSheR84 (n=SlaSheR8@144.134.85.166) has joined channel #ufo:ai [17:35]
<mattn> don't know exactly - put a Com_Printf into the function
<SlaSheR84> hi all
<Bandobras> as for CL_PlaceItem, you say it is called at "add to inventory"
   and "delete from inventory"
<Bandobras> hi
<mattn> just a Com_Printf("pointer to entity: '%p'\n", le );
<mattn> hi
<SlaSheR84> need someone new?
<SlaSheR84> i got heaps of ideas and time [17:36]
<Bandobras> so I guess upon soldier's death "delete from inventory" is called
<Bandobras> great!
<Bandobras> let me guess: but you can't do anything?
<Bandobras> ;P
<BTAxis> Yeah, seriously.
<Bandobras> :>
<Bandobras> we are just trying to squash a bug
<Bandobras> wanna join?
<SlaSheR84> i can 3d model but not texture,
<Bandobras> great!
<BTAxis> We have a serious lack of modelers. [17:37]
<mattn> Yes, EV_INV_DEL is called on soldiers death
<SlaSheR84> sweet
<Bandobras> so this is when the loop is created
<Bandobras> no
<Bandobras> when a potential is created
<Bandobras> when both are emptied
<SlaSheR84> got a list of things needed to be modeled
<Bandobras> the loop will be ready
<mattn> yeah, when we need one thing, that this one thing is a modeller [17:38]
<Bandobras> good, so which model you think about
<mattn> we always need general models for our maps like cars, trucks, tree and
so on
<mattn> but we also have a todo list in the wiki
<SlaSheR84> any aspiritions of going mmo?
<Bandobras> todo is mainly about equipment models
<SlaSheR84> i got good ideas for multi
<BTAxis> http://ufo.myexp.de/wiki/index.php/TODO#Models
<mattn> http://ufo.myexp.de/wiki/index.php/Modelling [17:39]
<mattn> ^^
<Bandobras> yeah
<mattn> damn, you were faster ;-)
<BTAxis> And more accurate.
<mattn> :-P
<Bandobras> I have to warn you, today the irc is broadcasted
<Bandobras> for the entertainment of UFO:AI fans
<Bandobras> and in hope of attracting coders
<mattn> uhui
<SlaSheR84> cool [17:40]
<Bandobras> at least for an ad hoc bug squashing party
* mattn activates his spellchecker
<mattn> :-D
<Bandobras> ;>
<SlaSheR84> ill hold on to my ideas then
<Bandobras> try to act casually
<SlaSheR84> ;)
* Bandobras smiles sweetly
<SlaSheR84> *whistles*
<Bandobras> ;>
* BTAxis saves world
* BTAxis looks good in front of crowd
<Bandobras> OH!
*** ssvb (n=user@42-nat.cosmostv.by) has joined channel #ufo:ai
* Bandobras tries not show his hump [17:41]
<SlaSheR84> so what format do you need the models in?
<BTAxis> http://ufo.myexp.de/wiki/index.php/Modelling [17:42]
<SlaSheR84> i got 3dsmax and blender atm
<BTAxis> It's all on there.
<mattn> to get a feel of the dimensions i suggest you import an existing model
<mattn> and i suggest to use 3dsmax for exporting them to md2 [17:43]
<mattn> because blender produces bigger files
<mattn> that are sometimes broken [17:44]
<SlaSheR84> kk [17:45]
<SlaSheR84> there a 3dsmax for linux port?
<mattn> no [17:46]
<mattn> just vmware or wine [17:47]
<Bandobras> sucks
<SlaSheR84> prob not so i guess im stuck in windows for now... :'( i miss my
   fedora core 5 allready
<mattn> you could try maya - there is a linux version available
<SlaSheR84> ahhh excellent
<SlaSheR84> i feel more comfy in linux [17:48]
<SlaSheR84> doesnt crash as much
<SlaSheR84> well being quarter to 2 here im gunna crash myself [17:49]
<SlaSheR84> ill be around
<Bandobras> you can relax and stop talking with the BBC accent, I stopped
   broadcasting
<Bandobras> until we come back to the coding matters (no hurry) [17:50]
<Bandobras> but, come on, don't stop talking!


We have a technical break here...
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 06:40:23 pm
A new hope:

Code: [Select]
<Bandobras> mattn" just a Com_Printf("pointer to entity: '%p'\n", le ); [18:34]
<Bandobras> got ya
<Bandobras> every time "Error: There are more than the allowed" appears [18:35]
<Bandobras> there is a call of  Com_EmptyContainer
<Bandobras> to the same container twice
* Bandobras laughs
<Bandobras> and all this happens between [18:36]
<Bandobras> Team 0 ended round, team 1's round started!
<Bandobras> and
<Bandobras> Team 1 ended round, team 7's round started! [18:37]
*** fatty (n=rotkaepp@W1339.w.pppool.de) has joined channel #ufo:ai [18:41]
<Bandobras> Now, what should we do instead of assigning the bullet floor
   container as the soldier's floor container? [18:50]
<Bandobras> instead of: actor->i.c[csi.idFloor] = le->i.c[csi.idFloor];
<Bandobras> ?
<Bandobras> Logically, we should link the bullet list to the end of the
   soldier's list [18:51]
<Bandobras> ?
<Bandobras> and set the bullet list to NULL? [18:52]
<Bandobras> two soldiers cannot stand in the same place...
<Bandobras> so when the soldier stands on a square he gets all the items
[18:53]
<Bandobras> into his floor inventory container
<Bandobras> when he leaves
<Bandobras> he gives all back to the bullet's container
<Bandobras> So, the floor inventories of any two entites on the same position
[19:02]
<Bandobras> are merged and given to one of them
<Bandobras> two which one? to the actor, that is soldier [19:03]
<Bandobras> I think I'm ready to some blind coding, but unfortunately I don't
   know C [19:05]
<Bandobras> hmm
<Bandobras> Is there any function that appends a list to another?
<Bandobras> ssianky was right all along [19:08]
*** ssvb (n=user@42-nat.cosmostv.by) has quit: "Leaving" [19:27]
<Bandobras> Ah, this is all so hard... [19:29]
<Bandobras> can there be 3 local entities at the same square?
<Bandobras> Soldier, head body, thrown knife?
<Bandobras> dead body, I mnea
<Bandobras> I mean
<Bandobras> I
<Bandobras>  Soldier, dead body, thrown knife? [19:30]
<Bandobras> When I throw a knife at a dead body do their floor inventories
   merge? [19:31]
<Bandobras> I see in CL_EntPerish that if a grenade explodes at my feet my
   entire floor inventory disappears. At least this is simple
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 08:23:15 pm
A distraction:

Code: [Select]
<SlaSheR84> can i get a md2 of a basic human male and female [19:35]
<SlaSheR84> going for the nano armor
<SlaSheR84> ive got a picture of a guyver in mind
<SlaSheR84> but without the fancy gadgets [19:36]
<SlaSheR84> or am i better to start from scratch [19:37]
<SlaSheR84> and just resize to suit...
<Bandobras> heavy nano armor? [19:39]
<Bandobras> this is what we need... [19:40]
<Bandobras> various models are in base/models/soldiers/
<Bandobras> good luck!
<Bandobras> so [19:45]
<Bandobras> I see CL_PlaceItem is called only when an item is added
<Bandobras> to an entity that is not an actor
<Bandobras> when does this happen? [19:46]
<Bandobras> or if an item is removed from such entity --- even harder to
   imagine
<Bandobras> is it only when a soldier picks something from the floor or drops
   it?
<Bandobras> or when I throw a dagger at a corpse the add to inventory message
   appears? [19:47]
<Bandobras> I see that  CL_InvDel happens e.g. when a soldier picks some from
   the floor [19:59]
<Bandobras> Then the item is deleted from the floor entity
<Bandobras> and CL_PlaceItem is called so that the floor visual appearance
   changes [20:01]
<Bandobras> e.g. the biggest remaining weapon becomes visible
<Bandobras> but why we do actor->i.c[csi.idFloor] = le->i.c[csi.idFloor];
<Bandobras> then is a mystery to me
<Bandobras> Oh, I see, to update the client side of the soldier inventory
[20:02]
<Bandobras> the server side is changed before we send the packet [20:03]
<Bandobras> and after we receive it on the client side we update our copy
<Bandobras> of the soldier's inventory
<Bandobras> ----------------------- [20:08]
<Bandobras> So, again when is Com_DestroyInventory called? [20:09]
<Bandobras> Or not, before that, what when the player moves?
<Bandobras> Is his floor container emptied then?
*** fatty (n=rotkaepp@W1339.w.pppool.de) has quit: "connection reset by beer"
[20:10]
<Bandobras> It should be
<Bandobras> I mean on the client side [20:11]
<Bandobras> Then the duplication of the floor --- one copy in the soldier
<Bandobras> one copy laying there
<Bandobras> would only happen when the soldiers is standing over the loot
<Bandobras> Perhaps in such cases deletion of both entities cannot happen
[20:12]
<Bandobras> But when he moves over...
<Bandobras> Why is q2 so hard?
<Bandobras> So, when the soldier is standing over the loot and the loot
   disappears [20:13]
<Bandobras> then CL_EntPerish sayz that the soldier floor container will not be
<Bandobras> emptied, so the looping list is not created [20:14]
<Bandobras> Or perhaps the problem is when the ammo runs out? [20:25]
<Bandobras> Then also Com_EmptyContainer is called...
*** SlaSheR84_ (n=SlaSheR8@144.134.85.154) has joined channel #ufo:ai
<Bandobras> but no, then the container is not floor [20:26]
<Bandobras> So it appears as far as the soldier is standing over his loot
<Bandobras> the doubling of the floor container is safe [20:27]
<Bandobras> So the problem must be that when he moves over
<Bandobras> he drags his floor container with him...
<Bandobras> But CL_ActorDoMove begins with [20:35]
<Bandobras> le->i.c[csi.idFloor] = NULL;
<Bandobras> hmmm
<Bandobras> but CL_ActorDie does not [20:38]
* Bandobras gloats
*** SlaSheR84 (n=SlaSheR8@144.134.85.166) has quit: Read error: 110
    (Connection timed out) [20:45]
<Bandobras> nope ;( [20:49]
<Bandobras> would you believe that Com_EmptyContainer is called [21:08]
<Bandobras> for the same pointer many time before the battlescape
<Bandobras> mission even begins?
<Bandobras> while equipping the squad, for instace [21:09]
<Bandobras> but this is all right, since invUnused is reused... [21:13]
*** SlaSheR84_ (n=SlaSheR8@144.134.85.154) has quit: Read error: 131
    (Connection reset by peer) [21:23]
*** TorF (n=torf@84.5.107.214) has joined channel #ufo:ai [21:24]
<Bandobras> OK, some more good tests on the forum [21:34]
<Bandobras> a really terrifying ufoconsole.log [21:36]
<Bandobras> "doubled entity" is the one from CL_PlaceItem [21:37]
<Bandobras> the crash happens when the last soldier dies
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 09:29:06 pm
OK, this one is really good:

Code: [Select]

==== InitGame ====
------- Server Initialization -------
CM_AddMapTile: token: +s01
CM_AddMapTile: token: +h01
CM_AddMapTile: token: +h03
CM_AddMapTile: token: +drop
CM_AddMapTile: token: +r01
CM_AddMapTile: token: +d05
CM_AddMapTile: token: +r03
CM_AddMapTile: token: +s04
CM_AddMapTile: token: +d02
CM_AddMapTile: token: +d05
CM_AddMapTile: token: +s04
CM_AddMapTile: token: +d03
CM_AddMapTile: token: +d02
CM_AddMapTile: token: +s11
CM_AddMapTile: token: +d01
CM_AddMapTile: token: +d03
CM_AddMapTile: token: +d06
CM_AddMapTile: token: +r03
CM_AddMapTile: token: +d07
CM_AddMapTile: token: +d04
Created AI player (team 0)
Could not find alien armor ''
Could not find alien armor ''
Could not find alien armor ''
Created AI player (team 7)
-------------------------------------
0.0.0.0:0: client_connect




+villaged
Map: +villaged
                                     
pics
                                     
civilians/male/body01
                                     
civilians/male/head01
                                     
civilians/female/body02
                                     
civilians/female/head02a
                                     
civilians/female/body01
                                     
civilians/female/head01a
                                     
civilians/female/head01b
                                     
aliens/ortnok/body01
                                     
aliens/ortnok/head02
                                     
aliens/ortnok/head01
                                     
aliens/blue/body01
                                     
aliens/blue/head01
                                     
images
                                     
Com_DestroyInventory: '0x195c493c'
You are already on team 1
unnamed has taken control over team 1.
Particle definiton "water_fountain" not found
Particle definiton "water_fountain" not found
Particle definiton "water_fountain" not found
Particle definiton "water_fountain" not found
(player 0) It's team 1's round
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: assault
doubled entity: '0x19a9a580'
G_ActorDie: kill actor on team 1
G_ActorDie: kill actor on team 1
Com_MoveInInventory: move twohanded item to container: 6
doubled entity: '(nil)'
doubled entity: '0x19a9a580'
Can't perform action - not enough TUs!
Can't perform action - not enough TUs!
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: assault
doubled entity: '0x19a9a568'
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: rpg
doubled entity: '0x19a9a550'
Com_DestroyInventory: '0x19b4a128'
Com_DestroyInventory: '0x19b4ae98'
Team 1 ended round, team 7's round started!
Com_DestroyInventory: '0x19b4a128'
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: sniper
Lisa Kennedy is in mad rage!
Yoshiko Suzuki is in mad rage!
Com_DestroyInventory: '0x19b4a128'
Com_DestroyInventory: '0x19b4ad40'
Com_DestroyInventory: '0x19b4a128'
Team 7 ended round, team 0's round started!
Com_DestroyInventory: '0x19b4aff0'
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a520'
Com_DestroyInventory: '0x19b4a280'
Com_EmptyContainer: '0x19a9a3a0'
Com_EmptyContainer: '0x19a9a580'
Com_DestroyInventory: '0x19b4a3d8'
Com_DestroyInventory: '0x19b4abe8'
Com_DestroyInventory: '0x19b4b148'
Com_EmptyContainer: '0x19a9a580'
Team 1 ended round, team 7's round started!
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: flamer
Yoshiko Suzuki panics!
doubled entity: '0x19a946a0'
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
Com_DestroyInventory: '0x19b4a530'
Com_EmptyContainer: '0x19a9a388'
Com_EmptyContainer: '0x19a9a568'
Com_DestroyInventory: '0x19b4a688'
Com_EmptyContainer: '0x19a9a370'
Com_EmptyContainer: '0x19a946a0'
Com_DestroyInventory: '0x19b4a7e0'
Com_EmptyContainer: '0x19a9a3e8'
Com_EmptyContainer: '0x19a9a550'
Com_DestroyInventory: '0x19b4a938'
Com_EmptyContainer: '0x19a9a3d0'
Com_EmptyContainer: '0x19a9a520'
Com_DestroyInventory: '0x19b4b2a0'
Com_EmptyContainer: '0x19a9a568'
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Com_DestroyInventory: '0x19b4b3f8'
Com_EmptyContainer: '0x19a9a550'
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Com_DestroyInventory: '0x19b4a128'
Com_EmptyContainer: '0x19a9a520'
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Com_DestroyInventory: '0x19b4a280'
Com_EmptyContainer: '0x19a946a0'
Error: There are more than the allowed entries in container 6 (cnt:1024, MAX_INVLIST:1024) (Com_EmptyContainer)
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Yoshiko Suzuki panics!
Team 0 ended round, team 1's round started!
Com_DestroyInventory: '0x19b4a128'
Team 1 ended round, team 7's round started!
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: pistol
G_InventoryToFloor: item to floor: pistol
MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1350086535 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)********************
ERROR: CL_ParseServerMessage: Illegible server message 0

********************
==== ShutdownGame ====
SDL audio device shut down.
Title: Bug squashing party
Post by: Bandobras on July 17, 2006, 10:36:28 pm
The party may turn out to be a success!

Code: [Select]
<Bandobras> Or is Com_EmptyContainer called also when items on the floor become
[21:44]
<Bandobras> invisible on the client side?
<Bandobras> is EV_ENT_PERISH called then? [21:46]
<Bandobras> I know! I have to add the clause to CL_EntPerish too! [22:02]
<Bandobras> le->i.c[csi.idFloor] = NULL;
<Bandobras> this I added to CL_ActorDie, but it's not enough [22:03]
<Bandobras> with CL_EntPerish could be enough!
* Bandobras looks upward
<Bandobras> Well, it is possible I've got it. No "Error: There are more than
   the allowed" messages, though the game skill crashes on mission
   loss. Some more tests... [22:23]


This time I ended the mission by "Abort mission" from the menu. No crash, but still bugs. However our bug seems to be squashed.

Code: [Select]

==== InitGame ====
------- Server Initialization -------
CM_AddMapTile: token: +s01
CM_AddMapTile: token: +h01
CM_AddMapTile: token: +h03
CM_AddMapTile: token: +drop
CM_AddMapTile: token: +r03
CM_AddMapTile: token: +d05
CM_AddMapTile: token: +s05
CM_AddMapTile: token: +d02
CM_AddMapTile: token: +d03
CM_AddMapTile: token: +s04
CM_AddMapTile: token: +d03
CM_AddMapTile: token: +s13
CM_AddMapTile: token: +s09
CM_AddMapTile: token: +s08
CM_AddMapTile: token: +s13
CM_AddMapTile: token: +s02
CM_AddMapTile: token: +d05
CM_AddMapTile: token: +s07
CM_AddMapTile: token: +d07
CM_AddMapTile: token: +d06
CM_AddMapTile: token: +d02
CM_AddMapTile: token: +d04
CM_AddMapTile: token: +d01
Created AI player (team 0)
Could not find alien armor ''
Could not find alien armor ''
Could not find alien armor ''
Created AI player (team 7)
-------------------------------------
0.0.0.0:0: client_connect




+villaged
Map: +villaged
                                     
pics
                                     
civilians/male/body01
                                     
civilians/male/head01
                                     
civilians/female/body02
                                     
civilians/female/head01b
                                     
aliens/blue/body01
                                     
aliens/blue/head01
                                     
images
                                     
Com_DestroyInventory: '0x195c497c'
You are already on team 1
unnamed has taken control over team 1.
Particle definiton "water_fountain" not found
Particle definiton "water_fountain" not found
(player 0) It's team 1's round
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: rpg
doubled entity: '0x19a9a278'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4b438'
Com_DestroyInventory: '0x19b4b188'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Com_DestroyInventory: '0x19b4a418'
Jenniver Little is currently shaken.
Evonne Beauvais panics!
Yao Etaoku is in mad rage!
Can't perform action - no ammo!
Com_DestroyInventory: '0x19b4a570'
Team 0 ended round, team 1's round started!
G_ActorDie: kill actor on team 1
Com_DestroyInventory: '0x19b4a418'
Com_DestroyInventory: '0x19b4b188'
Team 1 ended round, team 7's round started!
Jenniver Little is currently shaken.
Yao Etaoku panics!
Com_DestroyInventory: '0x19b4a418'
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
Can't perform action - not enough TUs!
Com_DestroyInventory: '0x19b4ac28'
Team 1 ended round, team 7's round started!
G_ActorDie: kill actor on team 0
Com_DestroyInventory: '0x19b4ac28'
Yao Etaoku panics!
Com_DestroyInventory: '0x19b4ac28'
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
Team 1 ended round, team 7's round started!
Com_DestroyInventory: '0x19b4ac28'
Com_DestroyInventory: '0x19b4ac28'
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
Com_DestroyInventory: '0x19b4a418'
Team 1 ended round, team 7's round started!
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: flamer
G_InventoryToFloor: item to floor: sniper_ammo
G_InventoryToFloor: item to floor: sniper_ammo
G_InventoryToFloor: item to floor: rpg_ammo
G_InventoryToFloor: item to floor: assault_ammo
G_InventoryToFloor: item to floor: flamer_ammo
Com_DestroyInventory: '0x19b4a978'
Com_EmptyContainer: '0x19a9a698'
Com_EmptyContainer: '0x19a9a488'
Com_EmptyContainer: '0x19a9a398'
Com_EmptyContainer: '0x19a9a380'
Team 7 ended round, team 0's round started!
Com_DestroyInventory: '0x19b4a2c0'
Team 0 ended round, team 1's round started!
Com_DestroyInventory: '0x19b4a168'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4a570'
Com_DestroyInventory: '0x19b4a418'
Team 1 ended round, team 7's round started!
G_ActorDie: kill actor on team 0
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: smg
G_InventoryToFloor: item to floor: pistol
doubled entity: '0x19a9a398'
doubled entity: '0x19a9a248'
Com_DestroyInventory: '0x19b4ac28'
Com_DestroyInventory: '0x19b4a168'
Com_DestroyInventory: '0x19b4aad0'
Com_EmptyContainer: '0x19a9a368'
Com_DestroyInventory: '0x19b4b188'
Com_DestroyInventory: '0x19b4b6e8'
Com_DestroyInventory: '0x19b4b590'
Com_DestroyInventory: '0x19b4b2e0'
Com_EmptyContainer: '0x19a9a278'
Team 1 ended round, team 7's round started!
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: assault
Com_DestroyInventory: '0x19b4a6c8'
Com_EmptyContainer: '0x19a9a3e0'
Jenniver Little panics!
Team 7 ended round, team 0's round started!
Com_DestroyInventory: '0x19b4b438'
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a3e0'
Com_DestroyInventory: '0x19b4a418'
Com_DestroyInventory: '0x19b4a6c8'
Com_DestroyInventory: '0x19b4aad0'
Com_DestroyInventory: '0x19b4b030'
Com_EmptyContainer: '0x19a9a2a8'
Com_EmptyContainer: '0x19a9a290'
Com_DestroyInventory: '0x19b4a978'
Com_EmptyContainer: '0x19a9a248'
Com_DestroyInventory: '0x19b4a2c0'
Com_EmptyContainer: '0x19a9a398'
Com_DestroyInventory: '0x19b4ac28'
Com_EmptyContainer: '0x19a9a3e0'
Team 1 ended round, team 7's round started!
G_ActorDie: kill actor on team 0
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: sniper
Com_DestroyInventory: '0x19b4ad80'
Com_EmptyContainer: '0x19a9a350'
Com_DestroyInventory: '0x19b4b188'
Team 7 ended round, team 0's round started!
Com_DestroyInventory: '0x19b4a168'
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a350'
doubled entity: '0x19a9a248'
Com_DestroyInventory: '0x19b4a978'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4a168'
Com_DestroyInventory: '0x19b4a418'
Com_EmptyContainer: '0x19a9a350'
Com_DestroyInventory: '0x19b4aad0'
Com_EmptyContainer: '0x19a9a380'
Team 1 ended round, team 7's round started!
Com_DestroyInventory: '0x19b4a168'
Com_DestroyInventory: '0x19b4a168'
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a3e0'
doubled entity: '0x19a9a380'
doubled entity: '0x19a9a290'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4a418'
Com_EmptyContainer: '0x19a9a3e0'
Team 1 ended round, team 7's round started!
Com_DestroyInventory: '0x19b4a2c0'
Team 7 ended round, team 0's round started!
Com_DestroyInventory: '0x19b4a6c8'
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a3e0'
Com_DestroyInventory: '0x19b4b188'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4a168'
Com_DestroyInventory: '0x19b4a570'
Com_DestroyInventory: '0x19b4b030'
Com_EmptyContainer: '0x19a9a248'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
G_ActorDie: kill actor on team 7
G_InventoryToFloor: item to floor: plaspistol
G_InventoryToFloor: item to floor: plaspistol_ammo
Com_DestroyInventory: '0x19b4b590'
Com_DestroyInventory: '0x19b4a168'
Com_DestroyInventory: '0x19b4a418'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4ad80'
Com_DestroyInventory: '0x19b4a6c8'
Com_EmptyContainer: '0x19a9a3e0'
Com_DestroyInventory: '0x19b4ac28'
Com_EmptyContainer: '0x19a9a398'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a398'
Can't perform action - not enough TUs!
Com_DestroyInventory: '0x19b4a168'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4a978'
Com_DestroyInventory: '0x19b4b2e0'
Com_DestroyInventory: '0x19b4aad0'
Com_EmptyContainer: '0x19a9a380'
Com_DestroyInventory: '0x19b4b438'
Com_EmptyContainer: '0x19a9a290'
Com_DestroyInventory: '0x19b4a418'
Com_EmptyContainer: '0x19a9a398'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a350'
doubled entity: '0x19a9a290'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4a570'
Com_DestroyInventory: '0x19b4a418'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
This isn't your round.
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a248'
Com_DestroyInventory: '0x19b4a418'
Com_DestroyInventory: '0x19b4aad0'
Com_DestroyInventory: '0x19b4ad80'
Com_DestroyInventory: '0x19b4ac28'
Com_EmptyContainer: '0x19a9a350'
Com_DestroyInventory: '0x19b4a570'
Com_EmptyContainer: '0x19a9a248'
Com_DestroyInventory: '0x19b4a2c0'
Com_EmptyContainer: '0x19a9a3e0'
Com_DestroyInventory: '0x19b4b030'
Com_EmptyContainer: '0x19a9a290'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a338'
doubled entity: '0x19a9a320'
Com_EmptyContainer: '0xb2387518'
doubled entity: '0x19a9a290'
Com_DestroyInventory: '0x19b4a418'
Com_DestroyInventory: '0x19b4a168'
Com_DestroyInventory: '0x19b4a2c0'
Com_EmptyContainer: '0x19a9a320'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
G_ActorDie: kill actor on team 1
G_InventoryToFloor: item to floor: fraggrenade
G_InventoryToFloor: item to floor: fraggrenade
Com_FindSpace could not find space for itemtype: armor at container 6
Com_DestroyInventory: '0xadc88300'
Com_EmptyContainer: '0xb23874d0'
G_InventoryToFloor: Error: could not drop item to floor: light
G_InventoryToFloor: Destroy remaining inventory
Jenniver Little is in mad rage!
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a320'
doubled entity: '0x19a9a380'
Can't perform action - not enough TUs!
Can't perform action - not enough TUs!
Com_DestroyInventory: '0x19b4a6c8'
Com_DestroyInventory: '0x19b4a570'
Com_DestroyInventory: '0x19b4aed8'
Com_EmptyContainer: '0x19a9a2f0'
Com_EmptyContainer: '0x19a9a308'
Com_EmptyContainer: '0x19a9a2c0'
Com_DestroyInventory: '0x19b4aad0'
Com_EmptyContainer: '0x19a9a290'
Com_DestroyInventory: '0x19b4a978'
Com_EmptyContainer: '0x19a9a398'
Com_DestroyInventory: '0x19b4a168'
Com_EmptyContainer: '0x19a9a320'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Jenniver Little panics!
Team 0 ended round, team 1's round started!
doubled entity: '0x19a9a338'
Com_DestroyInventory: '0x19b4a2c0'
Com_DestroyInventory: '0x19b4a418'
Com_EmptyContainer: '0x19a9a380'
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Team 0 ended round, team 1's round started!
Team 1 ended round, team 7's round started!
Team 7 ended round, team 0's round started!
Com_DestroyInventory: '0x19b4a2c0'
Team 0 ended round, team 1's round started!
MSG_WriteByte: range error -1305128839 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1305128839 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)MSG_WriteByte: range error -1305128839 ('game/g_client.c', line 111)MSG_WriteByte: range error 75260822 ('game/g_client.c', line 112)doubled entity: '0x19a9a290'
doubled entity: '0x19a9a4a0'
doubled entity: '0x19a9a698'
doubled entity: '0x19a9a260'
doubled entity: '0x19a9a350'
doubled entity: '0x19a9a278'
doubled entity: '0x19a9a230'
==== ShutdownGame ====
Title: Bug squashing party
Post by: Bandobras on July 18, 2006, 12:18:07 am
A happy epilogue:

Code: [Select]

<Bandobras> hehe blind coding pays off [22:50]
* Bandobras happy
<Bandobras> why [22:56]
<Bandobras> (baseCurrent->teamInv[i])->i.c[csi.idFloor] =
   NULL;
<Bandobras> does not work?
<TorF> CL_PlaceItem is used to drop an item from a player to the floor ?
<Bandobras> (in cl_campaign.c) [22:57]
<Bandobras> yes and no
<Bandobras> both for taking from the floor
<Bandobras> and for dropping
<TorF> ok
<TorF> is here an "easy" way to reproduce the bug ? [22:58]
<TorF> is there an "easy" way to reproduce the bug ?
<Bandobras> yes and no
<Bandobras> just play a long mission
<Bandobras> and let most of your soldiers die
<Bandobras> and each of the should have at least one weapon
<Bandobras> almost guarantee of "Error: There are more than..." [22:59]
<Bandobras> but the bug seems already squashed
* Bandobras jumps around
<Bandobras> I can make a patch with the fix and with debug statements
<Bandobras> the fix may break other things, though
<Bandobras> and we have to follow Com_DestroyInventory and fix it in other
[23:00]
<Bandobras> places too
<TorF> huhu i hope not :)
<Bandobras> we'll see
<Bandobras> so, upload the patch so you can test?
<Bandobras> just several lines [23:01]
<TorF> i'm not sure i will reproduce the bug
<Bandobras> why
<TorF> especially if the bug is corrected =)
<Bandobras> but similar bugs (I think) are not
<Bandobras> e.g. I think the crash at mission lost [23:02]
<Bandobras> is a similar bug
<Bandobras> perhaps others
<TorF> it's hard to solve problems with so few comments in code and lot of
       global var
<Bandobras> the separation between client and server is a nightmare...
<Bandobras> blind coding on my part...
<Bandobras> and the party really helped (no to mention ssianky) [23:03]
<Bandobras> basically I silenced a warning
<Bandobras> but things may be still broken
* Bandobras shakes [23:04]
<TorF> i hope you have crushed the bug :)
<Bandobras> :)
<TorF> without creating more little vicious bugs :)
<Bandobras> ;)
<Bandobras> why is (baseCurrent->teamInv[i])->i.c[csi.idFloor] = NULL; wrong?
[23:05]
<Bandobras> client/cl_campaign.c:2515: error: invalid type argument of '->'
<TorF> i take a look
<Bandobras>  (in cl_campaign.c) [22:57]
<Bandobras> line 2515
<TorF> because teamInv is declared like this in base_t [23:07]
<TorF> inventory_t teamInv[MAX_WHOLETEAM];
<TorF> replace -> with a . [23:08]
<Bandobras> k
<Bandobras> client/cl_campaign.c:2515: error: 'struct inventory_s' has no
   member named 'i'
<Bandobras> oops
<Bandobras> the problem is I don't know C
* Bandobras embarassed
<TorF> ourg :)
<TorF> it could be a really nightmare for bugs :)
<TorF> look at struc inventory_s declaration : [23:10]
<TorF> typedef struct inventory_s {
<TorF> invList_t *c[MAX_CONTAINERS];
<TorF> } inventory_t;
<TorF> there is only a table of pointers
<Bandobras> so?
<Bandobras> I want to get one such c [23:11]
<TorF> this line could be correct :
<TorF> (baseCurrent->teamInv[i]).c[csi.idFloor] = NULL;
<Bandobras> hmmm
<Bandobras> yes! [23:12]
<Bandobras> compiles!
<Bandobras> What I do now is I grep for all uses of Com_DestroyInventory
<Bandobras> and insert lines like this before them
<Bandobras> client-side uses of Com_DestroyInventory [23:13]
<Bandobras> on the server side things may be even more broken
<Bandobras> but I have no clue
<Bandobras> so
<Bandobras> the reason Com_DestroyInventory is bad
<TorF> it compiles but i'm affraid, have you take a look about invList_t ?
<Bandobras> is that the floor container is shared beteen
<Bandobras> why?
<TorF> set a NULL there can be desastrous if you don't know what you do
<Bandobras> real men don't know what to do, but till code [23:14]
ERC> /poofs
*** poofs: Unknown command
* Bandobras poofs
<Bandobras> but still code
<Bandobras> I mean, I hope invList_t is the same or similar
<Bandobras> to inventory_t, for which this works [23:15]
<TorF> you want to make the container empty ?
<Bandobras> and Com_DestroyInventory has inventory_t argument
<Bandobras> and is applied to invList_t
<Bandobras> so perhaps they are identical?
<Bandobras> or differ only in pointers?
<Bandobras> so the line I add run well with inventory_t [23:16]
<Bandobras> the reason Com_DestroyInventory is bad
<TorF> my idea is : if you want to empty a container, destroy all the items it
       contains first
<Bandobras> is that the floor container is shared between
<Bandobras> soldier and the local entity of floor items
<TorF> ho
<Bandobras> because soldier has floor inventory panel (on client side) [23:17]
<Bandobras> so that he can pick things up
<TorF> ok
<Bandobras> so the floor items would be destroyed twice
<Bandobras> which causes a loop in the free container nodes list [23:18]
<Bandobras> as it was shown earlier today
<TorF> i suppose that the client should be informed that the local container
       is a special container
<Bandobras> the floor container?
<TorF> yes
<Bandobras> I think it can be possible to put a flag
<Bandobras> in containers and set it any time [23:19]
<Bandobras> when the container is shared with the player
<Bandobras> and the ignore it in Com_DestroyInventory
<Bandobras> but it's basically the same work
<Bandobras> you have to take care to flip the flag
<Bandobras> anytime anything happens
<Bandobras> With my approach you have to take care [23:20]
<TorF> yes, to prevent the client to make some bad actions
<Bandobras> to set the floor container to null only when destroying the soldier
<Bandobras> (and when he moves from square to square)
<Bandobras> (which was already done --- the only place done right)
<TorF> the flag could be usefull when soldiers will be allowed to exchange
       some items later [23:21]
<Bandobras>  to set the soldier copy of the floor container to null
<Bandobras> did I say I don't know C
<Bandobras> OK
<Bandobras> I'm not a coder, I'm a fixer
<Bandobras> bugs are my enemies
<Bandobras> that's personal, not intelecual
<Bandobras> but if they exchange things that are on the floor [23:22]
<Bandobras> there is no problem
<Bandobras> the problem is if they exchanged the whole
<Bandobras> floor container local entity
<Bandobras> frankly whole this code is a mess [23:23]
<Bandobras> I hope screemingwithnosound will restructure it properly...
<Bandobras> I guess q2 is a mess
<Bandobras> just that
<TorF> i don't think so
<TorF> problems here are just problems with RULES of our game [23:24]
<Bandobras> hmmm
<TorF> nothing to do with q2
<TorF> restructure such code is really hard work [23:25]
<TorF> bigs risks to create more bugs
<TorF> but if it could be C++, that would be GREAT [23:26]
*** higen (n=ehasting@240.84-48-99.nextgentel.com) has joined channel #UFO:Ai
[23:27]
<Bandobras> sorry, I have C++ [23:28]
<Bandobras> I mean I hate C++
<Bandobras> (don't know it either)
<TorF> ho why ?
<Bandobras> so you mean the fact that floor and inventory portion representing
   floor [23:29]
<Bandobras> are shared is a game-rule?
<Bandobras> (personal)
<Bandobras> the game rule is that an item can be picked up and dropped
<Bandobras> and that things do not dissapear
<Bandobras> from floor
<Bandobras> the rest is GUI [23:30]
<Bandobras> or just implementation of this GUI
<TorF> yes implementation of rules
<Bandobras> frankly, in a functional programming language you'd have
<Bandobras> no problem whatsoever with shared containers
<Bandobras> garbage collection would take care of that [23:31]
<Bandobras> but perhaps the rules, the GUI can be implemented better in C
<Bandobras> how?
<TorF> hum ? [23:32]
<Bandobras> what hum? [23:33]
<TorF> dunno what you mean
<Bandobras> which lines?
<Bandobras> sorry, where I lost you?
<TorF> last lines [23:34]
<TorF> from functionnal programming...
<Bandobras> so, that's a family of languages
<Bandobras> they have garbage collectors, like java, but better
<Bandobras> you don't have to destroy things manually [23:35]
<Bandobras> so no problem with sharing e.g. the floor container
<Bandobras> between soldier and floor local entity
<Bandobras> got it?
<TorF> ho
<Bandobras> was it yet?
<Bandobras> was it "yes"?
<Bandobras> :)
<TorF> java is not a functionnal programming [23:36]
<Bandobras> indeed
<Bandobras> but they swiped the some ideas
<TorF> and C++ have not garbage collector
<Bandobras> yes
<Bandobras> so?
<Bandobras> oh, yes, I hate C++ not only because of that [23:37]
<Bandobras> I even like C
<Bandobras> like a nice antic
<Bandobras> an old car
<TorF> and garbage collector has nothing to do with sharing e.g. floor
       container
<Bandobras> oh yes, it has
<Bandobras> with garbage collector we could remove all the code [23:38]
<Bandobras> that takes care of physically destroying containers
<Bandobras> or reusing them, as in this case
<Bandobras> and this is where the bug was hiding
<Bandobras> while destroying (and reusing list cells) [23:39]
<Bandobras> some pointers were lost, the reuse was repeated for them
<Bandobras> and list became cyclic
<Bandobras> then subsequent reuses looped [23:40]
<TorF> if the solution is to don't know where items are, i don't think it's a
       good one
<Bandobras> with garbage collector you just make a copy of the floor container
<Bandobras> and when the soldier moves or dies just forget his copy [23:41]
<Bandobras> and the items on the forgotten copy can be wherever
<Bandobras> this does not matter
<Bandobras> (you also copied the items)
<TorF> we'll never know :)
<Bandobras> ;>
<Bandobras> so that was my option (not realizable) [23:42]
<Bandobras> what is your option for implementing this?
<Bandobras> I heard flags?
<Bandobras> flags on all containers, set when they are copied?
<Bandobras> that is shared?
<Bandobras> (not copied but shared, indeed) [23:43]
<Bandobras> (we only copy the one pointer pointing at them)
<TorF> just a second
<TorF> i don't have read the corresponding code, so i can't give a precise idea
[23:44]
<TorF> you told me that the soldiers manage floor item like all its items ?
[23:45]
<Bandobras> yes
<Bandobras> you know the game inventory screen, yes? [23:46]
<Bandobras> so the floor is the same as, say backpack
<Bandobras> this is nice...
<TorF> yes [23:47]
<TorF> and client could sometime destroy item of floor ?
<TorF> can you give me the line of code where the floor is assigned to soldier
       pliz [23:48]
<Bandobras> (we are talking about client side, yes?)
<TorF> yes [23:49]
<TorF> hum ok
<TorF> there is a call to CL_InvAdd no ?
<Bandobras> momment
<TorF> to add all the floor items to soldier ?
<Bandobras> CL_PlaceItem [23:50]
<Bandobras> that's the function
<Bandobras> the line
<Bandobras> actor->i.c[csi.idFloor] = le->i.c[csi.idFloor];
<Bandobras> no floor container is created
<TorF> yes it is called from CL_InvAdd or CL_InvDel
<Bandobras> but an existing is used
<Bandobras> yes
<TorF> so it is placed in its backpack ? [23:51]
<Bandobras> no
<Bandobras> each local entity (le) has an inventory
<Bandobras> in paricular, a rifle lying on the floor
<Bandobras> has an inventory with backpack slot, left hand slot and floor slot
<Bandobras> but only the floor slot (the container) is nonempty
<Bandobras> for a soldier, just the opposite [23:52]
<TorF> ho right i got i
<TorF> it
<TorF> in csi_t
<Bandobras> only the floor is empty, unless he stands over something
<Bandobras> so when he stands on something
<Bandobras> his floor container is shared with the floor container of the rifle
<Bandobras> ^^the line I cited [23:53]
<Bandobras> containers are just linked lists of items
<Bandobras> so now both the soldier and the rifle have the first cell of the
   list [23:54]
<TorF> hum and what is the "le" param ?
<Bandobras> the local entity
<Bandobras> the rifle [23:55]
<TorF> this function is called when the soldier get (or put) an item from the
       floor ?
<Bandobras> (as everybody knows, a rifle consists of an inventory, flags,
   coordinates...)
<Bandobras> yes
<Bandobras> perhaps also on other occasions
<Bandobras> perhaps just when he stands, or dies
<Bandobras> or appears (on client side things appear and disappear( [23:56]
<Bandobras> (especially dead soldiers)
<Bandobras> (but maybe even alive --- each turn disappear and reappear anew)
[23:57]
<Bandobras> ( I don't know)
<TorF> i really don't understand how this works [23:58]
<Bandobras> ;) [23:59]
<Bandobras> perhaps, I may be mistaken, on the end of each turn
<TorF> and i don't understand why actor get the le floor [00:00]
<Bandobras> soldiers disappear (CL_Perish)
<TorF> i don't understand what the actor floor become
<Bandobras> and then server sends them anew
<Bandobras> oh, that
<Bandobras> actor is soldier
<Bandobras> his floor was empty
<Bandobras> (soldiers don't carry anythind in their floors, they use
   backpacks, hands) [00:01]
<TorF> are you sure floor was empty ?
<Bandobras> no
<Bandobras> :)
<Bandobras> I hope so
<Bandobras> and I hope there is only one le on the floor, except the soldier
<Bandobras> if not...
<Bandobras> this can be tested
<TorF> the CL_PlaceItem function is called at the begining of each round ? how
       many time ?
<Bandobras> I don't know [00:02]
<Bandobras> perhaps some of the client things are persistent
<Bandobras> (for low net traffic)
<Bandobras> and perhaps all is sucked from the server
<Bandobras> each turn anew, I don't know
<Bandobras> it appears CL_PlaceItem is called many times
<Bandobras> but perhaps these are other function that call Com_DestroyInventory
[00:03]
<Bandobras> (sorry mixed it up, CL_PlaceItem does not call
   Com_DestroyInventory)
<Bandobras> (but if things are destroyed, they have to placed)
<Bandobras> ( with CL_PlaceItem or with CL_Appear) [00:04]
<Bandobras> but CL_PlaceItem is called many times without picking
<Bandobras> things up or dropping
<Bandobras> debug says it [00:05]
<Bandobras> see the log on the forum
<Bandobras> "doubled entity:" is CL_PlaceItem
<Bandobras> and I did not pick things up (perhaps one time, or two) [00:06]
<Bandobras> how's the party?
<Bandobras> we're having bug-squashing party from noon to midnight today
[00:07]
<Bandobras> Woo-hoo
* Bandobras booms
<TorF> yep
<TorF> too hard for me, i need comments in code :) [00:08]
<Bandobras> thanks for your help with (base->teamInv[i]).c[csi.idFloor] = NULL;
[00:09]
<Bandobras> I actually like blind coding
<Bandobras> I don't get attached to the code
<Bandobras> don't feel offended with the quality
<Bandobras> etc.
<TorF> good luck [00:11]
<Bandobras> :) [00:12]
*** fatty (n=rotkaepp@W2390.w.pppool.de) has joined channel #ufo:ai [00:15]
<TorF> hum i got an idea [00:16]
<Bandobras> ?
<TorF> later an actor should not destroy its floor inventory
<Bandobras> so will he drag it with him? [00:17]
<TorF> here void CL_EntPerish( sizebuf_t *sb )
<Bandobras> when he moves, e.g
<Bandobras> ?
<TorF> when le is an actorf
<TorF> actor :) [00:18]
<TorF> just before the Com_DestroyInventory
<TorF> maybe set a NULL to the floor inventory
<Bandobras> if (le->type == ET_ACTOR)
<Bandobras>        le->i.c[csi.idFloor] = NULL;
<Bandobras> I did it:)
<TorF> ho :)
<Bandobras> that's when the warnings about looping lists stopped
<Bandobras> !
* Bandobras dances
<TorF> it doesn't work ?
<Bandobras> works OK
<Bandobras> :) [00:19]
<Bandobras> probably
<Bandobras> apparently
<Bandobras> so, you won
<Bandobras> ex equo
<Bandobras> :)
<Bandobras> that's the line that squashed today's featuring bug
<Bandobras> but there are other places [00:20]
<Bandobras> where Com_DestroyInventory runs
<Bandobras> and perhaps...
<Bandobras> so I try to patch them all and see...
<Bandobras> (because not all buts died)
<Bandobras> (because not all bugs died) :>
<Bandobras> only the one with looping list and a warning [00:21]
<Bandobras> in CL_PlaceItem
<Bandobras> "Error: There are more than..."
* Bandobras claps his hands [00:22]
<Bandobras> hehe double victory
<Bandobras> the bug is doubly squashed
<Bandobras> with two mighty boots
* Bandobras  code-dives again
Title: Bug squashing party
Post by: Bandobras on July 18, 2006, 01:34:44 am
The end. THE BUG is dead, the patch is submitted:

Code: [Select]
A patch that squashes the 1523411 bug. An example of blind coding, but testing shows that probably no new bugs are introduced. Unfortunately grave inventory bugs remain and extrapolation of this simple hack have not succeded in fixing them. Still, may be worth a read (short) even toghether with the IRC logs on the forum:
http://ufo.myexp.de/phpBB2/viewtopic.php?t=237

In the patch there are also some debugging statements an a side-fix or two.

Thanks for the wonderful bug-squashing party. The most important fix is actually independently devised by TorF. Ssianky found the bug. All participants helped in a that way or another.
Title: Bug squashing party
Post by: BTAxis on July 18, 2006, 11:25:50 am
It sure was a one-man party.
Title: Bug squashing party
Post by: Bandobras on July 18, 2006, 11:31:18 am
Nerd-style. :D

And only males, probably. :?

A classic nerd-party.