UFO:Alien Invasion

Archive => Bugs prior to release 2.3 => Topic started by: Rockwolf on January 27, 2010, 04:21:18 pm

Title: R28281 No free Inventory crash to console
Post by: Rockwolf on January 27, 2010, 04:21:18 pm
Connecting to localhost...
connection attempt from loopback connection
load material file: 'materials/ufocrash.mat'
Starting the game...
Rockwolf has joined team 1
music change to PsymongN2 (from ufo2)
music change to PsymongN5 (from PsymongN2)
(player 0) It's team 1's round
Rockwolf has taken control over team 1.

INVSH_AddInvList: No free inventory space!


This is the last bit from when my dropship went from one successful crash site directly to the next one, both were very close to base.
Title: Re: R28281 No free Inventory crash to console
Post by: Mattn on January 27, 2010, 07:23:26 pm
please provide a savegame - which mission was that? the first after starting/loading a game? the second? the 10000th?
Title: Re: R28281 No free Inventory crash to console
Post by: Rockwolf on February 01, 2010, 10:36:53 am
I have been unable to duplicate the bug.  Sorry.
Title: Re: R28281 No free Inventory crash to console
Post by: nanomage on February 14, 2010, 09:40:15 pm
I have observed this bug several times, too.
it really can't be duplicated reliably (at least i can't), but it happens often enough to be annoing.

The error happens usually at the start of tactical missions, sometimes during tactical missions when an alien gets killed.
 please tell if there is some means to debug it more thoroughfully to help locate and duplicate the bug.
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on February 14, 2010, 10:14:33 pm
I get this error too - but I thought it was something to do with storage at the bases:

http://ufoai.ninex.info/forum/index.php?topic=4437.0

I have since done a clean re-install, but the problem still exists - I have tested with a little success, by using the mission "Retry" facility. It's not consistant, but it occasionally happens after 4 or 5 reloads..

Still testing.
Title: Re: R28281 No free Inventory crash to console
Post by: Mattn on February 15, 2010, 07:25:57 am
thanks for testing - if you would find a reliable way to reproduce it, that would really help to fix it. are soldiers dying (dropping equipment to floor) - are you picking up things? reloading weapons and so on. everything might have an impact on the inv list.
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on February 15, 2010, 01:27:06 pm
thanks for testing - if you would find a reliable way to reproduce it, that would really help to fix it. are soldiers dying (dropping equipment to floor) - are you picking up things? reloading weapons and so on. everything might have an impact on the inv list.

No worries :)

There doesn't seem to be anything standard about this problem. It's quite difficult to find a possible common cause because it seems to be happening at so many different stages of a mission. Sometimes at the end of a mission, maybe in the middle of it, or like these 2 latest occurrences - right at the beginning.

This is after the clean reinstall btw:

http://i47.tinypic.com/e9f7s7.jpg
This one is right at the very start during initialisation of the map. There was an error that said "Unable to set Reaction Fire" (or similar) then the game locked out.

http://i46.tinypic.com/289iqz8.jpg
This one is after taking the very first shot with a GL and killing an Alien.

I'll continue and see if anything comes to light. ??? :-\
Title: Re: R28281 No free Inventory crash to console
Post by: jfrv24 on February 19, 2010, 07:00:10 pm
I'm also getting this bug and I can't find a way to repeat it, but my terminal does give a backtrace.

Code: [Select]
==== InitGame ====
SV_AssembleMap: Sequential map assembly in 4 ms
CM_LoadMap: "-tropic/tr_ +h01 +h02 +h03 +h04 +craft_drop_firebird +craft_crash_fighter +h01 +f06 +h04 +f06 +f06 +f02 +f02 +f02 +f07 +f07" "-16 8 0 8
-16 0 0 8 0 -16 -24 0 -24 16 0 -24 -16 0 0 0 0 0 24 0 16 0 0 -8 -24 0 8 -24 0 -24 8 0 16 8 0 16 16 0 16 24 0 -24 -24 0"
Rerouted for RMA in   0.0s
checksum for the map '+tropic': 587300778
ufo script checksum 1966557946
Created AI player (team 0)
Created AI player (team 7)
-------------------------------------
Connecting to localhost...
connection attempt from loopback connection
load material file: 'materials/tropic.mat'
Starting the game...
jfrv24 has joined team 1
music change to turinItalyM (from karlmacklin_geoscape)
music change to PsymongR3 (from turinItalyM)
(player 0) It's team 1's round
jfrv24 has taken control over team 1.
0   ufo                                 0x000000010015b285 Sys_Backtrace + 28
1   ufo                                 0x000000010015a305 Sys_Error + 168
2   ufo                                 0x0000000100126583 I_AddInvList + 51
3   ufo                                 0x00000001001267a3 I_AddToInventory + 497
4   ufo                                 0x000000010003a3ac CL_InvAdd + 341
5   ufo                                 0x000000010003731d CL_ExecuteBattlescapeEvent + 175
6   ufo                                 0x00000001000f478c Qcommon_Frame + 118
7   ufo                                 0x000000010015b687 main + 256
8   ufo                                 0x0000000100001534 start + 52
Error: INVSH_AddInvList: No free inventory space!
Galactic-2:trunk jfrv24$

As you can see, this one happened just as the map was created, I had no time to perform any action before it crashed.  Other times this error occurs just when you kill an enemy or at the end of a mission.

UFOAI rev 28632, downloaded from svn and compiled and run from terminal on Mac OS 10.6.2.
Title: Re: R28281 No free Inventory crash to console
Post by: nanomage on February 21, 2010, 07:09:36 pm
observed this too lately , with terminal log:

 connection attempt from loopback connection
load material file: 'materials/scout_crash.mat'
Starting the game...
linad has joined team 1
music change to PsymongN2 (from karlmacklin_geoscape)
music change to PsymongO5 (from PsymongN2)
(player 0) It's team 1's round
linad has taken control over team 1.
./ufo(Sys_Backtrace+0x1f)[0x819c8fa]
./ufo(Sys_Error+0x22)[0x819badd]
./ufo[0x8170470]
./ufo[0x8170643]
./ufo(CL_InvAdd+0x135)[0x809e965]
./ufo[0x809b3b5]
./ufo(Qcommon_Frame+0x7b)[0x8146f6f]
./ufo(main+0x5c)[0x819b6eb]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x42bb56]
./ufo[0x806be31]
Error: INVSH_AddInvList: No free inventory space!
2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC 2009 i686 GNU/Linux
don't remeber exact revision sadly, bacuse i have already updated since then,
the one with bug was upated roughly 12utc 21feb.

could not reproduce after reload
Title: Re: R28281 No free Inventory crash to console
Post by: tearfang on March 07, 2010, 07:59:37 am
I am also seeing this error. I'm running the feb 4th 2010 win 32 debug installable. Sorry I don't know where to get the revision number. Most common occurrence is at the start of a mission especially terror missions (possibly because they are bigger?) but I've also seen it when picking a weapon up from the ground that I had dropped. If you need more info just let me know where to get it. I can provide saves the *sometimes* generate the error as well.

==== InitGame ====
SV_AssembleMap: Sequential map assembly in 33 ms
CM_LoadMap: "-tropic/tr_ +h01 +h02 +h03 +h04 +craft_drop_firebird +craft_crash_fighter +h03 +h01 +h04 +f02 +f05 +f06 +f02 +f07 +f03" "-24 8 0 0 8 0 -24 16 0 16 24 0 0 -8 0 -24 -24 0 8 -24 0 -24 0 0 -8 0 0 -8 8 0 -8 16 0 -8 24 0 8 24 0 16 8 0 16 16 0"
Rerouted for RMA in   1.0s
checksum for the map '+tropic': 689949194
ufo script checksum 2325350321
Created AI player (team 0)
Created AI player (team 7)
-------------------------------------
Connecting to localhost...
connection attempt from loopback connection
load material file: 'materials/tropic.mat'
Starting the game...
Tearfang has joined team 1
music change to David03 (from karlmacklin_geoscape)
music change to PsymongO4 (from David03)
(player 0) It's team 1's round
Tearfang has taken control over team 1.

INVSH_AddInvList: No free inventory space!

Title: Re: R28281 No free Inventory crash to console
Post by: Isil`Zha on March 19, 2010, 06:05:52 am
The same happened to me just now (version 2.3-dev x86_64 March 18 2010 Linux).
This is what I did immediately before it happened:
* I swapped a healthy soldier for an injured one. It might be relevant to the issue as this soldier obviously dropped his inventory at the time I removed him from the aircraft.
* I meant to give the newly assigned soldier his equipment
* I realised that I needed one more machine gun
* I went straight to the "Buy/Sell Equipment" screen
* I bought a single machine gun
* Trying to go back, the game crashed as I hit the "Aircraft" button

Unfortunately, reproducing failed. Most likely because my most recent save was some time ago. As far as I remember, this is what had happened after my last save:
* I tried to intercept a UFO, and my fighter got shot down
* I built one more large and one more small hangar
* I bought a new fighter (Stiletto)
* now or probably a bit earlier the UFO (a fighter) was delivered to my UFO yard (I had completed a mission on a crash site prior)
* I saw a new UFO in approach and remembered that I didn't equip the new fighter yet
* I equipped it with my three remaining weapons (SHIVA (front), Sparrowhawk (left wing), TR-20 (right wing))
* I shot down the UFO
* now I went on with the actions I described above which led to the crash

This is what my console showed. Prior to this there are more [STATS] changes. I assume any earlier message won't be relevant. I attached the complete log in case it should be.
Quote
[STATS] 2010/03/19 12:02:39 - Soldier Yves Vasquez earned 46 experience points in skill #0 (total experience: 92). It is now 0 higher.Shutdown server: Mission end               
==== ShutdownGame ====                                                                   
music change to van_geoscape (from AlexFightmare)                                       
Calling subsystems                                                                       
...subsystem 'base' - saved                                                             
...subsystem 'research' - saved                                                         
...subsystem 'campaign' - saved                                                         
...subsystem 'hospital' - saved                                                         
...subsystem 'market' - saved                                                           
...subsystem 'employee' - saved                                                         
...subsystem 'aliencont' - saved                                                         
...subsystem 'aircraft' - saved                                                         
...subsystem 'installation' - saved                                                     
...subsystem 'ufostores' - saved                                                         
...subsystem 'production' - saved                                                       
...subsystem 'messagesystem' - saved                                                     
...subsystem 'stats' - saved                                                             
...subsystem 'nations' - saved                                                           
...subsystem 'transfer' - saved                                                         
...subsystem 'alien base' - saved                                                       
...subsystem 'xvirate' - saved                                                           
...subsystem 'messageoptions' - saved                                                   
XML Written to buffer (568596 Bytes)                                                     
music change to van_geoscape (from ufo2)                                                 
/usr/games/bin/ufo(Sys_Backtrace+0x15)[0x54a0b1]
/usr/games/bin/ufo(Sys_Error+0x73)[0x54a730]
/usr/games/bin/ufo[0x549e21]
/usr/games/bin/ufo(MN_ContainerNodeUpdateEquipment+0x103)[0x4d21a5]
/usr/games/bin/ufo[0x47c3c0]
/usr/games/bin/ufo(Cbuf_Execute+0x212)[0x4e9631]
/usr/games/bin/ufo[0x43604b]
/usr/games/bin/ufo[0x4f2717]
/usr/games/bin/ufo(Qcommon_Frame+0xc3)[0x4f21c4]
/usr/games/bin/ufo(main+0x45)[0x549e69]
/lib/libc.so.6(__libc_start_main+0xf4)[0x7effa7719a44]
/usr/games/bin/ufo[0x428c69]
Error: INVSH_AddInvList: No free inventory space!
Title: Re: R28281 No free Inventory crash to console
Post by: kibber on March 22, 2010, 11:02:24 pm
Had same problem this weekend with Muton's v.29004.  Happened at mission #10 immediately on killing the first alien.  Two of the 10 missions were terror missions, but I didn't have a recent save game so I did not attempt to duplicate the problem.  Didn't think to get a screenshot either, will remember next time if it happens again.
Title: Re: R28281 No free Inventory crash to console
Post by: Duke on March 22, 2010, 11:44:20 pm
Thanks guys, the devs already believe that the problem exists. So no further evidence is needed.
What we need is a reliable way to reproduce it.

My current guess:
Either it is a certain *sequence* of actions (add, remove; first item, last item) towards a multi-item container (backpack, belt, floor)
OR
(worst case) the container suffers from a memory corruption of a completely different part of the code.

So please focus your testing efforts on what your actors did to containers.
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on March 23, 2010, 12:04:37 am
I've been trying to find similarities in the missions when this error occurs, but I have had no luck, until today.  I can reproduce this error on any of my saved games by using the 'Retry' option 5 times or more. I don't think any action is needed, although I moved one of my men a few paces, then selected the Retry Mission Option.

I have just tested 2 saved games - Bungalow in the Forest and The Bridge maps, in the last 10 minutes and both crashed with this error after retrying 5 times.

Hope this helps  ;)
Title: Re: R28281 No free Inventory crash to console
Post by: Duke on March 23, 2010, 01:21:26 am
I just tried to do 7 or 8 'Retry' for the bridge map, but it worked fine :(

Plz continue to find a way to reproduce it....
Title: Re: R28281 No free Inventory crash to console
Post by: Isil`Zha on March 23, 2010, 03:32:15 am
I had another such crash at a point where it should have been reproducible while it wasn't. It was directly after loading a mission. As I had frequently saved, I had made a save game just shortly before. Yet after loading it the issue didn't appear again. Therefore, unfortunately, I'm fairly certain meanwhile that there won't be a way to reproduce this reliably.
Title: Re: R28281 No free Inventory crash to console
Post by: Mattn on March 23, 2010, 08:01:37 am
aren't we maybe setting back the invlist pointers on loading a campaign? INVSH_InitInventory or something like that was the function afair
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on March 23, 2010, 09:29:39 am
I just tried to do 7 or 8 'Retry' for the bridge map, but it worked fine :(

Strange that I can make it happen like this and not you... well it looks like I could be on the wrong track then - I thought that a clean re-install might help too, but the error is still there.  :(
I'll load up some earlier savegames to see if I can still create the error this way.

Quote
Plz continue to find a way to reproduce it....

Sure - no worries. It's intriguing if nothing else :)  ???
Title: Re: R28281 No free Inventory crash to console
Post by: jfrv24 on March 24, 2010, 01:04:01 am
Strange that I can make it happen like this and not you... well it looks like I could be on the wrong track then [...]

Gren is very much on the right track here.  I've been thinking that it had more to do with length of playtime than action sequence as far as repeatability (which is why savegames never seem to repeat the bug immediately), but hadn't found a reliable way of measuring playtime to get to this bug.

Gren's method (just hit retry a bunch) worked for me - between the 7th and 9th retry each time.  In testing, I took it one step further and found that calling I_AddInvList (The function where the crash message is) 1025 times is what makes it crash.

Steps:

Navigate to your ufoai folder in terminal.
Type:

gdb ufo
break I_AddInvList
ignore 1 1024
run

Load a campaign and start a mission.  Send out the drop team and retry the mission until the breakpoint is reached, and when you hit continue, the program will exit with the error.


To playtesters who don't want to encounter this bug: Save, quit, and reload the game after 3-5 missions, especially if you retried them.
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on March 24, 2010, 09:55:02 am
Oh! Well done jfrv24  :D

I did have a real feeling that the Retry reloading had a big part to play in this problem (I was really thinking on the lines that maybe tables in memory needed to be cleared on each reload, or weren't being cleared properly) but your technical steps seem to have helped to point to a definate area.   :) ;)
Title: Re: R28281 No free Inventory crash to console
Post by: Duke on March 24, 2010, 08:10:10 pm
VERY important finding, jfrv24 :)

The inventory can hold 1024 items, so the error msg is correct !
Looks like we don't reset the inventory on 'Retry'.
Should be an easy fix.
Stay tuned.
Title: Re: R28281 No free Inventory crash to console
Post by: Duke on March 24, 2010, 10:58:34 pm
Uhm...it's much more complicated than I thought.
If you are interested in the technical details, you can follow this thread:
https://sourceforge.net/tracker/index.php?func=detail&aid=2967051&group_id=157793&atid=805242 (https://sourceforge.net/tracker/index.php?func=detail&aid=2967051&group_id=157793&atid=805242)
Title: Re: R28281 No free Inventory crash to console
Post by: Duke on March 28, 2010, 11:25:35 pm
I just uploaded a patch to the above SF-tracker item and need some help with testing.
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on March 28, 2010, 11:34:03 pm
If I do another build - will that help?
Title: Re: R28281 No free Inventory crash to console
Post by: Mattn on March 29, 2010, 07:25:55 am
you will at least get some info on the game console/ufoconsole.log that might help us to find the bug.
Title: Re: R28281 No free Inventory crash to console
Post by: Mattn on March 29, 2010, 07:47:26 am
please retry with latest trunk (>= r29196)

also see discussion here: https://sourceforge.net/tracker/?func=detail&aid=2967051&group_id=157793&atid=805242
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on March 29, 2010, 10:06:50 am
please retry with latest trunk (>= r29196)

also see discussion here: https://sourceforge.net/tracker/?func=detail&aid=2967051&group_id=157793&atid=805242

I left a build running overnight (r29195) and tested this morning first thing - Loaded up a recent saved game - after 4 retry loads, the error happened.

I will do another build and try again with r29196.
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on March 29, 2010, 11:16:35 am
Success!!

Uninstalled r29195
Built and installed r29196
Loaded same mission savegame 25 times using 'Retry' without generating the error  ;)

I will test with other savegames.
Create a new mission savegame and test with that.

Nice work guys!!  ;D

Edit:

Tested with 3 other savegames without problems.

Created a new savegame, reloaded with 22 Retries without any errors and successfully completed the mission..  :D
Title: Re: R28281 No free Inventory crash to console
Post by: Duke on March 29, 2010, 10:23:48 pm
@Gren:
Thx for testing :) This 'testing on demand' is probably the most effective thing to help the devs to save time.

@jfrv24:
Congrats. You really handed us the key to this bug :)
Title: Re: R28281 No free Inventory crash to console
Post by: Gren on March 30, 2010, 12:15:06 am
@Gren:
Thx for testing :) This 'testing on demand' is probably the most effective thing to help the devs to save time.

@jfrv24:
Congrats. You really handed us the key to this bug :)

@Duke - Thank you for the feedback - it really does help.  ;)