LWJGL 3 - Frequent crashes

Hi, this post is to notify you guys of frequent crashes that I’m experiencing with LWJGL3 Nightly #23. I’m running it on Mac OS X Yosemite 10.10.1 with Java 1.8u_20


/Library/Java/Java... com.shc.silenceengine.tests.TrueTypeFontTest
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000010a7d226a, pid=1518, tid=1811
#
# JRE version: Java(TM) SE Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.20-b23 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.dylib+0x2f926a]  jni_NewLocalRef+0x64
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Volumes/Data/Java/SilenceEngine/hs_err_pid1518.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

Process finished with exit code 134

Here’s the full log file. http://pastebin.java-gaming.org/2f04819551510

This is occurring every time after I call [icode]glfwTerminate()[/icode] function. Dunno what’s the issue, but it works fine with previous nightly.

Thanks.

could be this : http://stackoverflow.com/questions/20325792/java-thread-leaks-when-calling-back-from-native-thread-via-jni

Please read this post, especially the c) paragraph. You should have strong references to the callback instances and only release them when they are not going to be called anymore.

If you aren’t doing that, you should be getting a ClosureError thrown, instead of a crash. I’m currently investigating why this isn’t happening on certain configurations.
If you are indeed doing that, then I would like to see some code the reproduces the problem, if you don’t mind.

Thanks for the reply Spasi, I was using code like this.


glfwSetWindowPosCallback(window, new GLFWwindowposfun()
{
    @Override
    public void invoke(long window, int xPos, int yPos)
    {
        Display.posX = xPos;
        Display.posY = yPos;
    }
});

When do I know that they won’t be called again, so that I can release them? I mean, should I release them before glfwDestroyWindow() is created?

For this particular example, either when you call glfwDestroyWindow or when you call glfwSetWindowPosCallback with another GLFWwindowposfun or NULL.

I have found the bug btw, will push another build later tonight.