View Issue Details

IDProjectCategoryView StatusLast Update
0004788Spring engineGeneralpublic2015-06-10 11:01
Reporterabma Assigned TojK  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version98.0.1+git 
Summary0004788: crash / "Failed to allocate memory" when doing /cheat /give 500 aafus + ctrl-d
Descriptionthats a maybe stupid test / edge condition, but imo it shouldn't crash.

when i change in
rts/Game/GameHelper.cpp,

CGameHelper::DoExplosionDamage()

so all damages "damage later", it works. also it runs a lot smoother.
Steps To Reproduce/cheat
/give 500 aafus

select one aafus + ctrl + d
TagsNo tags attached.
Attached Files
profile.png (Attachment missing)
Checked infolog.txt for Errors

Activities

abma

2015-06-02 00:00

administrator   ~0014505

[f=0000288] [GiveUnits] spawned 500 aafus unit(s) for team 0
[f=0000391] Advanced Fusion Reactor: self-destruct in 5s
[f=0000421] Advanced Fusion Reactor: self-destruct in 4s
[f=0000451] Advanced Fusion Reactor: self-destruct in 3s
[f=0000481] Advanced Fusion Reactor: self-destruct in 2s
[f=0000511] Advanced Fusion Reactor: self-destruct in 1s
[f=0000526] -> Advanced Fusion Reactor is being attacked!
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
[f=0000526] [CrashHandler] Error: Failed to allocate memory
[f=0000526] [CrashHandler] Error: Stacktrace for Spring 98.0.1-695-gbc9298a develop:
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
src/central_freelist.cc:333] tcmalloc: allocation failed 16384
Speicherzugriffsfehler

abma

2015-06-02 01:54

administrator   ~0014509

Last edited: 2015-06-02 01:55

i guess it crashes because of stack limit, my computer has 16GB RAM...

abma

2015-06-02 01:57

administrator   ~0014510

yep, with ulimit -s 16000 it works (default is 8192)

jK

2015-06-02 10:59

developer   ~0014516

uploaded a profile graph

jK

2015-06-02 11:29

developer   ~0014517

Last edited: 2015-06-02 11:30

k, the cause is:

All `that` (explosion, particle creation) happens in a _single_ gameframe.
And particleSaturation is only updated in drawFrames. So it goes FAR over the maximum particle count (120k CProjectiles in a fast test).

Solution: make particleSaturation update independent of drawFrames

jK

2015-06-10 11:01

developer   ~0014563

Fix b930c6a183400c4d882060a93a8e6d0bf3ca27c1 committed to develop branch: fix 0004788: fix particleSaturation, repo: spring changeset id: 5058

Issue History

Date Modified Username Field Change
2015-06-01 23:59 abma New Issue
2015-06-02 00:00 abma Note Added: 0014505
2015-06-02 00:00 abma Steps to Reproduce Updated
2015-06-02 01:52 abma Description Updated
2015-06-02 01:54 abma Note Added: 0014509
2015-06-02 01:55 abma Note Edited: 0014509
2015-06-02 01:57 abma Note Added: 0014510
2015-06-02 01:58 abma Description Updated
2015-06-02 02:14 abma Summary crash / "Failed to allocate memory" when doing /cheat /give 500 aafus => crash / "Failed to allocate memory" when doing /cheat /give 500 aafus + ctrl-d
2015-06-02 10:58 jK File Added: profile.png
2015-06-02 10:59 jK Note Added: 0014516
2015-06-02 11:29 jK Note Added: 0014517
2015-06-02 11:30 jK Note Edited: 0014517
2015-06-10 11:01 jK Changeset attached => spring develop b930c6a1
2015-06-10 11:01 jK Note Added: 0014563
2015-06-10 11:01 jK Assigned To => jK
2015-06-10 11:01 jK Status new => resolved
2015-06-10 11:01 jK Resolution open => fixed