Opened 3 years ago

Closed 3 years ago

#13071 closed defect (fixed)

NGI: Full Pipe - Constant (huge) memory loss on switching rooms

Reported by: raziel- Owned by: bluegr
Priority: normal Component: Engine: NGI
Version: Keywords:
Cc: Game: Full Pipe

Description

ScummVM 2.6.0git (Nov 12 2021 09:48:26)
Features compiled in: Vorbis FLAC MP3 RGB zLib MPEG2 Theora AAC A/52 FreeType2 FriBiDi JPEG PNG GIF cloud (servers, local) TinyGL OpenGL

The game eats away memory by simply switching rooms.
The below debug out shows the very first room (17 files) and going up (123 files).
Needless to say i'm bound to crash once memory is completely filled, so approx. 10 minutes into the game.

Going to the 123 files room i lose ~105 MB of ram, going back to the 17 files room i again lose ~28 MB (on top of the 128MB from before, because the engine never frees the old room/resources).

The problem is, i lose that amount of RAM *every* time i switch to another room (or going to the same rooms constantly).

It does seem as if the resources for each room are *always* load into memory, but never freed (e.g. when i leave the room).
It also seems as if the resources of one room, once load into memory, are never re-used, if found, but simply load in, on top of the already load resources, again.

(If that is a memory leak, then it's a huge one) :-)

Now, i do not have the slightest idea how the engine works (i know from sev that it was a beast to develop regarding it's file handling), but could someone on another platform (maybe LE) confirm, please?

I hate to be once again the only one with this behaviour.

Thank you

file: 0302.DIB  flags: 0  extVal: 48  pos: 3968  size: 48
file: 03025205.DIB  flags: 70000  extVal: 19648  pos: 4016  size: 19648
file: 03020841.DIB  flags: 40000  extVal: 22848  pos: 23664  size: 22848
file: 03020891.DIB  flags: 50000  extVal: 18624  pos: 46512  size: 18624
file: 03020411.DIB  flags: 20000  extVal: 39712  pos: 65136  size: 39712
file: 03020412.DIB  flags: 30000  extVal: 19648  pos: 104848  size: 19648
file: SC0200.DIB  flags: 10000  extVal: 960032  pos: 124496  size: 960032
file: 0302.SC  flags: 90000  extVal: 544  pos: 1084528  size: 544
file: SMALL.NFT  flags: 100000  extVal: 13590  pos: 1085072  size: 13590
file: 0306.ANI  flags: c0000  extVal: 4647  pos: 1098662  size: 4647
file: 03060307.MOV  flags: b0000  extVal: 6756  pos: 1103309  size: 6756
file: 03060307.17  flags: f0000  extVal: 12416  pos: 1110065  size: 12416
file: 03060307.16  flags: e0000  extVal: 11936  pos: 1122481  size: 11936
file: 03060307.4  flags: d0000  extVal: 12032  pos: 1134417  size: 12032
file: 03060307.3  flags: a0000  extVal: 11936  pos: 1146449  size: 11936
file: 03060307.2  flags: 620000  extVal: 12416  pos: 1158385  size: 12416
file: 03060307.1  flags: 630000  extVal: 11680  pos: 1170801  size: 11680
file: 03060310.MOV  flags: 140000  extVal: 3445  pos: 1182481  size: 3445
file: 03060310.3  flags: 130000  extVal: 11040  pos: 1185926  size: 11040
file: 03060310.2  flags: 120000  extVal: 11712  pos: 1196966  size: 11712
file: 03060310.1  flags: 110000  extVal: 12352  pos: 1208678  size: 12352
file: 03060311.MOV  flags: 170000  extVal: 2274  pos: 1221030  size: 2274
file: 03060311.2  flags: 160000  extVal: 11264  pos: 1223304  size: 11264
file: 03060311.1  flags: 150000  extVal: 10944  pos: 1234568  size: 10944
file: 03060313.MOV  flags: 640000  extVal: 2274  pos: 1245512  size: 2274
file: 03060313.2  flags: 1a0000  extVal: 10944  pos: 1247786  size: 10944
file: 03060313.1  flags: 190000  extVal: 11264  pos: 1258730  size: 11264
file: 03060315.MOV  flags: 180000  extVal: 3377  pos: 1269994  size: 3377
file: 03060315.3  flags: 600000  extVal: 10688  pos: 1273371  size: 10688
file: 03060315.2  flags: 570000  extVal: 11104  pos: 1284059  size: 11104
file: 03060315.1  flags: 560000  extVal: 11264  pos: 1295163  size: 11264
file: 03060316.MOV  flags: 550000  extVal: 4479  pos: 1306427  size: 4479
file: 03060316.4  flags: 540000  extVal: 12352  pos: 1310906  size: 12352
file: 03060316.3  flags: 5f0000  extVal: 12128  pos: 1323258  size: 12128
file: 03060316.2  flags: 5e0000  extVal: 12256  pos: 1335386  size: 12256
file: 03060316.1  flags: 5d0000  extVal: 12352  pos: 1347642  size: 12352
file: 03060317.MOV  flags: 5c0000  extVal: 34341  pos: 1359994  size: 34341
file: 03060317.31  flags: 5b0000  extVal: 10080  pos: 1394335  size: 10080
file: 03060317.30  flags: 5a0000  extVal: 10304  pos: 1404415  size: 10304
file: 03060317.29  flags: 590000  extVal: 10080  pos: 1414719  size: 10080
file: 03060317.28  flags: 580000  extVal: 10528  pos: 1424799  size: 10528
file: 03060317.27  flags: 530000  extVal: 10592  pos: 1435327  size: 10592
file: 03060317.26  flags: 1e0000  extVal: 10592  pos: 1445919  size: 10592
file: 03060317.25  flags: 1d0000  extVal: 10336  pos: 1456511  size: 10336
file: 03060317.24  flags: 1c0000  extVal: 10688  pos: 1466847  size: 10688
file: 03060317.23  flags: 1b0000  extVal: 10336  pos: 1477535  size: 10336
file: 03060317.22  flags: 230000  extVal: 10592  pos: 1487871  size: 10592
file: 03060317.21  flags: 220000  extVal: 10592  pos: 1498463  size: 10592
file: 03060317.20  flags: 210000  extVal: 10528  pos: 1509055  size: 10528
file: 03060317.19  flags: 200000  extVal: 10080  pos: 1519583  size: 10080
file: 03060317.18  flags: 1f0000  extVal: 10304  pos: 1529663  size: 10304
file: 03060317.17  flags: 430000  extVal: 10080  pos: 1539967  size: 10080
file: 03060317.16  flags: 3a0000  extVal: 9888  pos: 1550047  size: 9888
file: 03060317.15  flags: 390000  extVal: 9984  pos: 1559935  size: 9984
file: 03060317.14  flags: 380000  extVal: 9888  pos: 1569919  size: 9888
file: 03060317.13  flags: 370000  extVal: 9984  pos: 1579807  size: 9984
file: 03060317.12  flags: 360000  extVal: 9920  pos: 1589791  size: 9920
file: 03060317.11  flags: 350000  extVal: 9792  pos: 1599711  size: 9792
file: 03060317.10  flags: 340000  extVal: 9792  pos: 1609503  size: 9792
file: 03060317.9  flags: 330000  extVal: 10016  pos: 1619295  size: 10016
file: 03060317.8  flags: 320000  extVal: 10080  pos: 1629311  size: 10080
file: 03060317.7  flags: 310000  extVal: 10016  pos: 1639391  size: 10016
file: 03060317.6  flags: 420000  extVal: 9792  pos: 1649407  size: 9792
file: 03060317.5  flags: 300000  extVal: 9792  pos: 1659199  size: 9792
file: 03060317.4  flags: 2f0000  extVal: 9920  pos: 1668991  size: 9920
file: 03060317.3  flags: 2e0000  extVal: 9984  pos: 1678911  size: 9984
file: 03060317.2  flags: 2d0000  extVal: 9888  pos: 1688895  size: 9888
file: 03060317.1  flags: 2c0000  extVal: 9984  pos: 1698783  size: 9984
file: 03060323.MOV  flags: 2b0000  extVal: 15591  pos: 1708767  size: 15591
file: 03060323.21  flags: 2a0000  extVal: 10464  pos: 1724358  size: 10464
file: 03060323.20  flags: 290000  extVal: 10528  pos: 1734822  size: 10528
file: 03060323.19  flags: 280000  extVal: 10624  pos: 1745350  size: 10624
file: 03060323.18  flags: 270000  extVal: 10752  pos: 1755974  size: 10752
file: 03060323.17  flags: 410000  extVal: 11008  pos: 1766726  size: 11008
file: 03060323.16  flags: 260000  extVal: 11072  pos: 1777734  size: 11072
file: 03060323.8  flags: 250000  extVal: 11200  pos: 1788806  size: 11200
file: 03060323.7  flags: 400000  extVal: 11200  pos: 1800006  size: 11200
file: 03060323.6  flags: 3f0000  extVal: 11200  pos: 1811206  size: 11200
file: 03060323.5  flags: 3e0000  extVal: 11904  pos: 1822406  size: 11904
file: 03060323.4  flags: 3d0000  extVal: 11904  pos: 1834310  size: 11904
file: 03060323.3  flags: 3c0000  extVal: 10624  pos: 1846214  size: 10624
file: 03060323.2  flags: 3b0000  extVal: 10080  pos: 1856838  size: 10080
file: 03060323.1  flags: 240000  extVal: 9888  pos: 1866918  size: 9888
file: 03060314.MOV  flags: 650000  extVal: 14476  pos: 1876806  size: 14476
file: 03060314.13  flags: 520000  extVal: 19488  pos: 1891282  size: 19488
file: 03060314.12  flags: 4a0000  extVal: 18816  pos: 1910770  size: 18816
file: 03060314.11  flags: 490000  extVal: 19648  pos: 1929586  size: 19648
file: 03060314.10  flags: 480000  extVal: 19264  pos: 1949234  size: 19264
file: 03060314.9  flags: 470000  extVal: 19648  pos: 1968498  size: 19648
file: 03060314.8  flags: 510000  extVal: 17888  pos: 1988146  size: 17888
file: 03060314.7  flags: 460000  extVal: 16320  pos: 2006034  size: 16320
file: 03060314.6  flags: 450000  extVal: 14304  pos: 2022354  size: 14304
file: 03060314.5  flags: 500000  extVal: 12512  pos: 2036658  size: 12512
file: 03060314.4  flags: 4f0000  extVal: 11584  pos: 2049170  size: 11584
file: 03060314.3  flags: 4e0000  extVal: 10912  pos: 2060754  size: 10912
file: 03060314.2  flags: 4d0000  extVal: 11040  pos: 2071666  size: 11040
file: 03060314.1  flags: 4c0000  extVal: 10944  pos: 2082706  size: 10944
file: 03061692.MOV  flags: 4b0000  extVal: 63  pos: 2093650  size: 63
file: 03060308.STA  flags: 440000  extVal: 11040  pos: 2093713  size: 11040
file: 03060309.STA  flags: 610000  extVal: 12416  pos: 2104753  size: 12416
file: 03060312.STA  flags: 6c0000  extVal: 11264  pos: 2117169  size: 11264
file: 03060318.STA  flags: 6d0000  extVal: 9888  pos: 2128433  size: 9888
file: 1020.ANI  flags: 6e0000  extVal: 2316  pos: 2138321  size: 2316
file: 10201021.MOV  flags: 6f0000  extVal: 55  pos: 2140637  size: 55
file: 10201693.MOV  flags: 700000  extVal: 71  pos: 2140692  size: 71
file: 10201022.STA  flags: 710000  extVal: 2368  pos: 2140763  size: 2368
file: 10201694.STA  flags: 730000  extVal: 2368  pos: 2143131  size: 2368
file: SC02_BGR.COL  flags: 660000  extVal: 1024  pos: 2145499  size: 1024
file: 0319.QU  flags: 670000  extVal: 349  pos: 2146523  size: 349
file: 0471.QU  flags: 690000  extVal: 477  pos: 2146872  size: 477
file: 0472.QU  flags: 680000  extVal: 212  pos: 2147349  size: 212
file: 0514.QU  flags: 6a0000  extVal: 98  pos: 2147561  size: 98
file: 0515.QU  flags: 720000  extVal: 98  pos: 2147659  size: 98
file: 0516.QU  flags: 740000  extVal: 91  pos: 2147757  size: 91
file: 1025.QU  flags: 750000  extVal: 552  pos: 2147848  size: 552
file: 1003.QU  flags: 760000  extVal: 108  pos: 2148400  size: 108
file: 1690.QU  flags: 770000  extVal: 98  pos: 2148508  size: 98
file: 1691.QU  flags: 780000  extVal: 115  pos: 2148606  size: 115
file: 3225.QU  flags: 790000  extVal: 98  pos: 2148721  size: 98
file: 3226.QU  flags: 7a0000  extVal: 98  pos: 2148819  size: 98
file: 3227.QU  flags: 60000  extVal: 98  pos: 2148917  size: 98
file: 3228.QU  flags: 6b0000  extVal: 98  pos: 2149015  size: 98
file: 3229.QU  flags: 80000  extVal: 98  pos: 2149113  size: 98
NGIArchive::NGIArchive(0302.nl): Located 123 files
scene: <ÐÑÐŽÑ-ÑÑОк> 302
file: 2-001.WAV  flags: 0  extVal: 895458  pos: 768  size: 895458
file: 2-002.WAV  flags: 10000  extVal: 173102  pos: 896226  size: 173102
file: 2-003.WAV  flags: 20000  extVal: 181292  pos: 1069328  size: 181292
file: 2-004.WAV  flags: 30000  extVal: 43692  pos: 1250620  size: 43692
file: 2-005.WAV  flags: 40000  extVal: 161836  pos: 1294312  size: 161836
file: 2-006.WAV  flags: 50000  extVal: 116728  pos: 1456148  size: 116728
file: 2-007.WAV  flags: 60000  extVal: 109612  pos: 1572876  size: 109612
file: 2-008.WAV  flags: 70000  extVal: 108336  pos: 1682488  size: 108336
file: 2-009.WAV  flags: 80000  extVal: 108336  pos: 1790824  size: 108336
file: 2-010.WAV  flags: 90000  extVal: 90668  pos: 1899160  size: 90668
file: 2-011.WAV  flags: a0000  extVal: 98604  pos: 1989828  size: 98604
file: 2-012.WAV  flags: b0000  extVal: 161836  pos: 2088432  size: 161836
file: 2-013.WAV  flags: c0000  extVal: 109612  pos: 2250268  size: 109612
file: 2-014.WAV  flags: d0000  extVal: 111532  pos: 2359880  size: 111532
file: 2-015.WAV  flags: e0000  extVal: 102702  pos: 2471412  size: 102702
file: 2-016.WAV  flags: f0000  extVal: 96300  pos: 2574114  size: 96300
file: 2-017.WAV  flags: 100000  extVal: 92716  pos: 2670414  size: 92716
file: 2-018.WAV  flags: 110000  extVal: 92728  pos: 2763130  size: 92728
file: 2-019.WAV  flags: 120000  extVal: 203302  pos: 2855858  size: 203302
file: 2-020.WAV  flags: 130000  extVal: 116728  pos: 3059160  size: 116728
file: 2-021.WAV  flags: 140000  extVal: 109612  pos: 3175888  size: 109612
file: 2-022.WAV  flags: 150000  extVal: 98666  pos: 3285500  size: 98666
file: 2-023.WAV  flags: 160000  extVal: 88198  pos: 3384166  size: 88198
NGIArchive::NGIArchive(00170302.nl): Located 23 files

Full Pipe (Windows/English)

AmigaOS4 - PPC - SDL - BE
gcc (adtools build 11.1.0) 11.1.0

Change History (4)

comment:1 by raziel-, 3 years ago

This is an engine bug.

I just tried on windows and the same memory loss happens.

There is no crash obviously, since
a) I have 8 GB of RAM and
b) even if the ram gets filled completely the swap file takes over.
Probably the reason why no one ever saw this.

If more info is needed, please shout

comment:2 by bluegr, 3 years ago

Owner: set to raziel-
Resolution: fixed
Status: newpending

This is hopefully fixed now in commit 1a36cda90f280ac3fd844e64b85277d5d2ec781c. Could you please verify that the leaks are gone?

comment:3 by raziel-, 3 years ago

@bluegr

Whoa, i didn't expect a pickup and fix that fast :-)

Awesome, yes, the massive leak is gone.

Thank you so much

comment:4 by bluegr, 3 years ago

Owner: changed from raziel- to bluegr
Status: pendingclosed

Great! Thanks for the feedback, glad it's sorted :)

Note: See TracTickets for help on using tickets.