• Create Account

### #Actualscottrick49

Posted 07 February 2013 - 08:04 PM

I'm trying to use SOIL (Simple OpenGL Image Library) to load images in my project.  However, it is crashing whenever I call SOIL_load_image, from an unhandled exception writing location 0x00000014.  (I'm following this tutorial, btw: http://open.gl/textures).

I'm unsure of what I can do to fix this issue, but I think its something related to how I'm setting up the library.  Yesterday, I was trying to do something similar with libPNG and was running into a similar crash when the library attempted to do some file IO.  At the time, I thought it was probably an issue with the library, but now that I'm getting another crash with a different library, I think it might be me.

For the SOIL library, I built the project and copied the debug SOIL.lib to my VC/lib directory, and SOIL.h to the VC/include directory.  It seems to be building fine, but is crashing.  I tried it with the release .lib as well and the same thing happens.

Where I'm trying to load the image (GLTextureFactory.cpp):

#include "GLTextureFactory.h"

#pragma comment(lib, "SOIL")

#include <SOIL.h>

#include "GLTexture.h"

GLTextureFactory::GLTextureFactory(void)
{

}

GLTextureFactory::~GLTextureFactory(void)
{

}

GLTexture *GLTextureFactory::createTextureForImage(const char *imageFilename)
{
int width, height;

//CRASHING ON THIS LINE

//glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, image );

return new GLTexture(0);
}

I have included GLM in my project, and am also linking against:
#pragma comment(lib, "GLFW")
#pragma comment(lib, "opengl32")
#pragma comment(lib, "glu32")
#pragma comment(lib, "glew32")

Any help is very appreciated!

### #2scottrick49

Posted 07 February 2013 - 08:03 PM

I'm trying to use SOIL (Simple OpenGL Image Library) to load images in my project.  However, it is crashing whenever I call SOIL_load_image, from an unhandled exception writing location 0x00000014.  (I'm following this tutorial, btw: http://open.gl/textures).

I'm unsure of what I can do to fix this issue, but I think its something related to how I'm setting up the library.  Yesterday, I was trying to do something similar with libPNG and was running into a similar crash when the library attempted to do some file IO.  At the time, I thought it was probably an issue with the library, but now that I'm getting another crash with a different library, I think it might be me.

For the SOIL library, I built the project and copied the debug SOIL.lib to my VC/lib directory, and SOIL.h to the VC/include directory.  It seems to be building fine, but is crashing.  I tried it with the release .lib as well and the same thing happens.

Where I'm trying to load the image (GLTextureFactory.cpp):

#include "GLTextureFactory.h"

#pragma comment(lib, "SOIL")

#include <SOIL.h>

#include "GLTexture.h"

GLTextureFactory::GLTextureFactory(void)
{

}

GLTextureFactory::~GLTextureFactory(void)
{

}

GLTexture *GLTextureFactory::createTextureForImage(const char *imageFilename)
{
int width, height;

//CRASHING ON THIS LINE

//glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, image );

return new GLTexture(0);
}


I have included GLM in my project, and am also linking against:
#pragma comment(lib, "GLFW")
#pragma comment(lib, "opengl32")
#pragma comment(lib, "glu32")
#pragma comment(lib, "glew32")


Any help is very appreciated!

### #1scottrick49

Posted 07 February 2013 - 08:00 PM

I'm trying to use SOIL (Simple OpenGL Image Library) to load images in my project.  However, it is crashing whenever I call SOIL_load_image, from an unhandled exception writing location 0x00000014.  (I'm following this tutorial, btw: http://open.gl/textures).

I'm unsure of what I can do to fix this issue, but I think its something related to how I'm setting up the library.  Yesterday, I was trying to do something similar with libPNG and was running into a similar crash when the library attempted to do some file IO.  At the time, I thought it was probably an issue with the library, but now that I'm getting another crash with a different library, I think it might be me.

For the SOIL library, I built the project and copied the debug SOIL.lib to my VC/lib directory, and SOIL.h to the VC/include directory.  It seems to be building fine, but is crashing.  I tried it with the release .lib as well and the same thing happens.

Where I'm trying to load the image (GLTextureFactory.cpp):

#include "GLTextureFactory.h"

#pragma comment(lib, "SOIL")

#include <SOIL.h>

#include "GLTexture.h"

GLTextureFactory::GLTextureFactory(void)
{

}

GLTextureFactory::~GLTextureFactory(void)
{

}

GLTexture *GLTextureFactory::createTextureForImage(const char *imageFilename)
{
int width, height;

//CRASHING ON THIS LINE
}