question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

X Error of failed request: RenderBadPicture (invalid Picture parameter)

See original GitHub issue

I’m currently facing a very weird issue: In one of my projects I’m getting the following error during initialization. My initialization code is pretty much identical to the Pong example code, with added logging statements to see the steps of the initialization:

[LWJGL] Version: 3.0.0b SNAPSHOT
[LWJGL]      OS: Linux v3.13.0-79-generic
[LWJGL]     JRE: 1.8.0_74 amd64
[LWJGL]     JVM: Java HotSpot(TM) 64-Bit Server VM v25.74-b02 by Oracle Corporation
[LWJGL] Loaded library from java.library.path: lwjgl
[LWJGL] MemoryUtil accessor: MemoryAccessorUnsafe
[LWJGL] Loaded native library: lib/native/libjemalloc.so
[LWJGL] MemoryUtil allocator: JEmallocAllocator
 *** glfwInit
[LWJGL] Loaded native library: lib/native/libglfw.so
     glfwInit [done]
 *** setting glfwSetErrorCallback
     setting glfwSetErrorCallback [done]
 *** setting glfwWindowHint
     setting glfwWindowHint [done]
 *** glfwCreateWindow
X Error of failed request:  RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  6 (RenderSetPictureClipRectangles)
  Picture id in failed request: 0x540005e
  Serial number of failed request:  3285
  Current serial number in output stream:  3287
java.lang.RuntimeException: Nonzero exit code returned from runner: 1
    at scala.sys.package$.error(package.scala:27)

The reason for the vague statement “during initialization” is that the error seems to be asynchronous, and it is not always happening in glfwCreateWindow. For instance, this is output of another run, where I somehow made it past the glfwCreateWindow:

< ... as before ... >
 *** setting glfwSetErrorCallback
     setting glfwSetErrorCallback [done]
 *** setting glfwWindowHint
     setting glfwWindowHint [done]
 *** glfwCreateWindow
X Error of failed request:  RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  6 (RenderSetPictureClipRectangles)
  Picture id in failed request: 0x560005d
  Serial number of failed request:  3523
  Current serial number in output stream:  3525
     glfwCreateWindow [done]
 *** glfwMakeContextCurrent
pure virtual method called
terminate called without an active exception
java.lang.RuntimeException: Nonzero exit code returned from runner: 134

Note that the error in this case also comes with an additional pure virtual method called, which is not the case when it happens in other places.

Another example: If I don’t call glfwInit right at the start of the main function, the error always seems to be triggered by glfwInit itself, i.e., I do not get to the point of setting the error callback etc. I was actually very surprised to see that the behavior changes depending on whether I place glfwInit before or after the other initialization code, because this other code has nothing to do with OpenGL / native libraries and just initializes a few Java/Scala data structures.

I do get this error with both the latest stable build (build #3.0.0b build 64) and the latest nightly (build #3.0.0 build 41). My system is an Ubuntu 14.04, 64bit, Java 1.8.0_74, Nvidia Geforce GTX 670, Nvidia driver version 352.79.

What makes this issue even more annoying is the fact that it seems to be difficult to reproduce: So far, I get this error only in my main project. I was trying to come up with a minimal example to reproduce it, but in the minimal example the exact same code works. I’m currently trying to add some complexity from the big project to the minimal example to see what may trigger the problem. But even after adding all dependencies and using exactly the same JVM options, I could not reproduce the error so far. I’m now looking into other potential side effects…

I should add: I have just ported the big project from LWJGL 2.9.1 to 3.X for the first time. With 2.9.1 everything was working fine.

Any hints what could possibly go wrong would be highly appreciated.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
Ali-RScommented, Dec 24, 2016

@Spasi sorry for late reply … I could solve the problem. Actually it was related to Swing … I disabled Settings menu in jME (which is a splash screen with some settings like vsync, screen resolution , antialiasing ,…) which is a swing canvas. By disabling it, game runs fine.

0reactions
Spasicommented, Mar 12, 2018

Is this something which is worked on, or a situation which can’t be fixed?

It cannot be fixed without modifying JavaFX. We made a decent attempt last year and there’s also JFXGL. Now that JavaFX is being removed from the JDK, we’ll try to do better soon, see here for more information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] X Window System error, multiple applications ...
The program 'seamonkey-bin' received an X Window System error. ... The error was 'RenderBadPicture (invalid Picture parameter)'.
Read more >
Asynchronous XLib Error after creating context in LWJGL 3
X Error of failed request : RenderBadPicture (invalid Picture parameter) Major opcode of failed request: 139 (RENDER) Minor opcode of failed ...
Read more >
game doesn't launch ? :: 5089: The Action RPG Crash Reports
X Error of failed request : RenderBadPicture (invalid Picture parameter) Major opcode of failed request: 139 (RENDER) Minor opcode of failed ...
Read more >
forums.mozillazine.org/viewtopic.php?f=5&t=1837985
No information is available for this page.
Read more >
X Error: RenderBadPicture (invalid Picture parameter) 179
Version: (using KDE KDE 3.5.3) Installed from: SuSE RPMs Compiler: suse 10.1 OS: Linux When plotting the application frezes completely, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found