Minecraft example not working
See original GitHub issueHi!
I’m trying to use imgui in a Minecraft mod i’m making, so i started with the example in the wiki:
public class TestScreen extends Screen {
private static ImGui imgui = ImGui.INSTANCE;
private static ImplGL3 implGl3;
private static ImplGlfw implGlfw;
static {
GlfwWindow window = GlfwWindow.from(MinecraftClient.getInstance().window.getHandle());
window.makeContextCurrent();
new Context();
implGlfw = new ImplGlfw(window, false, null);
implGl3 = new ImplGL3();
}
public TestScreen () {
super(new TextComponent("Test Screen"));
}
@Override
public void render(int x, int y, float partialTicks) {
implGl3.newFrame(); // JVM crashes here
implGlfw.newFrame();
imgui.newFrame();
imgui.text("Hello Minecraft!");
implGl3.renderDrawData(imgui.getDrawData());
}
}
Upon showing the screen however, the jvm crashes:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006b2e0e20, pid=2940, tid=0x00000000000059f0
#
# JRE version: Java(TM) SE Runtime Environment (8.0_211-b12) (build 1.8.0_211-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.211-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [nvoglv64.dll+0xc20e20]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
I’m not sure why this happens, i’m using exactly the same code as in the wiki.
Any help would be appreciated!
Issue Analytics
- State:
- Created 4 years ago
- Comments:102
Top Results From Across the Web
[SOLVED] Minecraft Won't Launch in Windows - Driver Easy
Try these fixes: · End your Minecraft process · Run Minecraft as administrator · Use the Compatibility mode · Update your video card...
Read more >Minecraft has not started because of an unknown error a ...
This tutorial is about how to fix minecraft has not started because of an unknown error a popular solution to the problem.
Read more >Minecraft not working in Windows 11? Here's how to fix it!
Minecraft not working in Windows 11? Here's how to fix it!This video will show you how to do it!One of the most popular...
Read more >Minecraft Realms Plus Troubleshooting – Home
If you encounter this issue, it's possible that your connection is failing to load some texture packs. You can try to remove those...
Read more >7 Ways to Fix Minecraft Launcher not Working on Windows 11
Aside from that, the Minecraft Launcher might not work because of game privilege issues and certain mods. This is because the launcher needs ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
🎉
For anyone who has stumbled upon this issue (and waiting for closure, presumably), i have taken an interest in this library and made a fabricmc template that works out of the box based on multiple issues and reports from this repository.
I have only tested this on linux, so i am unsure if issues still exist within windows.
https://github.com/breadbyte/fabric-example-imgui