Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] MacOS crash on compiling DebugDraw.glsl #5

Open
rlf23240 opened this issue May 5, 2019 · 4 comments
Open

[Bug] MacOS crash on compiling DebugDraw.glsl #5

rlf23240 opened this issue May 5, 2019 · 4 comments

Comments

@rlf23240
Copy link

rlf23240 commented May 5, 2019

Seems that there are some problem for Mac to support version 3.3 directly.
List some articles here which might be relevant:

https://stackoverflow.com/questions/19865463/opengl-4-1-under-mavericks?lq=1
https://stackoverflow.com/questions/38164908/opengl-3-3-on-mac-osx-el-capitan-with-lwjgl

Hope this help.

Crash Log

java.lang.RuntimeException: Error loading shader script at /assets/lambdalib2/shader/DebugDraw.glsl
	at cn.lambdalib2.render.ShaderScript.loadFromResource(ShaderScript.java:76) ~[ShaderScript.class:?]
	at cn.lambdalib2.util.DebugDraw.checkInit(DebugDraw.java:84) ~[DebugDraw.class:?]
	at cn.lambdalib2.util.DebugDraw.postRenderEntity(DebugDraw.java:73) ~[DebugDraw.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_77_DebugDraw_postRenderEntity_RenderAllEntityEvent.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?]
	at cn.lambdalib2.render.mc.RenderEventDispatch.beginRenderEntities(RenderEventDispatch.java:87) ~[RenderEventDispatch.class:?]
	at net.minecraft.client.renderer.RenderGlobal.func_180446_a(RenderGlobal.java) ~[buy.class:?]
	at net.minecraft.client.renderer.EntityRenderer.func_175068_a(EntityRenderer.java:1413) ~[buq.class:?]
	at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1259) ~[buq.class:?]
	at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1062) ~[buq.class:?]
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119) ~[bib.class:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398) [bib.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
Caused by: java.lang.RuntimeException: Error when compiling shader: ERROR: 0:2: '' :  version '330' is not supported
ERROR: 0:2: '' : syntax error: #version

	at cn.lambdalib2.render.ShaderScriptParser.linkShader(ShaderScript.java:279) ~[ShaderScriptParser.class:?]
	at cn.lambdalib2.render.ShaderScriptParser.load(ShaderScript.java:189) ~[ShaderScriptParser.class:?]
	at cn.lambdalib2.render.ShaderScript.load(ShaderScript.java:61) ~[ShaderScript.class:?]
	at cn.lambdalib2.render.ShaderScript.loadFromResource(ShaderScript.java:74) ~[ShaderScript.class:?]
	... 27 more

Mods

Forge version 14.23.5.2836
LambdaLib2 0.1.8
AcademyCraft 1.1.1

Specifications

15-inch Apple MacBook Pro (Mid 2017)
MacOs Mojave 10.14.4
AMD Radeon Pro 560

@Broam
Copy link

Broam commented Jun 1, 2019

This is also an issue on Linux; I'm using an older AMD card.

Caused by: java.lang.RuntimeException: Error when compiling shader: 0:2(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

@rlf23240
Copy link
Author

rlf23240 commented Jun 1, 2019

@Broam This might be different issues. Both are reply by author in AcademyCraft issues as follow:

LambdaInnovation/AcademyCraft#796
LambdaInnovation/AcademyCraft#783

However, both are relative to compatibility of openGL, and won't be fixed in a short time since team of this mod is focusing on modern openGL support.
Try to google it about your graphic card and see if it can be update to support 3.3 might be help?

@Broam
Copy link

Broam commented Jun 1, 2019

I'll have to investigate that. I suspect I'll have to upgrade to a later version of Debian (I'm on Stable right now, it tends to be old.)

In the interim, I got the mod to not crash by doing the following:

Unpack the .jar
Copy the contents of Simple.glsl over top of DebugDraw.glsl (so that the files are identical)
Repack the .jar

This allows the shader to compile as it's built against Open GL 1.2, but if there's functionality exposed by the DebugDraw (say, if F3 is active), that functionality is destroyed.

@rlf23240
Copy link
Author

rlf23240 commented Jun 3, 2019

@Broam Yes, you can do so to avoid crash on start up.
Similarly, you can do so for all shader in AcademyCraft, which is only mod use this lib as far as I know.
But problem is that most of visual effect of superability in AcademyCraft use feature of version 3.3.
I have to say that I am not expert about OpenGL, but as far as I know, those features is about how parameter send to shader program. This is why you cannot just change your shader to rebuild same functionality as before.
Of course, you can always change your shader to do the simplest work or just do nothing. Doing so will lost the visual effect of your superability, if this is acceptable for you.
Hope this help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants