View Issue Details

IDProjectCategoryView StatusLast Update
0003177FSSCPmodelspublic2017-02-15 16:01
ReporterGoober5000 Assigned Tom_m  
PrioritylowSeveritycrashReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0003177: pofspew causes game to run out of memory
DescriptionAs reported by Inferno, running -pofspew and attempting to load all the models causes the game to run out of memory. Several "out of memory" errors appear in the log before the game finally crashes with "Malloc Failed!"

This happened because Inferno was trying to regenerate cache files. I told them that the cache feature was deprecated, so they don't need to run this anymore; therefore I've marked this as low priority. Nevertheless, it indicates that -pofspew may have a memory leak somewhere.
Additional InformationLog attached.
TagsNo tags attached.

Activities

Goober5000

2015-12-11 22:39

administrator  

fs2_open.log.7z (130,099 bytes)

MageKing17

2015-12-12 05:56

developer   ~0016799

It might just indicate that we're hitting 32-bit memory limitations again, rather than that there's a memory leak with -pofspew in particular (although I suppose it could be argued that -pofspew not unloading anything until reaching the 295th POF could be classified as a "memory leak" of sorts).

Goober5000

2015-12-14 15:24

administrator   ~0016801

Yes, in the context of Java, "memory leak" also refers to memory piling up without being freed. It should be unloading the models after "spewing" them.

m_m

2017-02-15 10:04

developer   ~0016867

I think I fixed this by explicitly unloading the model after reading it: https://github.com/scp-fs2open/fs2open.github.com/pull/1232

In my tests with Blue Planet the current master version reaches uses over 3 GB of memory. With my changes it never goes above 1.3 GB.

Issue History

Date Modified Username Field Change
2015-12-11 22:38 Goober5000 New Issue
2015-12-11 22:39 Goober5000 File Added: fs2_open.log.7z
2015-12-11 22:40 Goober5000 Status new => confirmed
2015-12-12 05:56 MageKing17 Note Added: 0016799
2015-12-14 15:24 Goober5000 Note Added: 0016801
2017-02-15 10:04 m_m Assigned To => m_m
2017-02-15 10:04 m_m Status confirmed => code review
2017-02-15 10:04 m_m Note Added: 0016867
2017-02-15 16:01 m_m Status code review => resolved
2017-02-15 16:01 m_m Resolution open => fixed