mojira.dev
MC-1408

Javaw.exe keeps running after closing minecraft.

There has been a possible (prob 100%) fix
Many others who had this problem.
http://www.minecraftforum.net/topic/1405977-minecrafts-java-process-will-not-die-on-closure-or-at-all-for-that-matter/??

Basically what happens is the following.
1. Start minecraft
2. Close minecraft
3. check Task Manager
4. and the javaw.exe continues to run. If you try to terminate it (both End Process and End Process Tree) it will either not do anything at all, or it will say "cannot terminate process" Also, using other 3rd party programs to terminate this process do not work either.

I originally thought this was a Java issue. So I reinstalled Java, tried previous versions of java (1.6) as well as trying other programs that have java.
Other programs that use Java have not shown this memory leak.

I thought it may be a driver issue with perhaps ATI cards, since I saw many people with ATI cards that seem to have this problem. It turns out that some Nvidia cards also seem to have this problem.
Other things I have tried are the following

1. Clean update still causes the problem.
2. Using a different launcher still causes the problem.
3. Using batch files still causes the problem.
4. Whether it Crashes, You click the x button, you press terminate the process, or you click the Quit Game button, it still causes the problem.
5. Deleting 1.2.5 minecraft that for some reason gets downloaded in force update still causes the problem.
6. Clicking End Process Tree or End Process still causes the problem.
7. Using mods or not still cuases the problem.
8. Having Java 7 Update 5 or Java 6 or Java 7 Update 3. It doesn't matter. It still causes it.

It was discussed on the 1.3.1 talk on the wiki, and I believe it was also a bug report on the 1.3.1 Bug list, but was removed by someone.

POSSIBLE FIX:
I initially did not think about this, but after my problem was gone, I realized I uninstalled K9.
Dean did a good job in testing and confirming this, and now many others have started to confirm.

Since it seems that a good handful are having this problem, and finally getting it fixed here, I think this article should be archived for future reference.

K9 Causes your computer to basically not shut down javaw.exe after you close minecraft. Simply remove the software to get rid of the problem. Perhaps someone request to K9 to fix it?

Linked issues

Attachments

Comments

CubeTheThird

Firstly, unable to reproduce. My javaw.exe terminates with Minecraft.
Secondly, javaw is only used when you run minecraft from the .exe file. Using a .jar, or running it from a script avoids this problem completely.

Daniel Ahn

1st. This isn't applicable to everyone. Just a variety of people.

2nd, the same thing happens when you run via .bat or .jar

3rd. It is able to reproduced for those who have this problem, if you never got this problem in 1.3.1 this doesn't apply to you. It may be problems with OpenGL or whatnot, but I've tried updating drivers and that doesn't seem to do anything else either.

Andreas Backx

I'm also getting this and because of this I am unable of playing the game like I used to. This bug started in 1.3 and became very annoying, since then I haven't been playing the game anymore. The launcher doesn't matter, .bat file, MagicLauncher, default launcher, all the same.

Java version: 1.7 Update 9
OS: Windows 7 Home Premium 64-bit

I tried everything this guy did multiple times and no difference. Please give this some attention!

Also give this a higher priority!

Ryan Larkin

This bug affects my Mincraft installation on two different Windows 7 64 bit computers. It doesn't matter if we use a clean update or not. The version of Java being used doesn't matter. Other Java programs do not have this problem. It first appeared for us when we upgraded to 1.3.1 (we don't install the snapshots) and has persisted through 1.4.2 at the time of this writing. The memory used by the inactive, unclosable javaw.exe instances is not freed up until the user either logs out or restarts. This memory use kills my system that has only 4MB of ram.

Daniel Ahn

My hypothesis is that there's something in the code that is faulty, allowing this to happen to certain systems. I've heard from some people that if the code isn't organized properly, it's possible to happen.
So far there's been a trend in 64-bit systems. Maybe it may be a factor?

Also, another note is that these inactive, unclosable java instances sometimes free up, when space is running out. I'm not 100% sure on this though ( could test by running a whole bunch of memory hogging applications to see if these javaw.exe will close by force).

Andreas Backx

It isn't in every 64-bit system though, my brother hasn't come across it yet and he got the same operating system then I do. Maybe something with the drivers but I doubt it, well here are my specs in case it may help:

  • CPU: Intel i7-2600 @ 3.4GHz (http://ark.intel.com/products/52213)

  • Memory: 8Gb DDR3 RAM

  • DirectX: 11

  • GPU: nVidia GeForce GTX 560

  • OS: Windows 7 Home Premium 64-bit

  • Java: 64 and 32-bit Java 7 update 9 and JDK 7 update 9

Anything else needed?

Andreas Backx

I have updated to Windows 8 Pro, still the same issue.

Daniel Ahn

I've also heard that this could mean something with the OpenGL driver in the graphics cards, but the problem is that this is happening with random graphics cards, and even then they aren't consistent either.

What was the manufacturer of your computer?

Mustek

I've had this issue from time to time, it doesn't always happen though.

nVidia GeForce GT555M (latest beta drivers)
Intel i7 2nd gen
Java 7u10 x64.

Andreas Backx

My manufacturer is Hewlett Packard (HP) but I changed the GPU to nVidia GTX560 and I was having the issues with Minecraft before I changed my GPU. I'm also running the latest beta build (310.33) nVidia GeForce.

Oliver Okum

It happens for me too.

Specs:
Dell XPS 15 L501x
i5 460m w/ HD4xxx integrated + Nvidia GT420m via Optimus
8gig ddr3
Win7 x64 preconfigured by Dell.
Java 7 x64 latest update

I noticed that it doesent happen if i run Minecraft from integrated graphics, instead of using the Nvidia Graphics via Optimus.
I also noticed it does happen kinda random. Im not able to reproduce it in any way.. :/

Daniel Ahn

Interesting.
I'm using HP manufactured product (ENVY 14) as well
my Graphics card(if any use) is Radeon HD 6630M

Andreas Backx

I found out that when I play Tekkit the bug doesn't appear.

Adam Dalgleish

I get this bug too. Javaws stay open and can't be closed after the game crashes when I cancel joining a server and click multiplayer again. Perhaps the bugs are linked.

Something interesting I found out: when the javaw is open, you are not allowed to edit bin->minecraft because it is "open in another program". So maybe it is not just javaw glitching - when the game crashes, parts of it stay running in an unclosable way?

Adam Dalgleish

Also is there a way that the poster can update this report to say it is still happening in 1.4.4pre? Because it is. And I'd hate to think that it will be ignored because 1.4.2 reports are now "obsolete".

Joshua Lawrence

This happened to me after I started using MagicLauncher, anybody else? I think I saw some other people who have used it had this problem.

Daniel Ahn

@Adam. Will Do

@Joshua I've never used Magiclauncher 1.3.1+

Kondrik

Has everyone tried updating their graphics card drivers to the latest version? I was having this problem for quite a while, but then I ran the automatic driver updater for both AMD(ATI) and nVidia (I have 3 cards total, 1 AMD, 2 nVidia). After the driver update completed, I no longer had the problem.

AMD Updater - http://support.amd.com/us/gpudownload/windows/Pages/auto_detect.aspx
nVidia Updater - http://www.nvidia.com/Download/Scan.aspx

Daniel Ahn

Didn't work for me.

Andreas Backx

@Kondrik I'm running the latest nVidia Beta Driver and didn't update my other drivers since I bought my pc.

Adam Dalgleish

Could all those with this bug please see if this bug also happens: https://mojang.atlassian.net/browse/MC-2824#comment-20990 For me it seems like they are linked, it would just be really helpful to know if they are part of the same issue or not. (Even you don't get the clicking multiplayer crash, do you get the indestructible java.exe if you try using a batch file to make a log of Minecraft closing incorrectly? And does it crash System 32 for you too?)

Andreas Backx

@Adam Dalgeish Yes, I am getting that bug. I quit a server and click on Multiplayer and the game crashes.

Daniel Ahn

Yes this happens to me as well. If you play on a server for about 5 minutes at least, then when you disconnect and reconnect, it will fail to connect to any servers and if you click cancel and click multiplayer again, then it will crash.

Adam Dalgleish

@Daniel That sounds maybe like a more complex route to the same problem. Does the crash also happen for you just when clicking cancel on "connect to server..." then "multiplayer" without having being on a server beforehand?

Whatever this bug is, it seems quite a tricky one to pin seeing as it looks like we can't take crash logs... Maybe if I take my entire PC to Minecon Dinnerbone or somebody can have a look at it. 😉

Andreas Backx

@Adam I would like to do that too if they pay the expenses. The trip isn't much (Brussels -> Paris), lol.

Daniel Ahn

Basically how mine crashes is.
1. Play on a server for 5+ minutes
2. Disconnect
3. Click Multiplayer
4. None of the servers connect (or tries to connect to one)
(If i click refresh here, it'll also crash)
5. fails and leads you back to the main menu
6. Click multiplayer and it crashes.

It doesnt matter if it fails, or if i click cancel. It crashes when i click multiplayer nevertheless

Daniel Ahn

This still happens with 1.4.5

I really think a moderator should look into this.

If you really want to go all out, buy a HP Envy 14t-2000 (beats edition)
and try minecraft out and see if it does it 😛

Daniel Ahn

Could someone test this?

"Uninstall Java completely and get the latest build of Java 6. --Nathan2055 20:50, 15 August 2012 (UTC)"

Andreas Backx

I have re-installed Java multiple times, it doesn't make any difference. But I'm not having the problem with Tekkit.

Daniel Ahn

Reinstalling the latest java gives you Java 7.

What I'm asking is to reinstall the latest build of java 6

Also. Tekkit causes the same problem for me.

Andreas Backx

I have tried Java 6, there was no difference.

elvin pop

It happens to me to, but it only happens if i play long 1hr+ or play multiplayer, i have windows 7 32bit so i only have 3gb of ram, i can play like 5 times before i need a restart

Daniel Ahn

People with this error shouldn't be needing to restart.

If your memory is full and you start a new minecraft session, one of the javaw.exe's will close by itself.

elvin pop

actually if i try to start new session, it either crashes or doesnt open...

sean novak

This is not a MINOR issue. This happens 1/4 loadings of minecraft in vanilla or 3rd party launchers.

Java.exe will not "die" when asked to close of End in task manger.

Please look in to and FIX this issue!

Daniel Ahn

I actually dunno how to make it a MAJOR issue.
I'm not allowed to edit that section after this was posted..

CubeTheThird

As far as I know the priority setting cannot be set nor changed, and defaults to minor.

Daniel Ahn

As of now, This problem is fixed on my computer. I do not know how it got fixed, all i know is that it all of a sudden fixed. No java updates, no mc updates. Just fixed for some reason lol.

Peter Lillington

I also get this problem, and I disagree with the Minor catagorisation. It's probably only a minor bug if it doesn't happen to you; if it causes you to have to regularly reboot your computer to deal with it, it's pretty major.

I have 5 PCs, 3 of which are affected. Those three are different, two running W7 x64, one XP x86. Jave v6 and v7 both affected. Vanilla MC, no mods, apart from one PC using Optifine.

I also see the correlation with Multiplayer MC freeze/crash. The other thing I noticed, may not be important, is that since 1.3 the MP server ping is incorrect. It's always a poor ping, over a second, even if it is a server on my LAN.

Daniel Ahn

1. I did have this problem. It does not persist for me anymore
2. I do not have rights neither do mods have the right to make it a "non-minor problem"
"[Mod] CubeTheThird added a comment - 04/Dec/12 5:13 PM
As far as I know the priority setting cannot be set nor changed, and defaults to minor."
3.

Peter Lillington

So, what didn't you do to fix it? I want to not do it too. 🙂

Adam Conway
Brad Bonanno

My friend has this problem and has tried everything so far. The only thing that works for him is to reboot, which is difficult since it isn't just his computer and his parents get mad at constant rebooting. A fix for this in the next update would be great

Michael Cunningham

Also having the same issue. I have tried quite a few different things to fix. The only thing that stops the process from running is rebooting my computer.

Andreas Backx

For some reason I am not getting the bug anymore, I'm now running the latest nVidia Beta driver 310.70, didn't update Java or something else.

OmgLolOmgLol

So is this ever going to be fixed? I've been having this issue for like 4 months now, and all this constant rebooting is driving me nuts!

No new updates for my graphics driver, and java is updated to the latest version....no fixes yet?

Adam Conway

Yeah, this is annoying the hell out of me.
Updating to latest nVidia beta drivers hasn't helped.

Andreas Backx

This isn't a minor bug because a minor bug is a bug where a simple workaround is possible. There is no workaround here.

Michael Howard

I actually have a possibly helpful update. When I tried to kill the process using MultiMC's latest version, it actually reported the process number that it couldn't kill. The error says: "Failed to kill process 5080 (error 5: access is denied)" I'm not sure if the process number is unique to me, or if it can be used to trace the bug. We also know from that error that it's an access issue. So... progress?

Adam Conway

https://mojang.atlassian.net/browse/MC-60
There has been a fix found. It's related to the game's code for sure, as the mod I mentioned there fixes it.

Dean Baset

Just a quick question to those having the problem

Do you use Blue Coat K9 Web Protection? I am having this problem on my laptop too, and no one else is having the problem. (I have K9 on my desktop and laptop).

I haven't tried uninstalling K9, as it is my gold for browsing the internet.

Tails

Removed the "priority notice" from the description, since it's no longer an issue.

Daniel Ahn

I think Dean Baset may have one of our answers.
I had K9 in the past, and I believe my problem stopped after removing it.
I cannot confirm that it is the source of the problem, But it's quite probable that it is.
Dean if you can, try to test it.

Dean Baset

My current theory:

K9 Web Protection is blocking Javaw.exe (or Java.exe) from continually sending data from the Snooper added in 1.3.1.
Java asks for a little bit of memory from the computer to use to send the information, but K9 blocks Java from connecting to the internet because it thinks it is sending too much information over the internet. Now there is an I/O that cannot be filled, because K9 is blocking Java from connecting to the internet. And now you can't kill the process because it has the I/O that you can not get rid of.

I will try the following test over 3 days:
1st day: Disable snooper - Didn't work
2nd day: Enable snooper, disable K9
3rd day: Disable both

If Minecraft works properly over these 3 days, then it is K9's fault, not minecraft's.

Also, it would be helpful if someone could go into the code and see if minecraft continually sends information from the snooper, as that might be counted as a threat by K9 Web Protection.

Day 1 was unsuccessful. This means that it is something else that K9 is blocking (If it is K9's fault)

EDIT:
Edited the main idea of the theory to explain why it effects Java, not just the snooper.

EDIT 2:
Added day 1 results

Community consensus says that uninstalling K9 works.
It definitely isn't the snooper, perhaps they added something else that may have changed it. Maybe the Client/Server merge caused it?

OmgLolOmgLol

Hmmm...I think you may have found the problem. I have K9 installed, and the problem did only start after snooper was added. Im gonna try to change the K9 settings to see if it fixes it too.

Dean Baset

@unknown, @unknown Do you use K9 too?

Adam Conway

K9 was used by me, I also had the issue. Thanks Dean for testing this.

Dean Baset

1st day's testing is over. Results in previous comment

Peter Lillington

K9! Wow, I think you are onto something. 3 of my 5 computers have K9, and those computers are affected. I'd give this a very high probability of being the cause, particularly as we'd checked off just about every other option...

Jason Cannon

Just confirmed, it is the cause. I uninstalled K9 after stumbling on this thread and it suddently started working great. Great catch Dean. Hopefully someone can figure out a way to keep K9 on, and keep minecraft working. I like the comfort that an internet filter provides.

Michael Cunningham

Was also using Bluecoat K9. Uninstalled it and the issue went away. I did find an alternative way to filter internet using OpenDNS admin filters. Its not quite as active in protection as K9, but it is still better than most everything else that is out there. Plus it runs through your DNS portal so any device that uses your router will be filtered.

Daniel Ahn

I added the fix to the topic.
Hopefully many people will find this helpful.

Peter Lillington

I'm going to raise this issue with K9.

Peter Lillington

I got a reply - I haven't tested yet but I will let you know once I do (or, if anybody else tries it, please let us know). I think it's probably a generic "upgrade to the latest version" reply, but still...

Thank you for contacting K9 Support. We now have an updated version of K9 available which should address the issues you have been experiencing. You can download the new installer by clicking on this link:

http://www.k9webprotection.com/download/k9-webprotection-beta.exe

Please run the installer, reboot your computer and then try browsing normally. Please let me know if you continue to have your issue, or if you have any other problems.

Andreas Backx

Same, don't have the problem when I uninstalled it. Weird!

Dean Baset

Added a little summary to the end of my previous comment

Dean Baset

I just got the new version of K9. I now receive an error and minecraft exits the server every once in a while (3-5 min of gameplay), but it no longer will create an un-terminatable Java process. The error is uploaded as Error.png

Dean Baset

I just contacted K9 about the new issue. I will paste in the response when I get one.

Ans Farooq

I still have this issue since 1.3.1, and I don't have K9 on my computer.

MS Windows 7 64-bit SP1
Intel Pentium T4300 @ 2.1GHz
3GB RAM
Mobile Intel 4 Series Express Chipset Family

It's a laptop, but that shouldn't make any difference to the issue.

m.algoe

I ran in to this problem as well. I tried updating to the K9 beta version as suggested above. Now I can log in on the server but keep getting "java.net.SocketException: Software caused connection abort: recv failed" after just a few seconds.
I opened a support case with K9. Will update here when i get a reply.

ArcticSpyder

That would be a ram leak :/

Peter Lillington

I have a support ticket in with K9 - jumped through the hoops, wireshark, user initiated BSOD etc. Now waiting for them to get back to me - if I hear more I will report back.

EvilSeph (Warren Loo)

As far as I can tell, this issue is caused by some other software and not Minecraft itself. As such, I am marking this as Invalid.

Ans Farooq

I have this issue right now and it's not caused by any software. Since the first thing I downloaded on a brand new PC was Minecraft, no other software of any type (except the Windows 7 OS itself).

Dean Baset

I gave them SharkWire info and a Memory Dump file. Yeah. After a few months, they reply with this.

"There is a good chance this will not be fixed for a long time. I am sorry but I have no dates other than the fact that Minecraft was broken with the old version of K9 and that it is still broke in the new version. We do have it logged and hopefully in the future it will be resolved. When it is I will contact you."

OmgLolOmgLol

Wow...That freaking sucks. That means that Mojang doesnt really care about this severe bug, and that I have to keep relying on 3rd party mods to fix this problem...

Adam Dalgleish

Well, it is K9 causing the problem so Mojang shouldn't be the ones altering their perfectly good code to get around it. I just uninstalled K9 seeing as it is the thing that is broken and is unlikely to be fixed soon.

Peter Lillington

Ah, right, that's what I gave K9 too. Why do they make you jump through hoops if they're not even interested in fixing the problem?

Mogsington

Not fixed or resolved.
I don't have K9. I do have Win7 64bit, Java 7-45 running.
The launcher process will not close after minecraft closes.
It's not really good enough to say "It's K9". What is K9 blocking? Is it Java trying to make a network call before closing or Minecraft?
Unresolved.

Tails

Please use the Mojang Support Center for technical support issues.

Mogsington

Aw man. Yet another sign up page? It's hanging on an RMI TCP Connection to 10.100.1.6 which is the local network, so it ain't gunna find anything.

Christopher Chase

I have the problem with java instances not exiting after quitting minecraft. And I have K9 installed. I updated k9 and the problem is now fixed (the java processes associated with minecraft exit).

To update k9 I had to select in the K9 admin page: "Other settings" -> "Update to Beta". Then k9 was able to update to version 4.4.268 (seen under "k9 Update").

Without the Update to Beta option selected, k9 would not update to the 4.4.268 version.

John Caskey

From what I can tell, it seems to be the launcher that won't die, not minecraft.

If you've got both running, you should notice you have two of javaw.exe running in the process tab. After closing the launcher, the associated process doesn't see to die with it.

You can kill the process and minecraft will continue running just fine, and seems to terminate correctly afterward. You might need to be on an administrator account to kill it though.

Lucas Wolschick

Confirmed for 1.7.2; not sure on newer versions.

Dae

I have noticed something very similar, but in order to avoid posting yet another duplicate thread, I have decided to comment here.

When I close Minecraft (with either the X button or the "Quit Game" button) it continues to stay open. However there are a few key differences in this situation.

1. I can close javaw.exe in the task manager.
2. The process hogs ALL of the available CPU.

#2 is a big problem because it easily overheats my system within a matter of minutes, as well as slow it down greatly.

Daniel Ahn

(Unassigned)

Community Consensus

client, java

Minecraft 1.4.2, Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.7

Retrieved