VOGONS


First post, by Niverive

User metadata
Rank Newbie
Rank
Newbie

I've just started using dgVoodoo2, first game I tried using it on is Legend of Heroes: Trails in the Sky 3rd. After awhile, between 20-60 minutes my game crashes, I ran the debug version last time and I got the following message when it crashed.

79482 7133.098029 18168 ed6_win3_DX9.exe [dgVoodoo] ERROR: Direct3DSurface9 (586CABA8)::Initializing: Out of memory. WEIRD.
79483 7133.098060 18168 ed6_win3_DX9.exe [dgVoodoo] ERROR: Direct3DDevice9 (1A3A8FE0)::CreateOffscreenPlainSurface: Creating plain offscreen surface has failed.

I'm curious if anyone has any insight on why this could be happening.

0NikfMe.png

JkmHk4n.png

oQiKy5F.png

Last edited by Niverive on 2022-11-23, 06:34. Edited 1 time in total.

Reply 2 of 8, by Niverive

User metadata
Rank Newbie
Rank
Newbie

First off I want to say thanks for the work you do Dege, because of people like you we can do so many cool and wonderful things with PC gaming. I recently discovered dgVoodoo2 through Special K as I'm always trying to get the best experience possible when gaming, I'm also just a nerd who likes to tweak and play with things.

After you mentioned 2GB limit I decided to do more testing, I did apply the 4GB patch and I decided to start watching my RAM usage. The game starts out around 900MB and slowly climbs, I've been able to crash the game faster by doing battles, after each battle the RAM usage climbs like an avg of 50MB. I haven't crashed quite yet but I'm still going and I think it will eventually crash again. There is also a lot of error spam at the end of each battle, see below.

1017 1382.257515 8440 ed6_win3_DX9.exe [dgVoodoo] ERROR: Direct3DSurface9 (31CE8B98)::Lock: Invalid call, trying to lock an unlockable surface.

y8zHhMq.png

Reply 4 of 8, by Dege

User metadata
Rank l33t
Rank
l33t

Thanks!

I had a quick look at it. That error message is normal, it comes from the D3DX9_43 library when figuring out how to load data into a texture.
I could only play a little in the opening scene, walking around various rooms and indeed I saw the memory usage increased but also decreased occassionally.
I also tested it with MS D3D9 and got the same behavior, altough it ate less memory.

So, for now I don't have an idea. Maybe could you give me a savegame for a location where memory usage increases heavily, to do tests with that when I have some more time?

Reply 5 of 8, by Niverive

User metadata
Rank Newbie
Rank
Newbie

Sure, the fastest way I've been able to crash the game is by going in and out of this room and killing the ghost mob while using Turbo Mode, though it still takes about 30 minutes. In case it's any help the game doesn't crash normally and doesn't crash when using the new DXVK method to go from DX9 > VK > DX11, the memory usage seems to always stay under 1GB. I haven't tested it but I would be surprised if all three games aren't susceptible to the same issues since all three games were updated at the same time with a DX9 client, this game is originally a DX8 game. I didn't start trying to use dgVoodoo until the third game.

https://drive.google.com/file/d/1MOhPe_e6afBw … ?usp=share_link

Reply 6 of 8, by Dege

User metadata
Rank l33t
Rank
l33t

Thanks for that, indeed, I found a stupid memory leak in the code. I played the game for a while, killed the ghost mobs countlessly in turbo mode and the memory usage now seems to be steady.
But just to make sure, could you test the fix yourself plz?

http://dege.fw.hu/temp/dgVoodoo_fixes_to_test_2_79_3.zip

Reply 7 of 8, by Niverive

User metadata
Rank Newbie
Rank
Newbie

I tested it for a bit and it does indeed seem to be fixed, still hovering just under 800MB after like 15 minutes of testing.

Thank you so much, I didn't expect you to go out of your way to fix something for a niche game like Trails, but I assume this could end up benefiting dgVoodoo in more ways than just this game, but either way I still appreciate it.