Odd pixel format not accelerated problem Win 10

If it’s failing in the IDE but works not in the IDE and you have confirmed that the classpath is the same (You can actually dump this value in your main() method if you like)… then it must be that the IDE is running a special Java or something.

I can’t think what else it could be.

1 Like

this is what i am thinking. But versions seem the same. I will keep cracking on. Its a real spanner in the works and quite frankly something i haven’t had problems with in the past. Even POS natives and all sorts of third party stuff that should have caused issues.

Also why would a different classpath result in different supported pixel formats. That seems to indicate that perhaps the exception is misleading.

None of it makes any sense so we grasp at the things that can be different about where one .class file is running versus another. Different Java.exes. Different classpaths. Different DLLs. Different arguments passed to java.exe. That’s it. One of those things must be different… else the two environments would be identical and everything would run fine.

Unless the IDE is doing something very strange with how it runs Java.

My experience with IDEs is that they sometimes use their own compilers and it messes things up. (I always turn this off in Netbeans first thing because their compiler sucks.) I don’t know about what IDEA uses and I never had a problem running JME stuff in the few cases I tried. (It wasn’t Windows 10, though.)

1 Like

Well I’ve seen some stacktraces of idea (try it out yourself), it adds some own code (launching?) along with some gradle routines iirc.

Could it be that in that configuration jme tries to use the iGPU which does not accelerate that Pixel format? (I guess the IGPU should work fine but I remember that jme used to have Problems deciding which gpu to use)

2 Likes

Can you try to launch my editor on your windows? It works on lwjgl3 and was built on Intellij IDEA.

Hey ! I’m getting exactly the same exception using Intellij IDEA. The fact is that I could run my project for a while until this error came from nowhere ! (Or maybe not ?)

DxDiag report

------------------
System Information
------------------
      Time of this report: 1/28/2017, 15:03:12
             Machine name: DESKTOP-B3FREMA
               Machine Id: {CEB001D2-BF6C-4276-8ADE-BC5251927599}
         Operating System: Windows 10 Éducation 64-bit (10.0, Build 14393) (14393.rs1_release.161220-1747)
                 Language: French (Regional Setting: French)
      System Manufacturer: To Be Filled By O.E.M.
             System Model: To Be Filled By O.E.M.
                     BIOS: P1.80
                Processor: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (8 CPUs), ~3.4GHz
                   Memory: 8192MB RAM
      Available OS Memory: 8132MB RAM
                Page File: 4123MB used, 6568MB available
              Windows Dir: C:\WINDOWS
          DirectX Version: DirectX 12
      DX Setup Parameters: Not found
         User DPI Setting: Using System DPI
       System DPI Setting: 96 DPI (100 percent)
          DWM DPI Scaling: Disabled
                 Miracast: Available, with HDCP
Microsoft Graphics Hybrid: Not Supported
           DxDiag Version: 10.00.14393.0000 64bit Unicode

------------
DxDiag Notes
------------
  Display Tab 1: No problems found.
  Display Tab 2: No problems found.
    Sound Tab 1: No problems found.
    Sound Tab 2: No problems found.
    Sound Tab 3: No problems found.
      Input Tab: No problems found.

---------------
Display Devices
---------------
      Card name: NVIDIA GeForce GTX 1060 6GB
   Manufacturer: NVIDIA
      Chip type: GeForce GTX 1060 6GB
       DAC type: Integrated RAMDAC
    Device Type: Full Device
     Device Key: Enum\PCI\VEN_10DE&DEV_1C03&SUBSYS_37201458&REV_A1
  Device Status: 0180200A [DN_DRIVER_LOADED|DN_STARTED|DN_DISABLEABLE|DN_NT_ENUMERATOR|DN_NT_DRIVER] 
Device Problem Code: No Problem
Driver Problem Code: Unknown
 Display Memory: 10150 MB
   Dedicated Memory: 6084 MB
  Shared Memory: 4065 MB
   Current Mode: 1920 x 1080 (32 bit) (60Hz)
   Monitor Name: Generic PnP Monitor
  Monitor Model: 247ELPH
     Monitor Id: PHLC086
    Native Mode: 1920 x 1080(p) (60.000Hz)

And here is my gradle file

apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'eclipse'
apply plugin: 'idea'

mainClassName='com.stomrage.test1.Main'

repositories {
    //This is where jme3 dependencies are stored.
    jcenter()

    //Uncomment this if you install local dependencies.
    //mavenLocal()

    //Uncomment this if you use external dependencies
    //mavenCentral()

    //Uncomment this if you use jme3-niftygui
    //maven{url 'http://nifty-gui.sourceforge.net/nifty-maven-repo'}

}

ext.jmeVersion = "[3.1,)"

project(":assets") {
    apply plugin: "java"

    buildDir = rootProject.file("build/assets")

    sourceSets {
        main {
            resources {
                srcDir '.'
            }
        }
    }
}


dependencies {

    compile "org.jmonkeyengine:jme3-core:$jmeVersion"
    compile "org.jmonkeyengine:jme3-desktop:$jmeVersion"
    compile "org.jmonkeyengine:jme3-lwjgl:$jmeVersion"
    compile "org.codehaus.groovy:groovy-all:2.2.1"
    compile "com.simsilica:lemur:[1.8,)"
    compile "com.simsilica:lemur-proto:[1.6,)"
    //Those are jme3 additional library uncomment the ones you need
    //compile "org.jmonkeyengine:jme3-android-native:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-android:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-bullet-native-android:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-blender:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-bullet-native:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-bullet:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-effects:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-jogg:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-jogl:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-lwjgl3:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-networking:$jmeVersion"
    //compile "org.jmonkeyengine:jme3-plugins:$jmeVersion"
    compile "org.jmonkeyengine:jme3-terrain:$jmeVersion"
    //You need to uncomment nifty repository in the repositories section if you use this dependency
    //compile "org.jmonkeyengine:jme3-niftygui:$jmeVersion"

    runtime project(':assets')
}

task wrapper(type: Wrapper) {
}

task createDirs << {

    def pkg = 'mygame'
    def dirs = [
        file("./src/main/java/$pkg"),
        file("./src/main/resources"),
        file("./assets/Interface"),
        file("./assets/MatDefs"),
        file("./assets/Materials"),
        file("./assets/Models"),
        file("./assets/Scenes"),
        file("./assets/Shaders"),
        file("./assets/Sounds"),
        file("./assets/Textures"),
    ]

    dirs.each {
        if( !it.exists() ) {
            println "Creating " + it
            it.mkdirs()
        }
        if( it.listFiles().length == 0 ) {
            def stub = new File(it, 'removeme.txt')
            println "Creating stub file to allow git checkin, file:$stub"
            stub.text = "Remove me when there are files here."
        }
    }
}

The exception i’m getting from Intellij IDEA

janv. 28, 2017 3:08:00 PM com.jme3.system.JmeDesktopSystem initialize
INFOS: Running on jMonkeyEngine 3.1-beta2
 * Branch: HEAD
 * Git Hash: a71fb28
 * Build Date: 2016-11-22
janv. 28, 2017 3:08:01 PM com.jme3.app.LegacyApplication handleError
GRAVE: Failed to create display
org.lwjgl.LWJGLException: Pixel format not accelerated
	at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
	at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
	at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:247)
	at org.lwjgl.opengl.Display.createWindow(Display.java:306)
	at org.lwjgl.opengl.Display.create(Display.java:848)
	at org.lwjgl.opengl.Display.create(Display.java:757)
	at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:143)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.lang.Thread.run(Thread.java:745)

janv. 28, 2017 3:08:01 PM com.jme3.system.lwjgl.LwjglAbstractDisplay run
GRAVE: Display initialization failed. Cannot continue.

Process finished with exit code -1073741819 (0xC0000005)

And finally @javasabr I can totally run your editor ! But I can’t run it using the cmd and the java -jar, in this case i’m getting this exception

janv. 28, 2017 3:11:13 PM com.jme3.app.LegacyApplication handleError
GRAVE: WGL: The driver does not appear to support OpenGL
java.lang.Exception: WGL: The driver does not appear to support OpenGL
        at com.jme3.system.lwjgl.LwjglWindow$1.invoke(LwjglWindow.java:179)
        at org.lwjgl.glfw.GLFWErrorCallbackI.callback(GLFWErrorCallbackI.java:23)
        at com.jme3.system.lwjgl.LwjglWindow$1.callback(LwjglWindow.java:189)
        at org.lwjgl.system.JNI.invokePPPP(Native Method)
        at org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1235)
        at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1388)
        at com.jme3.system.lwjgl.LwjglWindow.createContext(LwjglWindow.java:250)
        at com.jme3.system.lwjgl.LwjglWindow.initInThread(LwjglWindow.java:474)
        at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:600)
        at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:445)
        at com.jme3x.jfx.injfx.JmeOffscreenSurfaceContext.create(JmeOffscreenSurfaceContext.java:202)
        at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
        at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
        at com.jme3.app.SimpleApplication.start(SimpleApplication.java:125)
        at com.ss.editor.Editor.start(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Ask me if you need any furthermore information ! Thanks for your time.

1 Like

Which version of JRE do you use? My editor has its own JRE.

Damn this answer speed ! Sanic is that you ?

Joke aside, i’m using this JRE to run spaceshift

java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b15, mixed mode)

And in Intellij i’m using jdk1.8.0_77

:smiley:
It’s very interesting, why it works on this version :slight_smile:

I don’t know if this helps, but here’s Mojang support about that problem, which happenned a lot when Minecraft was ported to Win 10: Pixel Format Not Accelerated | MinecraftHopper

There’s even a special paragraph:

If you recently installed Windows 10, you must take additional steps to ensure that your drivers are not overridden by Windows Update. Refer to this page for more information. You must first uninstall the current driver you are using before you use an updated driver from below whether or not you are using the auto-updating tool or manual methods. In addition, if you are using an “Intel HD Graphics” or “Intel HD Graphics 3000” chipset, see the instructions at the top of this page.

1 Like

To be honest I’m totally disappointed by this kind of errors… And if you check on the internet for an answer, you’ll only find minecraft player getting this exception and has no idea of what they are talking about… (So do I ?)
I’m sure I did something wrong at some point but… I’m still trying to figure what, and windows way of handling the java version is not helping me. I think I’ll wait for the engine guru :smiley:.

I uninstalled all my drivers, reinstalled it… Changed my jdk to 8_73… Nothing is working… The only thing left to do is to switch to java 8_60

Edit : It also doesn’t work with java 8_60

Update : I installed the good old sdk platform, and it doesn’t work whatsoever… There is clearly something odd going on. :sunny: Praise the sun :sunny:

I finally got the solution ! If you have a Nvidia card and you get this error you need to downgrade your driver to the previous version.
Device Manager → Graphics Cards → Properties → Driver → Previous version…

:rainbow: Nvidia => :poop: OpenGL :rainbow:

Nvidia has the best supporting OpenGL on linux :slight_smile:

2 Likes

Humm. I remember one time downloading Geforce Experience to see if there was an update to my drivers. There was one, and I installed it. When I restarted the PC there was no graphics driver. I had to go to Device Manager and restore the last driver to make the card work again.

1 Like

I remember another thread here where people mention that the latest nvidia driver breaks open GL. I did a quick google at that time and found others with the same issue on Minecraft, etc… those threads recommended waiting until nvidia fixes it. For whatever that’s worth.

I usually expect better from nvidia drivers, really. This is an ATI/AMD-style move.

4 Likes

Forsooth!

Thanks guys for all the feedback. I must say i do feel better that others are having the problem as well.

Also is this a problem when using lwjgl3?