skmp / reicast-gamebugs

issue tracker for game bugs
0 stars 0 forks source link

Memory leak and crash in Gundam Renpou vs Zeon DX #69

Open skmp opened 5 years ago

skmp commented 5 years ago

From @leonier on February 10, 2014 4:24

edited by @skmp

As a first test, we need to re-test that this is an issue with the current master.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/60867789-memory-leak-and-crash-in-gundam-renpou-vs-zeon-dx?utm_campaign=plugin&utm_content=tracker%2F91046168&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F91046168&utm_medium=issues&utm_source=github).
skmp commented 5 years ago

From @leonier on February 10, 2014 4:35

Running this game using reicast r6 in Huawei HW-01E and my Windows PC using ANGLE Gles emulator. The game crashes running the opening demo for the third time in Android, said Soft reset requested and hangs in windows. And there is serious memory leak running the game with dynarec enabled in both platforms.

skmp commented 5 years ago

From @LoungeKatt on February 10, 2014 4:56

That sounds like it may be the game. Have you tried ripping a new copy?

skmp commented 5 years ago

From @leonier on February 10, 2014 5:4

The crash may came from the copy, however the memory leak seemed to be a real issue. I will post screenshots tonight, there is a lot of logs about clearing dynarec cache at different addresses.

skmp commented 5 years ago

From @leonier on February 10, 2014 9:49

This is the memory usage when I started to play. clipboard03 And about half an hour later, the memory usage skyrocketed to 512 mb and the emulator crashes. clipboard04 On another PC, it could even leak more than a gigabyte of memory. giga

skmp commented 5 years ago

From @leonier on February 10, 2014 11:18

This is an unimplemented opcode crash when running the game's demo scene, with or without dynarec. clipboard01 clipboard02

skmp commented 5 years ago

Looks like some kind of streaming textures. I'll check on my GC collection code for them

skmp commented 5 years ago

From @helloray on February 13, 2014 8:29

@skmp, in function RenderFrame(), do we need to killtex() frequently? I think killtex() is rarely being called,as a result, the Texture cache is always increasing.

bool RenderFrame() { ......................... if (KillTex) { void killtex(); killtex(); printf("Texture cache cleared\n"); } .................... KillTex=false; }

skmp commented 5 years ago

Old textures are cleared up (by invalidations usually, I might have a late-pass clean like on later pc versions too). The killtex is there to force the clear, to detect memory leaks. I think its tried to 'b' or something, you can press it while the game is using too much mem and see if it frees it.

On Thu, Feb 13, 2014 at 10:29 AM, helloray notifications@github.com wrote:

@skmp https://github.com/skmp, in function RenderFrame(), do we need to killtex() frequently? I think this function is rarely being called,as a result, the Texture cache is always increasing.

bool RenderFrame() { // ......................... if (KillTex) { void killtex(); killtex(); printf("Texture cache cleared\n"); }

//.....................

KillTex=false;

return !is_rtt;

}

— Reply to this email directly or view it on GitHubhttps://github.com/reicast/reicast-emulator/issues/252#issuecomment-34957476 .

~skmp

skmp commented 5 years ago

From @leonier on February 14, 2014 10:47

The key to call KillTex is 'k' and only in Linux and SDL driver. it's absent in the Windows driver. However it seems that even after KillTex is called, most of the leaked memory is still not freed.

clipboard01

skmp commented 5 years ago

I guess i'll work into this for r7. Thanks!

skmp commented 5 years ago

From @leonier on August 24, 2014 5:7

I confirmed that there are still leaks after https://github.com/reicast/reicast-emulator/commit/f1ef4877b8d6ca20f4b102e19320b2e5cb1e739f It seemed that leaked memory is not necessarily of textures memory. clipboard01

p.s I've heard some games using the same engine on PSP (Gundam vs Gundam Next Portable) uses a very aggressive drawing method that make PPSSPP slow.

skmp commented 5 years ago

@leonier is this still happening?