project-navigation
Personal tools

Author Topic: R28281 No free Inventory crash to console  (Read 13303 times)

Offline Isil`Zha

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #15 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.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: R28281 No free Inventory crash to console
« Reply #16 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

Offline Gren

  • Squad Leader
  • ****
  • Posts: 165
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #17 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 :)  ???

Offline jfrv24

  • Rookie
  • ***
  • Posts: 12
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #18 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.

Offline Gren

  • Squad Leader
  • ****
  • Posts: 165
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #19 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.   :) ;)

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #20 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.

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #21 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

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #22 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.

Offline Gren

  • Squad Leader
  • ****
  • Posts: 165
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #23 on: March 28, 2010, 11:34:03 pm »
If I do another build - will that help?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: R28281 No free Inventory crash to console
« Reply #24 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.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: R28281 No free Inventory crash to console
« Reply #25 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

Offline Gren

  • Squad Leader
  • ****
  • Posts: 165
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #26 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.

Offline Gren

  • Squad Leader
  • ****
  • Posts: 165
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #27 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
« Last Edit: March 29, 2010, 12:41:38 pm by Gren »

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #28 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 :)

Offline Gren

  • Squad Leader
  • ****
  • Posts: 165
    • View Profile
Re: R28281 No free Inventory crash to console
« Reply #29 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.  ;)