我有一个错误,我不知道如何解决。土壤未处理的异常在0x585727FF
我创建了一个简单的程序,用VS2012,为了测试土(土壤的网站示例代码):
#include "SOIL.h"
#include <iostream>
#include <glew.h>
#include <freeglut.h>
int main() {
std::cout << "Started" << std::endl;
/* load an image file directly as a new OpenGL texture */
GLuint tex_2d = SOIL_load_OGL_texture
(
"img.png",
SOIL_LOAD_AUTO,
SOIL_CREATE_NEW_ID,
SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_NTSC_SAFE_RGB | SOIL_FLAG_COMPRESS_TO_DXT
);
/* check for an error during the load process */
if(0 == tex_2d)
{
printf("SOIL loading error: '%s'\n", SOIL_last_result());
}
}
我得到的错误:
Unhandled exception at 0x585727FF (msvcr110d.dll) in imageLib.exe: 0xC0000005: Access violation reading location 0x00000000.
任何帮助表示赞赏。谢谢。
打开(在内存中的调试/异常菜单“时异常被抛出突破”),你可以得到堆栈跟踪,应提供更多信息。 – sje397 2013-05-12 12:33:14
只需单步执行代码即可。断点应该带你到问题发生的地方。 – GenieWanted 2013-05-12 12:37:23
谢谢你的回复。好吧,我想我打开了它。这是堆栈跟踪? https://docs.google.com/file/d/0B36QIOj3F-a3TzRVVEE3blNYYjg/edit?usp=sharing – Attaque 2013-05-12 12:44:55