ig9icd64中的java异常\访问\冲突崩溃。动态链接到窗口时的动态链接库
当我渲染到一个FBO并将这个FBO blit到窗口,窗口最小化时,Java抛出一个异常\u访问\u冲突异常
这是我的代码,以我的理解,它是做什么的
//Bind the draw framebuffer to the default (0)
GL30.glBindFramebuffer(GL30.GL_DRAW_FRAMEBUFFER, 0);
//Bind the read framebuffer to the fbo id
GL30.glBindFramebuffer(GL30.GL_READ_FRAMEBUFFER, frameBufferID);
//Setting the draw buffer to the screen
GL11.glDrawBuffer(GL11.GL_BACK);
//Settiing the read buffer to the color attachment of the fbo
GL11.glReadBuffer(GL30.GL_COLOR_ATTACHMENT0);
if(GL30.glCheckFramebufferStatus(GL30.GL_FRAMEBUFFER) == GL30.GL_FRAMEBUFFER_COMPLETE) //Checking if the framebuffer is complete
{
//Blitting the frambuffer to the screen
GL30.glBlitFramebuffer(0, 0, fboWidth, fboHeight, 0, 0, windowWidth, windowHeight, GL11.GL_COLOR_BUFFER_BIT, GL11.GL_NEAREST);
}
//Unbinding the framebuffer
GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, 0);
为了防止崩溃,我添加了一个检查来检查窗口是否最小化
if(isWindowIconified) return;
//Bind the draw framebuffer to the default (0)
GL30.glBindFramebuffer(GL30.GL_DRAW_FRAMEBUFFER, 0);
//Bind the read framebuffer to the fbo
GL30.glBindFramebuffer(GL30.GL_READ_FRAMEBUFFER, frameBufferID);
//Setting the draw buffer to the screen
GL11.glDrawBuffer(GL11.GL_BACK);
//Settiing the read buffer to the color attachment of the fbo
GL11.glReadBuffer(GL30.GL_COLOR_ATTACHMENT0);
if(GL30.glCheckFramebufferStatus(GL30.GL_FRAMEBUFFER) == GL30.GL_FRAMEBUFFER_COMPLETE)
{
//Blitting the frambuffer to the screen
GL30.glBlitFramebuffer(0, 0, fboWidth, fboHeight, 0, 0, windowWidth, windowHeight, GL11.GL_COLOR_BUFFER_BIT, GL11.GL_NEAREST);
}
//Unbinding the framebuffer
GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, 0);
我还在初始化窗口时添加了这段代码
//Setting the window minimisazion callback
glfwSetWindowIconifyCallback(window, new GLFWWindowIconifyCallbackI() {
@Override
public void invoke(long window, boolean iconified) {
isWindowIconified = iconified;
}
});
现在,当我最小化它时,程序不会崩溃,但当我按Windows+D进入桌面时,程序仍然会崩溃
现在回答我的问题: 防止撞车的最佳方法是什么? 为什么会发生这种情况
系统信息:
操作系统:Windows 10 Home,版本10.0.15063
GPU:Intel HD Graphics 520
驱动程序版本:20.19.15.4642
OpenGL版本:4.4
# 1 楼答案
如果Java抛出异常\访问\冲突异常,并且它发生在ig9icd64中。这可能是因为您使用的是旧的英特尔GPU驱动程序。我认为这似乎是个问题,因为当我用我的NVIDIA GPU启动程序时它不会发生,而且在我更新我的Intel GPU驱动程序后它也不会崩溃
如果您不确定错误发生在哪里,请在崩溃报告中查找“本机帧:”和“Java帧”。最上面的一行显示错误发生的位置