View Issue Details

IDProjectCategoryView StatusLast Update
0006360Spring engineGeneralpublic2020-04-27 22:43
ReporterIceXuick Assigned Tohokomoko  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionno change required 
Product Version104.0 +git 
Summary0006360: BAR Games with 4+ players and more than 40-45-ish minutes crash
DescriptionSmaller games tend to run well, but after 40 minutes, sometimes almost 60, the game somehow gets problems.

I've had this for quite some weeks now - probably already months.
Also others (3 more) have pointed out crashes of games that tend to take a bit longer.

It's pretty severe and frustrating to play games that crash after 45-60 minutes of gameplay. It might be the DAI (iirc both the "ba" and "stai" AI's have this problem).

Popup windows show:

1. Failed to allocate memory
2. std::bad_alloc
3. Abort / abnormal termination

I hope you/we can figure this out!
Steps To ReproducePlay latest version of BAR, with scavengers on and set to 0.5.

Host new game with at least one other human player and one DAI ba.

With lots of units and longer gameplay the map suddenly shows dark patches when zooming out and then back in - that's when you know there are problems ahead. between 10-20 seconds from then the game will crash.

Additional Informationinfolog info.

First errors just before crash:

[f=0089719] Warning: [luaL_SpringOptCString(def=[No traceback returned])] wrong type for return argument 2 in "LuaRules::CheckFixStack" (string expected, got function)
[f=0089719] Error: [LuaRules::RunCallInTraceback] error=-1 (LUA_ERRNOIDEA) callin=FeatureCreated trace=[Internal Lua error: Call failure] [No traceback returned]

(there are many of these after this)

Next error block i get 4 times:

[f=0090431] Error: Failed to allocate memory
[f=0090431] Error: Error handler invoked for Spring 104.0.1-1455-g39f8fbd maintenance.
[f=0090431] Error: DLL information:
[f=0090431] Error: Stacktrace for Spring 104.0.1-1455-g39f8fbd maintenance:
[f=0090431] Error: [ProgCtr=008f1c7f StackPtr=02709200 FramePtr=00fb75fb]
[f=0090431] Error: (0) Unknown [0x008F1C7F]
[f=0090431] Error: (1) Unknown [0x008F1C7F]
[f=0090431] Error: (2) Unknown [0x778D50A0]
[f=0090431] Error: (3) Unknown [0x008F1C7F]
[f=0090431] Error: (4) Unknown [0x02709200]
[f=0090431] Error: (5) Unknown [0x00FB75FB]
[f=0090431] Error: (6) Unknown [0x6E6B6E55]
[f=0090431] Error: (7) Unknown [0x006E776F]

Also with these (audio) things:

[f=0090431] [WatchDog::DeregisterThread] deregistering controls for thread [main]
[f=0090431] Warning: [Watchdog] Hang detection triggered for Spring 104.0.1-1455-g39f8fbd maintenance.
[f=0090431] Warning: (in threads: {main,load,audio,vfsi}={0,0,1,0})
[f=0090431] Warning: DLL information:
[f=0090431] Warning: Stacktrace (audio) for Spring 104.0.1-1455-g39f8fbd maintenance:
[f=0090431] Warning: [ProgCtr=7790213c StackPtr=1c4ffc3c FramePtr=1c4ffc58]
[f=0090431] Warning: (0) Unknown [0x7790213C]
[f=0090431] Warning: (1) Unknown [0x778E1F56]
[f=0090431] Warning: (2) Unknown [0x778E1E4B]
[f=0090431] Warning: (3) Unknown [0x778DFF16]
[f=0090431] Warning: (4) Unknown [0x778DFE39]
[f=0090431] Warning: (5) Unknown [0x008F674C]
[f=0090431] Warning: (6) Unknown [0x009576C0]
[f=0090431] Warning: (7) Unknown [0x00DD1A27]
[f=0090431] Warning: (8) Unknown [0x77027E71]
[f=0090431] Warning: (9) Unknown [0x77027F31]
[f=0090431] Warning: (10) Unknown [0x74F30419]
[f=0090431] Warning: (11) Unknown [0x778F662D]
[f=0090431] Warning: (12) Unknown [0x778F65FD]

Then i get around 40-50 of these:

[f=0090556] Warning: [luaL_SpringOptCString(def=[No traceback returned])] wrong type for return argument 2 in "LuaRules::CheckFixStack" (string expected, got function)
[f=0090556] Error: [LuaRules::RunCallInTraceback] error=-1 (LUA_ERRNOIDEA) callin=FeatureCreated trace=[Internal Lua error: Call failure] [No traceback returned]

And the last part is this:

[f=0092767] Error: [Watchdog::DeregisterThread] invalid thread number 0
[f=0092767] Error: [ExitSpringProcess] errorMsg="std::bad_alloc" msgCaption="Spring: caught std::bad_alloc" mainThread=1
[f=0092767] Error: Spring received an ABORT signal
[f=0092767] Error: Error handler invoked for Spring 104.0.1-1455-g39f8fbd maintenance.
[f=0092767] Error: DLL information:
[f=0092767] Error: Stacktrace for Spring 104.0.1-1455-g39f8fbd maintenance:
[f=0092767] Error: [ProgCtr=008f1c7f StackPtr=0270e8f0 FramePtr=00fb75fb]
[f=0092767] Error: (0) Unknown [0x008F1C7F]
[f=0092767] Error: (1) Unknown [0x008F1C7F]
[f=0092767] Error: (2) Unknown [0x778D50A0]
[f=0092767] Error: (3) Unknown [0x008F1C7F]
[f=0092767] Error: (4) Unknown [0x0270E8F0]
[f=0092767] Error: (5) Unknown [0x00FB75FB]
[f=0092767] Error: (6) Unknown [0x6E6B6E55]
[f=0092767] Error: (7) Unknown [0x006E776F]
[f=0092767] Error: [Watchdog::DeregisterThread] invalid thread number 0
[f=0092767] Error: [ExitSpringProcess] errorMsg="Abort / abnormal termination" msgCaption="Spring: Fatal Error" mainThread=1

I hope you/we can figure this out!
TagsNo tags attached.
Attached Files
Checked infolog.txt for ErrorsYes

Activities

abma

2020-01-20 15:39

administrator   ~0020303

"Failed to allocate memory"

did you hit the 4GB memory limit maybe?

afaik the lua memory itself is limited, too, sth. like 800MB.

IceXuick

2020-01-20 15:51

reporter   ~0020304

I don't know.
Might be LUA, because that one popped up in the errors.
Is there a way to see actual memory usage?

abma

2020-01-20 16:38

administrator   ~0020305

afaik /debug shows total lua memory usage...

silentwings

2020-01-21 08:41

reporter   ~0020307

When reporting please post the *FULL* infolog and ideally a replay file to match it.

This is likely a game bug, probably a mem leak in your lua code, check your ingame lua profilers and the max lua mem shown in /debug.

IceXuick

2020-01-21 10:21

reporter   ~0020308

Well the replays i cannot give you, because they are corrupt/broken.
I've uploaded the full infolog!
infolog_major-crash.txt (Attachment missing)

IceXuick

2020-01-21 10:40

reporter   ~0020309

In a 2x DAI ba AI match, LUA doesn't get anywhere near 800mb
With more then 2k units spawned in heavy battle LUA mem is around 125 mb max - bu ton average mid/late game it's 80-100mb.

Damgam

2020-03-03 21:15

reporter   ~0020355

I don't know how related it is, but this crash usually happen at the moment when there's a lot of action going...
A lot of aircraft appearing in LoS very fast, a few big explosions next to each other... It's always after quite long time of running, and feels somewhat random. Diffrent people crash at diffrent times.
There doesn't seem to be any corelation between PC specs and this crash too.

IceXuick

2020-03-08 08:51

reporter   ~0020356

We had another crash in a recent MP game.
We had 2 players and AI, and 2 spectators.
Only 1 player (me) crashed.

RAM memory went slowy up during the game to 3GB, then it suddenly dropped to 1,5. That went well for like approximately 5-10 minutes... Then it abruptly crashed.

Infolog is the problem.
The replay of this one is in tact
infolog-crash-std-alloc.txt (Attachment missing)

IceXuick

2020-03-08 08:52

reporter   ~0020357

The replay of the latest crash
20200307_210340_Comet Catcher Remake 1_104.0.1-1464-g4f428c8 maintenance.sdfz (Attachment missing)

PicassoCT_

2020-04-16 00:51

reporter   ~0020387

https://github.com/spring/spring/blob/6ba05832597e6091f7c810f76c547dd54a585c13/rts/Lua/LuaHandle.cpp#L345

https://github.com/spring/spring/blob/6ba05832597e6091f7c810f76c547dd54a585c13/rts/Lua/LuaHandle.cpp#L412

So its doing some calline traceback:
https://github.com/spring/spring/blob/6ba05832597e6091f7c810f76c547dd54a585c13/rts/Lua/LuaHandle.cpp#L280

FeatureCreated to be exact.. what feature was created during the battle? At this frame?
Some Unit died? Some Feature was created, and instantly trampled into a smaller Feature?

PicassoCT_

2020-04-16 00:53

reporter   ~0020388

Recommend disregarding memory leak errors:
Corrupted states have a tendency to do loopy things and dont clean up after themselves. I had a failing unit-load which represented as a recursion error- due to the InUnitLoading Flag not beeing reset. Focus on the first error.

Floris

2020-04-16 15:18

reporter   ~0020389

i think the issue has been resolved. It was likely caused by a lot of displaylist creation without proper deletion

IceXuick

2020-04-16 23:04

reporter   ~0020390

Yes it looks like 98%-ish of the leak(s) is/are now closed.

Issue History

Date Modified Username Field Change
2020-01-18 19:55 IceXuick New Issue
2020-01-20 15:39 abma Note Added: 0020303
2020-01-20 15:51 IceXuick Note Added: 0020304
2020-01-20 16:38 abma Note Added: 0020305
2020-01-21 08:41 silentwings Note Added: 0020307
2020-01-21 10:21 IceXuick File Added: infolog_major-crash.txt
2020-01-21 10:21 IceXuick Note Added: 0020308
2020-01-21 10:40 IceXuick Note Added: 0020309
2020-03-03 21:15 Damgam Note Added: 0020355
2020-03-08 08:51 IceXuick File Added: infolog-crash-std-alloc.txt
2020-03-08 08:51 IceXuick Note Added: 0020356
2020-03-08 08:52 IceXuick File Added: 20200307_210340_Comet Catcher Remake 1_104.0.1-1464-g4f428c8 maintenance.sdfz
2020-03-08 08:52 IceXuick Note Added: 0020357
2020-04-16 00:51 PicassoCT_ Note Added: 0020387
2020-04-16 00:53 PicassoCT_ Note Added: 0020388
2020-04-16 15:18 Floris Note Added: 0020389
2020-04-16 23:04 IceXuick Note Added: 0020390
2020-04-27 22:43 hokomoko Assigned To => hokomoko
2020-04-27 22:43 hokomoko Status new => closed
2020-04-27 22:43 hokomoko Resolution open => no change required