View Issue Details

IDProjectCategoryView StatusLast Update
0004858Spring engineGeneralpublic2015-06-29 22:56
ReporterJools Assigned Toabma  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionwon't fix 
Product Version99.0 
Summary0004858: LuaUI: cannot allocate more memory!
DescriptionLuaUI uses up to 750 Mb of memory, tested with luarules disabled. When disabling luaui the memory is freed. This is only 2 minutes into the game with two give all commands.
Steps To ReproduceUse XTA 9.745
/cheat
[luarules disable] //optional
/give all
/give all 1

press alt-b and look on memory usage
Additional Information[f=0002027] Fatal: LuaUI: cannot allocate more memory! (805306380 bytes already used, 0 bytes maximum)
[f=0002027] Error: LuaUI::RunCallIn: error = 4, DrawWorldPreUnit, [Internal Lua error: Call failure] not enough memory
TagsNo tags attached.
Attached Files
infolog.txt (Attachment missing)
20150629_162214_TheColdPlace_99.sdf (Attachment missing)
Checked infolog.txt for Errors

Activities

Jools

2015-06-29 16:44

reporter   ~0014777

http://replays.springrts.com/replay/b75791559dee6fbf008ac254f5de8711

I managed to reproduce the memory allocation with just the projectile lights widget, all other lua turned off.

It's possible to also reproduce it with just a few instances of the fleagoth, merely 5 or so will do. Once the memory exceeds some amount the GC never catches up.

Jools

2015-06-29 16:52

reporter   ~0014778

Here is the same thing reproduced with 8 fleagoths and 2 core bases (they can't die, they have to be captured, it's a NOTA mode in xta)

http://replays.springrts.com/replay/fa5991559dee6fbf6df924fb0e889dd9/

With projectile light the memory allocation goes up to 750 Mb, with luaui reload it is freed. Without that widget the memory allocation is stable at 12 Mb.

Jools

2015-06-29 17:05

reporter   ~0014780

See also:
https://springrts.com/mantis/view.php?id=4564
https://springrts.com/mantis/view.php?id=4568

hokomoko

2015-06-29 17:06

developer   ~0014781

doesn't that just mean your widget has issues?

Jools

2015-06-29 19:17

reporter   ~0014783

Yes, the widget has issues, maybe the discussion can continue here: https://springrts.com/phpbb/viewtopic.php?f=23&t=32631&p=562147&hilit=projectile+lights#p562147

But this is easy to say only because I knew the issue was likely this widget, there was a lot of troubleshooting before we could isolate it. Does the engine monitor luaui memory allocation on widget level? Does the widgethandler have access to memory allocation? Can a warning message be written to infolog when luaui memory allocation exceeds a certain level? When engine shuts off luaui when it reaches more memory than 750 mb, is it possible to pass this information to luaui with a callin so gamedevs can take the proper action?

hokomoko

2015-06-29 19:23

developer   ~0014784

I'm not going to implement any of the things you mentioned myself.

abma

2015-06-29 22:56

administrator   ~0014786

i don't see this happen in a reasonable timeframe.

contributions welcome! but i don't think that it is doable in a way that doesn't impact the performance badly.

currently the engine can't distingish between lua widgets or gadgets, it only knows about the lua states/instances.

Issue History

Date Modified Username Field Change
2015-06-29 15:30 Jools New Issue
2015-06-29 15:30 Jools File Added: infolog.txt
2015-06-29 15:30 Jools File Added: 20150629_162214_TheColdPlace_99.sdf
2015-06-29 16:44 Jools Note Added: 0014777
2015-06-29 16:52 Jools Note Added: 0014778
2015-06-29 17:05 Jools Note Added: 0014780
2015-06-29 17:06 hokomoko Note Added: 0014781
2015-06-29 17:56 abma Status new => feedback
2015-06-29 19:17 Jools Note Added: 0014783
2015-06-29 19:17 Jools Status feedback => new
2015-06-29 19:23 hokomoko Note Added: 0014784
2015-06-29 22:54 abma Severity major => feature
2015-06-29 22:56 abma Note Added: 0014786
2015-06-29 22:56 abma Status new => closed
2015-06-29 22:56 abma Assigned To => abma
2015-06-29 22:56 abma Resolution open => won't fix