LWJGL Forum

Archive => DevIL => Topic started by: weevil on November 23, 2005, 23:50:00

Title: ilGenImages throwing exception
Post by: weevil on November 23, 2005, 23:50:00
I get a nasty exception when trying to use devIL to load images into my textures. What obvious things am i missing here? Do i need to init IL somehow prior to envoking ilGenImages?

My code:
   IntBuffer cILImage = BufferUtils.createIntBuffer(1);
   IL.ilGenImages( cILImage );

The VM stops when it reaches the ilGenImages.

Console output:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.


Current Java thread:
at org.lwjgl.devil.IL.nilGenImages(Native Method)
at org.lwjgl.devil.IL.ilGenImages(IL.java:341)
at SpinningBox.loadTexture(SpinningBox.java:218)
at SpinningBox.loadTextures(SpinningBox.java:100)
at SpinningBox.<init>(SpinningBox.java:39)
at SpinningBox.main(SpinningBox.java:33)
bla..bla..bla..


Any insight will be appreciated
Title: ilGenImages throwing exception
Post by: lightbringer on November 24, 2005, 00:07:58
Most likely you forgot to call IL.create() before going into your texture loading code.
Title: ilGenImages throwing exception
Post by: weevil on November 24, 2005, 16:47:20
Hehe I simply wasn't aware that i needed to call IL.create(). Thanks a bunch lightbringer.