PDA

View Full Version : D&D 5E - GPU Memory Leak?



rocketvaultgames
November 20th, 2024, 18:06
It seems that since 4.6, the Dedicated GPU memory usage increases over time even if FG is just running minimized in the background.

Once it is at or near max memory usage (left running overnight), FG goes non-responsive when trying to exit the application. Even when not at max, exiting hangs FG and it takes much longer than it used to to close.

Immediately after opening:

62664

Near max after running for a couple of hours:

62662

Immediately after closing:

62663


I'm not sure if this is related at all, but opening an image (a rather large map with a lot of layers (but no FX/LOS/Lighting), it seems to take a little longer than it used to and show tokens/drawings for about half a second over a black image, and then load the image. This used to just appear all at the same time (or close enough to it not to be noticeable).

Moon Wizard
November 20th, 2024, 18:17
Carl is looking at this among other items from the latest release.

Can you please provide a zipped up copy of campaign folder (and any image assets used if outside campaign folder)? You can post a link via DropBox/OneDrive, and set to Share with Anyone with Link.

The more examples that we have; the more likely Carl will be able to reproduce the issue and generate a fix.

Regards,
JPG

woodscanner
November 20th, 2024, 19:53
Agree, several crashes, most recent after updating an hour or so ago (mine crashed within about twenty minutes, but perhaps i have less memory..)

https://drive.google.com/file/d/1OfnUwVFjV7Et0qAMkege9B7vtnG2WFw5/view?usp=drive_link

rocketvaultgames
November 20th, 2024, 20:09
Carl is looking at this among other items from the latest release.

Can you please provide a zipped up copy of campaign folder (and any image assets used if outside campaign folder)? You can post a link via DropBox/OneDrive, and set to Share with Anyone with Link.

The more examples that we have; the more likely Carl will be able to reproduce the issue and generate a fix.

Regards,
JPG

https://www.dropbox.com/s/b6s18i3dhm72q5v/Forgotten%20Realms%202020.zip?dl=0

PaulChatterton
November 20th, 2024, 20:49
I can confirm after some testing with my players that there might be a very slow memory leak generally, perhaps 0.1 MB per minute, but the big impact we saw was from moving tokens on the map, 200 MB per move. Closing the map seemed to have no effect. The only way to reset the memory usage was by stopping and restarting FGU.

I can't provide a copy of my campaign, unfortunately, as I don't have access to One Drive or Dropbox.

Baron Toth
November 20th, 2024, 21:01
Here's a link to my campaign. When I opened it, my memory use was sitting at 4.2 GB. After about 10 minutes of moving tokens, I'm at 6.0. It doesn't seem to change unless I'm moving tokens.
https://drive.google.com/file/d/1cCK_LETDhJ5EwTnXDedu1ysHtdQiAmiV/view?usp=sharing

Similar issues with a new campaign, small map and no extensions. 3.1 GB to 4 GB moving tokens around for a minute.
https://drive.google.com/drive/folders/1cCi-OzC3BNicS3enFXJtbI1A7wtSYmYf?usp=sharing

FG 4.6.0 on a Mac running OS 15.1.1

dpezet
November 20th, 2024, 22:53
I am seeing something similar with v4.6.0 on Windows 11. I can see the system memory (not GPU) creeping up in a brand new clean 5E campaign with no extensions or themes loaded. I did find one way to accelerate the memory leak. I added in the "Joy of Painting" extension from Bayne and started copying brushes and templates from the FG Spell Templates pack into it. That spiked FG's memory usage to consume my full 64GB of RAM in less than 5 minutes.

rocketvaultgames
November 20th, 2024, 23:15
I am seeing something similar with v4.6.0 on Windows 11. I can see the system memory (not GPU) creeping up in a brand new clean 5E campaign with no extensions or themes loaded. I did find one way to accelerate the memory leak. I added in the "Joy of Painting" extension from Bayne and started copying brushes and templates from the FG Spell Templates pack into it. That spiked FG's memory usage to consume my full 64GB of RAM in less than 5 minutes.

On the flipside, it would be awesome to make use of all that extra RAM if possible... I rarely cross over 32 of 64 GB even with a ton of stuff plus FG running. I'm not sure if it's possible, but keeping things like party sheet, more recently used images, etc. cached for faster re-opening would be awesome!

Moon Wizard
November 21st, 2024, 01:45
I've pushed a hot fix with Carl's changes that he mentioned should help address this. Please run a new Check for Updates, try again, and let us know what you find.

Thanks,
JPG

Baron Toth
November 21st, 2024, 02:02
I think the memory leak is better. 4.4 MB to 4.8 after a couple of minutes of moving tokens around. However, moving the tokens isn't as smooth as it was before the last fix. It's kind of jerky now, with frequent hesitations. Even moving the tokens using the arrows keys has a frequent odd delay.

rocketvaultgames
November 21st, 2024, 02:38
I can't yet tell if the GPU memory usage is growing to maximum but I did notice that there is a very regular dip in GPU, which I assume is related to the active FG CPU core spiking. Is this some sort of garbage collection?

I have always had a similar problem when using the Better Menus extension, but the author was never able to figure out the cause. Now it seems like the problem exists with no extensions...

62670

Baron Toth
November 21st, 2024, 12:08
The update I just ran (6:15 am EST) seems to have eliminated the memory leak. Token movement is still jerkier than I remember.

Tabarkus
November 21st, 2024, 12:47
I am still experiencing a memory leak when working in Assets with images as of 07:45 EST.

rocketvaultgames
November 21st, 2024, 15:22
I left the campaign running overnight with a few large images open. It appears that there are no RAM or GPU memory leaks.

I did not have the assets window open at all in this session, so there may still be an issue there.

Baron Toth
November 21st, 2024, 23:25
Following up on my "jerky token movement"- it was apparently caused by an extension- Aura Effects. I haven't played a game yet, but other than that extension, everything seems to be running smoothly.

Moon Wizard
November 22nd, 2024, 04:10
Just pushed a new hot fix which addresses what we think was the primary cause for the memory leak in the Assets window. Please run a new Check for Updates, and let us know if you're still seeing an issue.

Regards,
JPG

spliskamatyshak
November 22nd, 2024, 04:45
My campaign still won't function. Here's the zip. There are a bunch of enormous dungeon maps created with Dungeon Alchemist. Get it to work with Castle Ran and no one should ever have issues.

https://drive.google.com/file/d/1--CPWN8pgF68ixnMLGk-D1aV2Z_SbB87/view?usp=sharing

Trenloe
November 22nd, 2024, 16:40
There are a bunch of enormous dungeon maps created with Dungeon Alchemist. Get it to work with Castle Ran and no one should ever have issues.
27,000 x 15,000 pixels - that's only 25 times the recommended map size! See here for recommendations: https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/2037547009/Developer+Guide+-+Product+Guidelines

Trying to run something that size is going to give issues for either the GM or some of the players even before the recent update. You'll need to reduce the resolution of some of your images.

spliskamatyshak
November 22nd, 2024, 20:36
Recommended. But these big maps worked just bloody fine prior to this release. I've been an avid Fantasy Grounds user for 20 years. You guys have THE best VTT out there, but you've just destroyed my ability to run my campaigns and your last several releases have been nothing but one headache after another. You did something to memory management with this release that is FUBAR. I'm going to have to cancel my campaign sessions until you do something to fix this, or I spend weeks needlessly recreating maps.

Trenloe
November 22nd, 2024, 20:59
But these big maps worked just bloody fine prior to this release.
Maybe you're lucky and you and your players all run very high spec computers. Most people who have reported performance issues with images are running images way over the recommended image resolution.


The following doesn't actually describe what your issues are?


My campaign still won't function.


You did something to memory management with this release that is FUBAR.

Let's start with knowing exactly what the issues you're experiencing are please?

spliskamatyshak
November 22nd, 2024, 21:37
None of the big maps load and the app is unusable. The latest iteration just shows gray background on the map window and memory climbs to mid 90% then drops to high 30% and repeats (I let this pattern go for an hour before shutting down the app). While memory is climbing (skyrocketing), it is impossible to do anything with the rest of the app.

Prior to this release, these big maps behaved only slightly slower on loading than other images on my side as GM. Players would get a bit of a delay, typically 1-2 minutes. None of these loads hampered other aspects of the app.

Somehow in this release, you have imposed limitations that prevent these big maps from loading and making the app unusable as they try in vain to load.

Moon Wizard
November 22nd, 2024, 22:02
I have passed along your campaign to Carl, since I was able to see the issue on my machine with your campaign. I'll respond when I have more information.

Regards,
JPG

Stargrove
November 23rd, 2024, 04:17
1) While playing tonight I, as GM, was seeing memory usage spiking up to 18GB of ram usage for FG and I was sitting at 98% usage (32GB total) overall on my system most of the time tonight. My players sometimes saw usage up to 6 or 7GB of usage. We were just playing PF2E Abomination Vaults and only had one map open and shared.

2) We have seen for a while now when you have saving rolls that multiple players need to do that not more than one player can effectively roll their save at once as the system can't handle it and lags hard if we try. This has been an ongoing issue for a while now and we just handle it by making sure only one player make their saves at a time.

3) Dice rolls in general for attacks and damage needed to be clicked multiple times most of the 4 hours we were playing before they would fire off.

Moon Wizard
November 23rd, 2024, 04:21
Thanks for reporting. Can you provide a zipped up copy of your campaign folder; and let us know which map was causing the issue?

Regards,
JPG

meadegendar
November 23rd, 2024, 15:19
I copied this from the discord support channel that I posted. For sake of testing, I did the following. Opened existing campaign and watch the memory jump up to over 2GB. Closed that campaign and the system did not release that memory. creating a new campaign, did not load any extension and only loaded PHB, DMG, MM, MOTM, XGTE, TCOE, GotG, ToE, SCAG, and BoMT both GM and Player books. Grab one of the maps in the DMG and created a character and drop it in the CT and on the map as well as grab a creature and did the same. Memory shot up to over 3GB. moved tokens around experiencing lag, and watch the memory slightly go up in the process. I have 48GB in this computer and fGU is curently using almost 4GB of that. I have not had any players connect to it out of concern of crashing. I then loaded a module I created that has maps I designed in Dungeondraft and open one of those maps. Memory shot up to over 8GB. I closed the map and the module and now sitting at 8GB. I have to go completely out of FGU to release all the memory it consumed.

per Zacchaeus I also uploaded the test campaign I created to do this test on that discord channel.

Stargrove
November 23rd, 2024, 15:45
I have added it here.

My players were on the Abomination Vaults, Map of Temple (Level 10) last night.

Moon Wizard
November 23rd, 2024, 20:02
I've passed along your sample campaign to Carl along with the others received so far. Hopefully, with the multiple examples, he'll be able to identify and fix quickly.

Regards,
JPG

Moon Wizard
November 23rd, 2024, 22:46
@spliskamatyshak,
The link to your campaign share expired. Can you add again, and repost?

I have several I have downloaded; but I was trying to make sure I was looking at the right one. What's the name of the campaign?

Thanks,
JPG

HuseyinCinar
November 23rd, 2024, 22:56
Adding my campaign folder as well. It's PF2

62720

First time seeing this error on a Mac, or with FG.

Let me know if I can provide more info :square:

Moon Wizard
November 24th, 2024, 05:28
@spliskamatyshak, @meadegendar, @Stargrove, @HuseyinCinar,

We just pushed a hot fix release (in the last half hour) that should help with maps that exceed the recommended sizes (>4Kx4K) causing increased lag. Please run a new Check for Updates on the Live channel, and let us know if you're still seeing an issue.

Regards,
JPG

Locotomo
November 24th, 2024, 08:38
I don’t think it’s only happening with big maps.
I tried it with several campaigns. D&D5e,Starfinder 1e, Savage Worlds. Pathfinder 2e.
I opened any rulebook, clicked on an image and reset the size.
Immediatly after, the memory usage started to grow immensely.
It also happened twice around 32 gb that the app crashed.

Locotomo
November 24th, 2024, 11:23
Still happening to me after the hotfix.
None of the hotfixes solved the memory leak, at least in my case :)

Baron Toth
November 24th, 2024, 11:42
For me, the latest hotfix was a step backwards. Aura Effects creates trouble again. When Aura Effects is loaded, moving the Paladin token with Aura of Protection creates movement lag and the occasional Mac spinning beachball. When I restart with Aura Effects off, the memory used is lower and seems to be stable.

pindercarl
November 24th, 2024, 13:08
I don’t think it’s only happening with big maps.
I tried it with several campaigns. D&D5e,Starfinder 1e, Savage Worlds. Pathfinder 2e.
I opened any rulebook, clicked on an image and reset the size.
Immediatly after, the memory usage started to grow immensely.
It also happened twice around 32 gb that the app crashed.

Reset the size how? Did you use the "Increase Size" image toolbar button? Or something else? Can you give a specific example: ruleset, rulebook, and image opened. Thanks.

meadegendar
November 24th, 2024, 14:33
Comparing to V4.5.10

V4.5.10 When loading into a Campaign, my memory usage only goes up to 1.7GB and stays around that when I move tokens without any issues. Load both official maps and custom maps and little to no memory increase.

V4.6 When loading into a Campaign using offical map, my memory usage jumps up to 2.5GB. Moving token around still a little laggy and memory usage does increase a bit. When loading custom map, memory usage doubles and moving token around gets laggy.

One thing I noticed as well as when I leave a campaign, the memory does not get release that was used when loading a campaign. At one point during my test I was using 10GB of memory just loading and basic testing. So when jumping around campaigns, memory usage tends to go up. I have to shutdown FGU to release all the memory.

For my production game I decided to stay at V4.5.10 until I feel V4.6 is working as well as the previous version.

Locotomo
November 24th, 2024, 16:21
Every time i reset the size , memory usage explodes.
Any system, any campaign.
62733

(this should be a reply to pindercarl's post from today 14:08, but I pressed the wrong button :P )

pindercarl
November 24th, 2024, 17:01
Every time i reset the size , memory usage explodes.
Any system, any campaign.
62733

(this should be a reply to pindercarl's post from today 14:08, but I pressed the wrong button :P )

Thanks. I've found the same error. There is some memory that images are not releasing on close. When the image size is changed using the buttons on the toolbar, the image is closed and reopened at the new size. I'm looking at the issue and we'll get a fix out as soon as possible.

spliskamatyshak
November 24th, 2024, 17:37
@spliskamatyshak, @meadegendar, @Stargrove, @HuseyinCinar,

We just pushed a hot fix release (in the last half hour) that should help with maps that exceed the recommended sizes (>4Kx4K) causing increased lag. Please run a new Check for Updates on the Live channel, and let us know if you're still seeing an issue.

Regards,
JPG
My gigantic maps seem to be working again. Thank you. I'll update after my session, which starts in ~30 minutes (so, in about 3 1/2 hours).

spliskamatyshak
November 24th, 2024, 21:34
My gigantic maps seem to be working again. Thank you. I'll update after my session, which starts in ~30 minutes (so, in about 3 1/2 hours).

My session went without a hitch. Maps worked fine and there wasn't any unexpected lag, which was never debilitating.

Thanks for the hard work!

I'll try and make an effort to participate in testing from now on.

HuseyinCinar
November 26th, 2024, 08:28
@spliskamatyshak, @meadegendar, @Stargrove, @HuseyinCinar,

We just pushed a hot fix release (in the last half hour) that should help with maps that exceed the recommended sizes (>4Kx4K) causing increased lag. Please run a new Check for Updates on the Live channel, and let us know if you're still seeing an issue.

Regards,
JPG

Put two tokens on a map that is only 215 KB. Still having problems dragging tokens, very laggy. The map is called Muddy Marsh so you can check it.

Also I can't seem to do the thing where if token movement is locked, you drag freely but button+drag moves like a player does (showing 15 ft distance traveled for example). Shift/alt/control, none activate that ability.

Uploading my campaign again for reference.

meadegendar
November 26th, 2024, 10:45
Ok, I updated back to 4.6 and set up a new campaign running Out of the Abyss. When I log in to the campaign and do some prep work, system memory stays around 2.5 to 2.7 GB. I went to resize the Velkynvelve-Player-Map and system memory shot up to 5.7GB.

Trenloe
November 26th, 2024, 15:41
Put two tokens on a map that is only 215 KB. Still having problems dragging tokens, very laggy. The map is called Muddy Marsh so you can check it.

Also I can't seem to do the thing where if token movement is locked, you drag freely but button+drag moves like a player does (showing 15 ft distance traveled for example). Shift/alt/control, none activate that ability.

Uploading my campaign again for reference.
The campaign doesn't contain the muddy marsh image, so can't test this. FG is looking for images/MAP- Muddy Marsh 20x16.jpg but it's not there.

Moon Wizard
November 26th, 2024, 16:36
We just pushed a hot fix version that should help with more of the lag issues. Please run a new Check for Updates.

If you're still having issues, you may need to disable ambient lighting or all lighting on maps you are using until we're able to fix more completely.

Regards,
JPG

Baron Toth
November 26th, 2024, 17:49
Definitely improved. With Aura Effects loaded, I'm getting a little hesitation, but it's usable. It's quite good without Aura Effects loaded.

HuseyinCinar
November 27th, 2024, 09:39
The campaign doesn't contain the muddy marsh image, so can't test this. FG is looking for images/MAP- Muddy Marsh 20x16.jpg but it's not there.

It was in my general images folder, I thought once I made a map record of it the image would be copied into the campaign folder too. No worries.

I'll test a bit with the most recent patch and report again. I'll try one of the maps in the campaign itself.

DevInstinct
November 29th, 2024, 20:52
We played yesterday and all players (2 on Windows, 1 on MacOS and 1 on linux with a windows VM) had multiple crashes. Only DM (windows) didn't crash. Worst were MacOs and the linux box, the later run by a tech wiz with 64GB raw/128GB swap which got filled up in minutes once the leaks started. All setups were working fine pre 4.5 for years. Tech wiz mentioned he had a video game before with the same issue and the game fix was to limit the number of cores to use on non-windows OS.

We weren't able to identify which action would start the leaks. We disabled ambient lightning, but it didn't change anything.
We do run our games with a lot of extensions, including Aura.

Fingersome
November 30th, 2024, 00:49
I have also experienced several crashes, and forced quits after the program becomes unresponsive in the newest version, prior to any hotfixes. Three at least, in as little as 15 minutes, which meant I had to cancel the session in question.

The new hotfix/s appear to have improved the stability, though I still had one instance where the program became unresponsive tonight, which also happened to crash discord, indicating there still may be issues related to this. Happened towards the end of the session, rather than nearly immediately.

Moon Wizard
December 2nd, 2024, 18:15
We just pushed a new hot fix update that should help with lighting lag on certain maps. Please run a new Check for Updates, and please continue to let us know if still having an issue.

Regards,
JPG