LWJGL / lwjgl

[LEGACY] LWJGL 2.X - The Lightweight Java Game Library.
http://legacy.lwjgl.org/
546 stars 207 forks source link

some minecraft installs not working under windows 10 #119

Open loordgek opened 9 years ago

loordgek commented 9 years ago

http://www.minecraftforge.net/forum/index.php/topic,32656.0.html

philipwhiuk commented 9 years ago

There's nowhere near enough information to debug this...

jikuja commented 9 years ago

Case 1

https://www.reddit.com/r/feedthebeast/comments/3hh80d/windows_10_nvidia_35560_forge_1013414921710_crash/

Summary: newest: nvidia driver set installed DVR which makes MC crash. Should be solved by downgrading/uograding driver is by disabling that DVR service.

Case 2

I suspect there is another problem with windows 10 + java 8u60 which can be fixed by downgrading java.

  1. http://support.feed-the-beast.com/t/pixel-format-not-accelerated/18085
    * version info N/A
  2. http://forum.feed-the-beast.com/threads/launcher-crashing-before-game-can-launch.108927/ * 9.17.10.4229, Card name: Intel(R) HD Graphics 3000
  3. http://support.feed-the-beast.com/t/the-launcher-wont-load-any-of-the-packs/18449/3?u=jikuja * GL info: ' Vendor: 'Intel' Version: '3.1.0 - Build 9.17.10.4229' Renderer: 'Intel(R) HD Graphics 3000'

    I'll update this thread if getting more reports.

4rz0 commented 8 years ago

I can confirm Case 2. Specs:

Log: http://paste.ee/p/QUtXa

CubeTheThird commented 8 years ago

I don't see how these are LWJGL issues. The first Case describes a java runtime crash, which would suggest other software is conflicting with the java runtime. The second case uses WDM drivers provided by Microsoft, since Intel has dropped support for Intel HD 2000/3000 series chipsets at Windows 8. I'm actually surprised the game runs at all with them, since Microsoft is notorious for it's limited OpenGL support. That being said, it is strange that different java versions affects whether the game can run. This however sounds like a bug with java, rather than LWJGL.

peterix commented 8 years ago

The second case is actually split. There are two issues.

The difference is the JRE version used.

CubeTheThird commented 8 years ago

I have seen several cases in tech support where users with 2000 and 3000 series (on Windows 10) suddenly can't play the game any more. While we figured the Microsoft driver updates were the cause, this may a more plausible explanation.

4rz0 commented 8 years ago

Oh yea, should have mentioned that. I'll experiment and see from which version of java on it stops working.

4rz0 commented 8 years ago

Updating to 1.8.65 or .66 (a hotfix) didn't fix the problem. Downgrading to the previous version, 1.8.51, and it works. So yea, 1.8.60 is the first version that gives the error.

CubeTheThird commented 8 years ago

Confirmed with many individuals in the tech support chat. Downgrading java or using native launcher works, for all Sandy Bridge chipset processors.

jikuja commented 8 years ago

Does mojang track this? This might be problem as soon as they want to update bundled JRE.

CubeTheThird commented 8 years ago

Every inquiry I've seen in regards to updating the bundled JRE version has suggested that, unless there's really a need to do so, it's not going to happen. That isn't to say it won't ever be updated, but there would have to be sufficient grounds for that to occur. I will bring this up on the bug tracker, and perhaps elsewhere, should an update be in the works, or occur. That being said, it isn't overly complicated to change the executable path to use an older installed version of java either.

CubeTheThird commented 8 years ago

I've just confirmed this for Arrandale (1st gen) HD graphics too. The user though was also having graphical issues once changing java versions was done. It is unclear whether this is solely an issue for that user though.

peterix commented 8 years ago

I guess we'll have to do the same thing in MultiMC. Bundle a known good version...

On Mon, Nov 9, 2015 at 7:19 PM, CubeTheThird notifications@github.com wrote:

I've just confirmed this for Arrandale (1st gen) HD graphics too. The user though was also having graphical issues once changing java versions was done. It is unclear whether this is solely an issue for that user though.

— Reply to this email directly or view it on GitHub https://github.com/LWJGL/lwjgl/issues/119#issuecomment-155145425.

peterix commented 8 years ago

Still an issue with 8u71: https://paste.ee/p/0t7Qb

TheGrimsey commented 8 years ago

Your graphics card doesn't support Windows 10. This is a well known fact you can find it anywhere. (And this isn't lwjgl's fault)

Solution: Get a new graphics card or find new drivers that support Windows 10

20 jan. 2016 kl. 08:36 skrev Petr Mrázek notifications@github.com:

Still an issue with 8u71: https://paste.ee/p/0t7Qb

— Reply to this email directly or view it on GitHub.

jikuja commented 8 years ago

Why those intallatons work with java versions older than 8u60?

peterix commented 8 years ago

@Subtleoliver That is not MY issue. I run linux exclusively and have a 980ti.

You might want to tell the possibly thousands of users of MultiMC affected by this. Tell them that their laptop/graphics card is obsolete and that they should drop hundreds of dollars on one that doesn't suck. Send them the money while at it :)

Now you might see the issue. It only started happening with a JAVA update. It is a purely software problem. The same drivers, OS and hardware combination works just fine with 8u25.

peterix commented 8 years ago

So, I blame Java, but see LWJGL as the place to fix this, because getting Oracle to fix anything seems like a huge uphill battle.

peterix commented 8 years ago

I'll dig into this once I don't have to quell other raging flames...

TheGrimsey commented 8 years ago

It works fine with Java 8u25 cause that's the version it's supposed to run. (It's packaged with h the launcher). If that's the problem then just run it with the version it's supposed to.

21 jan. 2016 kl. 02:38 skrev Petr Mrázek notifications@github.com:

@Subtleoliver That is not MY issue. I run linux exclusively and have a 980ti.

You might want to tell the possibly thousands of users of MultiMC affected by this. Tell them that their laptop/graphics card is obsolete and that they should drop hundreds of dollars on one that doesn't suck. Send them the money while at it :)

Now you might see the issue. It only started happening with a JAVA update. It is a purely software problem. The same drivers, OS and hardware combination works just fine with 8u25.

— Reply to this email directly or view it on GitHub.

peterix commented 8 years ago

This logic is all backwards. I am not a user. This is a LWJGL or Java bug. I am not interested in a workaround, I already know them. And walking users through these takes away from other things.

jikuja commented 8 years ago

Is lwjgl designed for java 8u25 or what is logic here? Please read support tickets before commenting and giving unsourced opinions about well known facts.

Here is one fact: https://bugs.mojang.com/browse/MC-297 the bug is known by mojang. Someone with hardware access should test this, write SSCCE and send it to intel/MS(theird driver) and oracle(their code caused regression, why?).

TheGrimsey commented 8 years ago

No minecraft is.

21 jan 2016 kl. 13:03 skrev jikuja notifications@github.com:

Is lwjgl designed for java 8u25 or what is logic here? Please read support tickets before commenting and giving unsourced opinions about well known facts.

Here is one fact: https://bugs.mojang.com/browse/MC-297 the bug is known by mojang. Someone with hardware access should test this, write SSCCE and send it to intel/MS(theird driver) and oracle(their code caused regression, why?).

— Reply to this email directly or view it on GitHub.

4rz0 commented 8 years ago

@Subtleoliver So what you want to tell us is to use a way outdated version of Java? There have been quite a few critical Java-updates released since then and Mojang still ships with a version from 2014, because obviously the newer versions would prevent many people from playing. This matter should be high priority, and a fix must involve not to "update your graphics card", but to fix the underlying problem in java trough whatever means.

TheGrimsey commented 8 years ago

That is the version minecraft "want" to use. It is packaged with the launchers for mac and windows. https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Det här e-brevet skickades från en virusfri dator som skyddas av Avast. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

2016-01-21 14:58 GMT+01:00 4rz0 notifications@github.com:

@Subtleoliver https://github.com/Subtleoliver So what you want to tell us is to use a way outdated version of Java? There have been quite a few critical Java-updates released since then and Mojang still ships with a version from 2014, because obviously the newer versions would prevent many people from playing. This matter should be high priority, and a fix must involve not to "update your graphics card", but to fix the underlying problem in java trough whatever means.

— Reply to this email directly or view it on GitHub https://github.com/LWJGL/lwjgl/issues/119#issuecomment-173576884.

oliver

peterix commented 8 years ago

Stating that Mojang does not fix the problem and employs a workaround adds nothing to the discussion. I think everyone already knows that. The workaround is IMHO not acceptable.

The way I see it, no actual investigation of the issue has been done. We have workarounds like replace your hardware or use outdated java versions.

The hardware in question has perfectly well working drivers on Windows 10 and supports OpenGL 2.1. It even works with Minecraft as long as you do not update java.

Someone with that hardware, a Java and/or native debugger and the required skill should replicate the issue and find out what the root cause is. Then it should be fixed or worked around in a way that does not compromise user security.

I do not have the hardware. Otherwise, I'd already have done it.

Spasi commented 8 years ago

I've been able to reproduce this on Windows 10, HD 2000 on a Sandy Bridge i5, driver version 9.17.10.4229. OpenGL (version 3.1) works on all JVMs up to 8u51. Starting from 8u60, the Intel OpenGL driver refuses to load. Specifically:

The machine I'm testing on also has a discrete Nvidia GPU which I had disabled for the above. Interestingly, when enabled with a secondary monitor attached to it, the ICD will again first try the Intel driver and when that fails it will load the Nvidia one successfully. This works even with no monitor attached to the Nvidia GPU.

I'm certain that this is not an LWJGL bug. The latest LWJGL 2.9.4 nightly build behaves the same and so does LWJGL 3 (which uses GLFW for window/context creation). So, there's something in Java 8u60 that the Intel driver doesn't like. I went through the release notes and all changes that made it into the u60 release, but couldn't find anything relevant.

In order to debug this, I changed the LoadLibrary("opengl32.dll") call (the ICD) to LoadLibrary("ig4icd64.dll") (the Intel driver). This failed with ERROR_DLL_INIT_FAILED: A dynamic link library (DLL) initialization routine failed. I then used Dependency Walker to profile the same LWJGL program running under Java8u51 and Javau60. The logs, up to loading ig4icd64.dll and after removing all hex values for easier comparison:

The 8u60 log ends with the DLL_PROCESS_ATTACH error. It looks like that the Intel OpenGL driver tries to call D3DKMTOpenAdapterFromHdc, which probably fails, then it returns 0 to the OpenGL ICD. As for JVM differences, what's interesting is the function Java_java_lang_ProcessEnvironment_environmentBlock which is only called in 8u60. I'll investigate more tomorrow and keep you updated.

jikuja commented 8 years ago

Java 8u60 seems to update sun.usagetracker.UsageTrackerClient class to call System.getEnv() which will call Java_java_lang_ProcessEnvironment_environmentBlock: https://gist.github.com/anonymous/100ec231a734cd97eca1

I wonder if calling System.getEnv() with < java 8u60 before opening display triggers same behaviour. Sadly can't test (yet) because I have not installed windows 10.

Spasi commented 8 years ago

Tried different JVMs:

Spasi commented 8 years ago

I wonder if calling System.getEnv() with < java 8u60 before opening display triggers same behaviour.

Tried with 8u51, it doesn't.

peterix commented 8 years ago

Are you running any antivirus? What happens if you disable it?

What really happens is still a mystery... and it happens inside the intel driver, by the looks of it.

See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682583(v=vs.85).aspx

LoadLibrary will call DllMain, which can return 1 or 0. 0 causes LoadLibrary to fail and return NULL . I can't run the driver, but I can look at what happens in DllMain.

... I wonder if I still have my old tools :)

On Fri, Jan 22, 2016 at 2:41 PM, Ioannis Tsakpinis <notifications@github.com

wrote:

I wonder if calling System.getEnv() with < java 8u60 before opening display triggers same behaviour.

Tried with 8u51, it doesn't.

— Reply to this email directly or view it on GitHub https://github.com/LWJGL/lwjgl/issues/119#issuecomment-173924223.

peterix commented 8 years ago

If I can get my hands on those files, that is :/

On Fri, Jan 22, 2016 at 3:16 PM, Petr Mrázek peterix@gmail.com wrote:

Are you running any antivirus? What happens if you disable it?

What really happens is still a mystery... and it happens inside the intel driver, by the looks of it.

See:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms682583(v=vs.85).aspx

LoadLibrary will call DllMain, which can return 1 or 0. 0 causes LoadLibrary to fail and return NULL . I can't run the driver, but I can look at what happens in DllMain.

... I wonder if I still have my old tools :)

On Fri, Jan 22, 2016 at 2:41 PM, Ioannis Tsakpinis < notifications@github.com> wrote:

I wonder if calling System.getEnv() with < java 8u60 before opening display triggers same behaviour.

Tried with 8u51, it doesn't.

— Reply to this email directly or view it on GitHub https://github.com/LWJGL/lwjgl/issues/119#issuecomment-173924223.

Spasi commented 8 years ago

Are you running any antivirus? What happens if you disable it?

No antivirus running. Also tried with Windows Defender disabled, no change.

I cloned the 8u60 repository and went through all commits since 8u51. I couldn't find anything that might be causing this (I have no familiarity with the code though). This looks more like a bug in the Intel driver to me. There's probably a good reason most major OpenGL applications (e.g. browsers) have blacklisted HD 2000/3000 on Windows 10.

If I can get my hands on those files, that is :/

What files do you need?

peterix commented 8 years ago

At least that library it is failing to load. Having a list of reasons why the DllMain could return 0 would help.

This might end up being too big of a task, simply because it could do a LOT of things in there. But I won't know until I look.

Graphics drivers in general employ some really dodgy heuristics for deciding just what to provide to a process... Maybe it's something silly like env variables or command line options not propagating to the loaded libraries.

Minecraft specifically does this to trigger some black magic in the intel driver:

https://github.com/MultiMC/MultiMC5/blob/develop/logic/minecraft/MinecraftInstance.cpp#L99 https://bugs.mojang.com/browse/MCL-767

CubeTheThird commented 8 years ago

Considering the issue only occurs with the very specific setup of Windows 10 + 1st and 2nd gen Intel HD graphics, it's possible the issue is introduced in either the specific Intel driver version Microsoft provides, or in some modification to the drivers they made.

Spasi commented 8 years ago

Found the "problem". The java.exe manifest changed in 8u60 to include support for Windows 10. The workaround:

Needless to say, this is an Intel driver bug/feature.

peterix commented 8 years ago

Posted this on their driver bug report forum: https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/607695

Hopefully, it will be noticed and resolved.

peterix commented 8 years ago

So, @Tahg did some investigation on that file and found that it calls GetVersionEx and then checks if the dwMajorVersion is 5 or 6 and fails if it isn't.

For reference, the structure and values GetVersionEx returns: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724834(v=vs.85).aspx

Windows 10 has dwMajorVersion of 10. GetVersionEx will get the version from the manifest, if it is present. Therefore if Java declares that it supports Windows 10, GetVersionEx will return dwMajorVersion 10. And the driver library fails to load.

CubeTheThird commented 8 years ago

I get the feeling Intel won't do anything about it, since those chipsets are EOL. It also sounds like it's intended (on their end).

peterix commented 8 years ago

If this is intended, it's malicious. Looks like a plain old bug to me :)

grum commented 8 years ago

I'll check if we have contacts at Intel, maybe we can get this fixed.

skotom commented 8 years ago

same problem after windows 10 installation can't play minecraft anymore :(

ghost commented 8 years ago

We obviously have the same problem with JOGL: https://jogamp.org/bugzilla/show_bug.cgi?id=1278

@Spasi Thank you for your accurate investigation.

peterix commented 8 years ago

The approach I'm going to use is create a native binary that replaces javaw.exe and does not declare the windows 10 compatibility.

On Tue, Aug 9, 2016 at 12:57 PM, Julien Gouesse notifications@github.com wrote:

We obviously have the same problem with JOGL: https://jogamp.org/bugzilla/show_bug.cgi?id=1278

@Spasi https://github.com/Spasi Thank you for your accurate investigation.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LWJGL/lwjgl/issues/119#issuecomment-238520157, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMaPmjURuIBcHg1nFfHFaknHEXFA1hDks5qeF0SgaJpZM4FlHbp .

wgaylord commented 8 years ago

Any progress on this. As you can no longer download older versions of java... only the newest version.... And I am afraid of accidentally updating java,

You would have to contact Microsoft about this not Intel. At windows 10 Intel stopped supporting Intel(R) HD Graphics 3000 so Microsoft made there own drivers for it to work. Or so I have heard.

CubeTheThird commented 8 years ago

Yes Intel stopped supporting 1st and 2nd generation HD graphics before the windows 10 release. If however your graphics drivers carry over during the upgrade process, they can be used as long as java doesn't identify the OS as being windows 10, which occurs with java 8 update 60 and newer versions. Prior versions of java do not recognize windows 10. Currently, the native launcher provided for the game bundles java 8 update 25, so using it should not cause this from occurring. If however newer versions of java are used, or the drivers become invalidated/replaced, the JVM will crash.

wgaylord commented 8 years ago

I use multimc and this affects other lwjgl games as well.

On Sep 11, 2016 8:41 PM, "CubeTheThird" notifications@github.com wrote:

Yes Intel stopped supporting 1st and 2nd generation HD graphics before the windows 10 release. If however your graphics drivers carry over during the upgrade process, they can be used as long as java doesn't identify the OS as being windows 10, which occurs with java 8 update 60 and newer versions. Prior versions of java do not recognize windows 10. Currently, the native launcher provided for the game bundles java 8 update 25, so using it should not cause this from occurring. If however newer versions of java are used, or the drivers become invalidated/replaced, the JVM will crash.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LWJGL/lwjgl/issues/119#issuecomment-246220393, or mute the thread https://github.com/notifications/unsubscribe-auth/ACCNyVfn8T9JvptNAzmHIHtoMCMHFAF1ks5qpK3GgaJpZM4FlHbp .

CubeTheThird commented 8 years ago

If possible, you can point the executable the application runs to the java bundled with the native launcher.

peterix commented 8 years ago

Or you can just download the older versions... they are on the Oracle website, you just need to register: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html

Or, I've repacked the relevant non-installer versions here: https://files.multimc.org/downloads/jre-8u51-windows-i586.zip https://files.multimc.org/downloads/jre-8u51-windows-x64.zip

On Mon, Sep 12, 2016 at 3:46 AM, CubeTheThird notifications@github.com wrote:

If possible, you can point the executable the application runs to the java bundled with the native launcher.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LWJGL/lwjgl/issues/119#issuecomment-246220887, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMaPuTLqEg_YaX8CeiHe8_a6z7BGrcZks5qpK7rgaJpZM4FlHbp .

Marcinosoft commented 7 years ago

Intel HD Graphics Minecraft Fix by MST

This patch fixes 'Pixel Format Not Accelerated' and 'No OpenGL context found in the current thread' issues related to Intel HD Graphics integrated video cards. Description of problem can be found here:

https://bugs.mojang.com/browse/MC-297 https://github.com/LWJGL/lwjgl/issues/119 https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/607695 https://help.mojang.com/customer/en/portal/articles/928791-problematic-frame-or-pixel-format-not-accelerated https://github.com/MultiMC/MultiMC5/issues/1283

This patch is dedicated to 1st generation Intel HD Graphics running under Windows 10 with Java 8u60 and newer. It is not required if you install Java to 8u51 and older or you are using Windows 8.1 and older.

There are some sources saying that this is Mojang fault, others says this is LWJGL fault finally others that this is Intel fault. In fact this is because Intel video card drivers are not fully compatible with Windows 10. If you do not want to launch MC under outdated Java there is also possibility to remove Win10 compatibility from Java binaries (java.exe and javaw.exe) manifest, using mt.exe tool. It is described above. But this must be done after every java upgrade, so this method is painful.

Root cause is inside Intel drivers, but of course we never receive official fix for it as long these graphic cards are End Of Life and Intel will not release updated drivers in future. I'm using 1st generation video card 'Intel HD Graphics' (PCI\VEN_8086&DEV_0046). Latest video driver is v15.22.58.2993 (8.15.10.2993) for 32-bit, v15.22.58.64.2993 (8.15.10.2993) for 64-bit. Drivers were released at 01/30/2013. Moreover those drivers are not dedicated to Win10, and to use it with Win10 small modification within *.inf is required. If anyone is interested in please visit this page: http://brenton.nom.za/forum/showthread.php?tid=82 Also to use Intel video configuration tool .NET 3.5 must be installed. How .NET 3.5 can be installed under Win10 you can read here: http://www.techgainer.com/offline-install-net-framework-3-5-windows-10-8-easily/

Anyway, as long it's Intel fault, and we will never have official fix, I did it by myself. Fix is dedicated to following video drivers mentioned above:

32-bit zip 32-bit exe 64-bit zip 64-bit exe

Fix tries to be generic so it can work with previous drivers as well (tested also with v15.22.54.2622 (8.15.10.2622) for 32-bit and v15.22.54.64.2622 (8.15.10.2622) for 64-bit WinOS). There is possibility that it will work with other Intel HD drivers, for example with 2nd and later Intel video cards generation, but I don't know. If anybody have the same issue and my fix doesn't help, please point me from where I can download drivers for it and I probably will be able to fix it too.

I attached patch works both for 32-bit and 64-bit systems. All you have to do is apply patch when game is not running. No need to reboot Windows, just launch game again and enjoy. Of course fix must be applied again if you will upgrade or change drivers, but as long Intel will newer release new driver for my card in future, I will never have to do it again.

Fix patches ig4icd32.dll file in case of 32-bit WinOS or ig4icd64.dll in case of 64-bit. This can be also applied on older WinOS like Win8.1, Win8, Win7, but for those it makes no sense. It won't crash anything but it fixes Win10 issues only.

You will be able to use Java 8u60 and newer to run any version of Minecraft under Win10. I tested it under Win10 Anniversary, with Java 8u112 (currently latest one) and Minecraft 1.11 (currently latest one).

This patch is not dedicated to Minecraft only. There may be also helpful for other OpenGL products which suffer like MC, but I do not know any others at the moment.

As I wrote it is generic patch but I'm not able to check if it works also for other drivers than mine. So if it doesn't work for your Intel driver, and your is also EOL, please write from where I can download it or simple attach only ig4icd32.dll or ig4icd64.dll file depending on which OS you are using (those files are placed within C:\Windows\system32\ folder), and I should be able to fix it too.

Thanks to Spasi and peterix to help me figure out how to fix it. Your hints were very helpful.

PS. Fixes were done using 'diablo2oo2's Universal Patcher 2.26.1'. I know that some AV may treat it as some kind of malicious software, but it is false-positive. If you don't believe me, just don't use it. I won't distribute prepatched dll files as long my fixes are generic.

Regards to all MC fans, MST

Intel.HD.Graphics.Driver.Win10.32-bit.&.64-bit.Fix.by.MST.zip