Emulator Issues #7079

VS2013 changes cause endless memory leak when opening GCPad pane

Added by mike_edwards15 about 6 years ago. Updated about 4 years ago.

% Done:


Operating system:
Issue type:
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


Your answers are there!]
[Leave the questions as they are and answer them in the next line]
[Remove lines written inside brackets [], but nothing else]

Game Name?

Game ID?

What's the problem? Describe what went wrong in few words.
Major memory leak

What did you expect to happen instead?
Configure controller settings/actually play games.

What steps will reproduce the problem?
[Don't assume we have ever played the game and know any level names. Be as
specific as possible.]
1. Open dolphin
2. Press GCPad button
3. Watch memory go up in task manager -- also dolphin freezes

Dolphin 3.5 and 3.5-367 are old versions of Dolphin that have
known issues and bugs, so don't report issues about them and test the
latest Dolphin version first.
Which versions of Dolphin did you test on?
Started at ~200, went up and found 299 is the last one that works before it causes memory leaking

Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
Yes, I use 3.5 to play with friends. But the error begins at 4.0-299

What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
CPU: AMD Phenom II x6 1055T
GPU: MSI GTX 560 TI Twin Frozr II Edition
Windows 8.1 Professional 64 Bit

Are you using the 32 or the 64 bit version of Dolphin?

Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
[Upload big files to a hosting service and post links here!]

[Do not attach files to this issue. Upload them to another site and
link here. Use for images and for logs.]


#1 Updated by mike_edwards15 about 6 years ago

I would like to change that it starts at 298! NOT 299.

#2 Updated by pauldacheez about 6 years ago

  • Status changed from New to Accepted

Seems to be a regression from the VS2013 changes, since there's nothing else that's after 291 and before 298 that would touch any code used by the GCPad pane. (Changing compilers affects all of the code, often causing minor issues, so this isn't surprising.)

Does it still explode if you don't have any controllers plugged in?

#3 Updated by Anonymous about 6 years ago

I think it will require a proper dump of the process at the time of the leak in order to debug, which might be challenging to obtain unless you're familiar with windows debugging.

helpful links:

we can set it up such that I debug your dolphin.exe remotely:

#4 Updated by Anonymous about 6 years ago

So, to create a good dump for this:
(This assumes you have gflags (part of debugging tools for windows), and your dolphin binary is called dolphin.exe)
* open cmd as admin
press windows key, type "cmd", press ctrl+shift+enter, press alt+y
* enable usermode stack trace:
"c:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\gflags.exe" /i dolphin.exe +ust
* run dolphin and trigger the leak
* create a dump
open task manager, right click on dolphin and "create dump file"
* The dump should be in %localappdata%\Temp\, upload it or send it to me somehow

  • turn off UST when done! "c:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\gflags.exe" /i dolphin.exe -ust

#5 Updated by Anonymous about 6 years ago

ok...this is only reproducible on debug builds of dolphin for me.

forcing _ITERATOR_DEBUG_LEVEL undefined for xstring file fixes some of the leaks...

#6 Updated by mike_edwards15 about 6 years ago

Hey godisgoverment, I'm not so good at debugging programs, I'm more of a hardware kind of guy. But anyways, You said above that you were able to reproduce the problem, does this mean you found the issue? If you need any of my help, let me know.

#7 Updated by mike_edwards15 about 6 years ago

I would also like let you know that it isn't just GCPad, it's also the wiimote menu, AND when I try to start up the game.

#8 Updated by parlane about 6 years ago

Mike, how were you running Dolphin exactly?

Was it a debug build? Were you using visual studio?

Was it just a plain release build ?

#9 Updated by mike_edwards15 about 6 years ago

It is just the plain release build. I could download visual studio, if need be, and run it through that.

#10 Updated by parlane about 6 years ago

Nope that's ok, it's just weird as we could only reproduce it in debug. :\

#11 Updated by mike_edwards15 about 6 years ago

I just feel like I'm missing a files or something, since I am using a near fresh install of 8.1. I don't have everything that I normally have on my computer.. But I can't think of anything else that would be missing..

#12 Updated by mike_edwards15 about 6 years ago

Any update on a fix?

#13 Updated by Anonymous about 6 years ago

This commit will fix memory leaks - but only in debug build. If you weren't experiencing the issue in a debug build, it won't help.

#14 Updated by knuckles500 about 6 years ago

Hey there. I just noticed this issue report now, but it seems that we both have the same exact issue going on. Have you looked at this thread?

For me, the problem was that I had a duplicate entry for a game controller under Device Manager. One entry was using an older version of the driver than the other. Previous versions of Dolphin never had a problem with this, it was only until the VS2013 changes that it became a problem. And as you said, I encountered the same issues at the same exact spots (GCPad, Wiimote, and game start up).

I fixed it by disabling the entry of the my game controller under device manager that was using the old driver. After that, everything worked as expected.

I hope this also applies to you.

#15 Updated by mike_edwards15 almost 6 years ago

Hey everyone, super late reply. I just tried the last two fixes up above^ and none of them seemed to work. I'd really like to use a stable version so I can play smash with my buddies, but I've been using 3.5.

More updated information, I at first thought it had to do with my being on Windows 8.1, but earlier today I installed Windows 7, and it still didn't work. I have a feeling it's hardware compatibility, here's the list:

Any further questions, please ask.

#16 Updated by mike_edwards15 almost 6 years ago

@knuckles, WOW THANK YOU SO MUCH THIS REALLY FIXED IT! I just got onto my 8.1 partition and did exactly what you said, and it FUCKING WORKED! I am so thankful right now, really thank you so much!

#17 Updated by JMC4789 about 4 years ago

  • Status changed from Accepted to Invalid

I guess this can be belatedly closed.

Also available in: Atom PDF