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

IllegalStateException thrown continuously due to too large texture #93

Open
jharaldson opened this issue Dec 4, 2015 · 0 comments
Open

Comments

@jharaldson
Copy link

The following IllegalStateException is thrown continuously after a (too) large texture is attached to the shader. The exceptions never stop and system slows down heavily. I guess we would like the shader to stop drawing?

Test case:
Create a shader
Add a texture to shader
texR = Texture(TextureSpecification.from1DFloatBuffer(0, 75000, _.buffers.rows))

Result:
Exception will be thrown continuously

java.lang.IllegalStateException: GLERROR:Numeric argument out of range -- setting up texture TextureSpecification{unit=0, target=3553, internalFormat=34836, width=79390, height=1, format=6408, type=5126, elementSize=16, highQuality=false, pixels=java.nio.DirectByteBuffer[pos=0 lim=1270240 cap=1270240]}
State tracker is:viewport = [I@29bbc63c
scissor = [I@272778ae
shader = 67
fbo = 0
blendState = [I@2cccf134

at field.graphics.GraphicsContext.checkError(GraphicsContext.java:173)
at field.graphics.Texture.setup(Texture.java:323)
at field.graphics.Texture.setup(Texture.java:41)
at field.graphics.BaseScene.lambda$perform$1(BaseScene.java:51)
at field.graphics.GraphicsContext.get(GraphicsContext.java:95)
at field.graphics.BaseScene.perform(BaseScene.java:51)
at field.graphics.Scene.wrappedCall(Scene.java:251)
at field.graphics.Scene.update(Scene.java:217)
at field.graphics.Scene.update(Scene.java:181)
at field.graphics.BaseScene.perform(BaseScene.java:55)
at field.graphics.Scene.wrappedCall(Scene.java:251)
at field.graphics.Scene.update(Scene.java:217)
at field.graphics.Scene.updateAll(Scene.java:177)
at field.graphics.Window.updateScene(Window.java:427)
at field.graphics.Window.loop(Window.java:330)
at field.graphics.Window.lambda$new$0(Window.java:55)
at field.graphics.Scene.wrappedCall(Scene.java:253)
at field.graphics.Scene.update(Scene.java:217)
at field.graphics.Scene.updateAll(Scene.java:177)
at field.app.RunLoop.enterMainLoop(RunLoop.java:51)
at fieldbox.FieldBox.go(FieldBox.java:21)
at fieldbox.FieldBox.main(FieldBox.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:502)
at fieldagent.Trampoline.main(Trampoline.java:268)

Exceptions thrown in scene update
(Performs responsible have been removed from the scene, if they were directly attached)
Details:
java.lang.IllegalStateException: GLERROR:Numeric argument out of range -- setting up texture TextureSpecification{unit=0, target=3553, internalFormat=34836, width=79390, height=1, format=6408, type=5126, elementSize=16, highQuality=false, pixels=java.nio.DirectByteBuffer[pos=0 lim=1270240 cap=1270240]}
State tracker is:viewport = [I@234cd86c
scissor = [I@2c48cede
shader = 67
fbo = 0
blendState = [I@39c87b42

at field.graphics.GraphicsContext.checkError(GraphicsContext.java:173)
at field.graphics.Texture.setup(Texture.java:323)
at field.graphics.Texture.setup(Texture.java:41)
at field.graphics.BaseScene.lambda$perform$1(BaseScene.java:51)
at field.graphics.GraphicsContext.get(GraphicsContext.java:95)
at field.graphics.BaseScene.perform(BaseScene.java:51)
at field.graphics.Scene.wrappedCall(Scene.java:251)
at field.graphics.Scene.update(Scene.java:217)
at field.graphics.Scene.update(Scene.java:181)
at field.graphics.BaseScene.perform(BaseScene.java:55)
at field.graphics.Scene.wrappedCall(Scene.java:251)
at field.graphics.Scene.update(Scene.java:217)
at field.graphics.Scene.updateAll(Scene.java:177)
at field.graphics.Window.updateScene(Window.java:427)
at field.graphics.Window.loop(Window.java:330)
at field.graphics.Window.lambda$new$0(Window.java:55)
at field.graphics.Scene.wrappedCall(Scene.java:253)
at field.graphics.Scene.update(Scene.java:217)
at field.graphics.Scene.updateAll(Scene.java:177)
at field.app.RunLoop.enterMainLoop(RunLoop.java:51)
at fieldbox.FieldBox.go(FieldBox.java:21)
at fieldbox.FieldBox.main(FieldBox.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:502)
at fieldagent.Trampoline.main(Trampoline.java:268)
@jharaldson jharaldson changed the title IllegalStateException thrown continuously IllegalStateException thrown continuously due to error in shader Dec 4, 2015
@jharaldson jharaldson changed the title IllegalStateException thrown continuously due to error in shader IllegalStateException thrown continuously due to too large texture Dec 4, 2015
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

1 participant