这可能与问题无关,但这里是上下文:我一直在关注OpenGL的教程,并决定在查找可能更好的实现之前尝试创建自己的骨骼系统。
这是问题所在:我为我的骨架文件创建了一个简单的基于文本的格式。我还加载了一个OBJ文件,两个GLSL着色器和一个PNG格式的纹理。 (如果重要,我使用来自nothings.org的STB图像加载纹理)。之前我的所有文件加载都已成功。加载框架文件是成功的,但加载框架文件后,所有后续加载文件的尝试都失败,产生各种错误,具体取决于函数调用的位置。在我喜欢的位置,它产生一个SIGABRT。
这是我初始化骨架的代码,另外还包括:
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <cstring>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include "model_stuff.hpp"
#include "skeleton_stuff.hpp"
void Skeleton::init(const char *sklfile) {
std::ifstream in(sklfile, std::ios::in);
if (!in) { std::cerr << "Cannot open " << sklfile << std::endl; exit(1); }
std::string line;
getline(in, line);
if(line.substr(0,2) == "i ") {
std::istringstream s(line.substr(2));
s >> this->numBinds;
this->boneBinds = new BoneBind[numBinds];
} else {
std::cerr << "Error: Missing information line for " << sklfile << std::endl; exit(1);
}
while (getline(in, line)) {
if(line.substr(0,2) == "b ") {
std::istringstream s(line.substr(2));
std::string name;
s >> name;
glm::vec4 pos;
s >> pos.x; s >> pos.y; s >> pos.z; pos.w = 1.0f;
} else if(line.substr(0,2) == "v ") {
std::istringstream s(line.substr(2));
int v;
s >> v;
std::vector<Bone*> bones;
while(!s.eof()) {
std::string str;
s >> str;
bones.push_back(this->boneNamed(str));
}
float boneweight = 1.0f;
if(bones.size() > 0) {
boneweight = 0.5f;
}
boneBinds[v].boneweight = bones.size();
boneBinds[v].childbone = bones[0];
if(boneweight != 1.0f) {
boneBinds[v].superbone = bones[1];
} else {
boneBinds[v].superbone = bones[0];
}
}
}
}
以下是gdb的输出:
(gdb) run
Starting program: /home/pitzik4/Dropbox/Pitzik4/cppWorkspaces/glTestWorkspace/Triangle2/bin/model
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
*** glibc detected *** /home/pitzik4/Dropbox/Pitzik4/cppWorkspaces/glTestWorkspace/Triangle2/bin/model: free(): invalid next size (normal): 0x0000000000d630c0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x7ffff6b7a626]
/usr/lib/x86_64-linux-gnu/dri/libdricore.so(_mesa_symbol_table_dtor+0x55)[0x7ffff4537bb5]
/usr/lib/x86_64-linux-gnu/dri/libglsl.so(_ZN17glsl_symbol_tableD1Ev+0xd)[0x7ffff41024dd]
/usr/lib/x86_64-linux-gnu/dri/libglsl.so(_Z22cross_validate_globalsP17gl_shader_programPP9gl_shaderjb+0x116)[0x7ffff4112306]
/usr/lib/x86_64-linux-gnu/dri/libglsl.so(_Z12link_shadersP10gl_contextP17gl_shader_program+0x260)[0x7ffff4113e40]
/usr/lib/x86_64-linux-gnu/dri/libdricore.so(_mesa_glsl_link_shader+0xfb)[0x7ffff459e21b]
/usr/lib/x86_64-linux-gnu/dri/libdricore.so(_mesa_get_fixed_func_fragment_program+0xa59)[0x7ffff4592c39]
/usr/lib/x86_64-linux-gnu/dri/libdricore.so(_mesa_update_state_locked+0x872)[0x7ffff44978e2]
/usr/lib/x86_64-linux-gnu/dri/libdricore.so(_mesa_update_state+0x11)[0x7ffff4497d51]
/usr/lib/x86_64-linux-gnu/dri/libdricore.so(+0xcfc48)[0x7ffff44a9c48]
/usr/lib/x86_64-linux-gnu/dri/libdricore.so(_mesa_TexImage2D+0x54)[0x7ffff44aa364]
/home/pitzik4/Dropbox/Pitzik4/cppWorkspaces/glTestWorkspace/Triangle2/bin/model[0x418b1d]
/home/pitzik4/Dropbox/Pitzik4/cppWorkspaces/glTestWorkspace/Triangle2/bin/model[0x419a28]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7ffff6b1d76d]
/home/pitzik4/Dropbox/Pitzik4/cppWorkspaces/glTestWorkspace/Triangle2/bin/model[0x403339]
======= Memory map: ========
00400000-00423000 r-xp 00000000 08:05 4456901 /home/pitzik4/Dropbox/Pitzik4/cppWorkspaces/glTestWorkspace/Triangle2/bin/model
00622000-00623000 r--p 00022000 08:05 4456901 /home/pitzik4/Dropbox/Pitzik4/cppWorkspaces/glTestWorkspace/Triangle2/bin/model
00623000-00624000 rw-p 00023000 08:05 4456901 /home/pitzik4/Dropbox/Pitzik4/cppWorkspaces/glTestWorkspace/Triangle2/bin/model
00624000-00d7e000 rw-p 00000000 00:00 0 [heap]
7ffff2efb000-7ffff3841000 rw-p 00000000 00:00 0
7ffff3841000-7ffff3857000 r-xp 00000000 08:05 1576592 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7ffff3857000-7ffff3a56000 ---p 00016000 08:05 1576592 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7ffff3a56000-7ffff3a57000 r--p 00015000 08:05 1576592 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7ffff3a57000-7ffff3a58000 rw-p 00016000 08:05 1576592 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7ffff3a58000-7ffff3a60000 r-xp 00000000 08:05 5120173 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.0
7ffff3a60000-7ffff3c5f000 ---p 00008000 08:05 5120173 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.0
7ffff3c5f000-7ffff3c60000 r--p 00007000 08:05 5120173 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.0
7ffff3c60000-7ffff3c61000 rw-p 00008000 08:05 5120173 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.0
7ffff3c61000-7ffff3c7d000 r-xp 00000000 08:05 5119862 /usr/lib/x86_64-linux-gnu/libdrm_intel.so.1.0.0
7ffff3c7d000-7ffff3e7c000 ---p 0001c000 08:05 5119862 /usr/lib/x86_64-linux-gnu/libdrm_intel.so.1.0.0
7ffff3e7c000-7ffff3e7d000 r--p 0001b000 08:05 5119862 /usr/lib/x86_64-linux-gnu/libdrm_intel.so.1.0.0
7ffff3e7d000-7ffff3e7e000 rw-p 0001c000 08:05 5119862 /usr/lib/x86_64-linux-gnu/libdrm_intel.so.1.0.0
7ffff3e7e000-7ffff3ea5000 r-xp 00000000 08:05 1576499 /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7ffff3ea5000-7ffff40a5000 ---p 00027000 08:05 1576499 /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7ffff40a5000-7ffff40a7000 r--p 00027000 08:05 1576499 /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7ffff40a7000-7ffff40a8000 rw-p 00029000 08:05 1576499 /lib/x86_64-linux-gnu/libexpat.so.1.5.2
7ffff40a8000-7ffff41ce000 r-xp 00000000 08:05 1569 /usr/lib/x86_64-linux-gnu/dri/libglsl.so
7ffff41ce000-7ffff43cd000 ---p 00126000 08:05 1569 /usr/lib/x86_64-linux-gnu/dri/libglsl.so
7ffff43cd000-7ffff43d6000 r--p 00125000 08:05 1569 /usr/lib/x86_64-linux-gnu/dri/libglsl.so
7ffff43d6000-7ffff43d9000 rw-p 0012e000 08:05 1569 /usr/lib/x86_64-linux-gnu/dri/libglsl.so
7ffff43d9000-7ffff43da000 rw-p 00000000 00:00 0
7ffff43da000-7ffff4618000 r-xp 00000000 08:05 1570 /usr/lib/x86_64-linux-gnu/dri/libdricore.so
7ffff4618000-7ffff4818000 ---p 0023e000 08:05 1570 /usr/lib/x86_64-linux-gnu/dri/libdricore.so
7ffff4818000-7ffff4822000 r--p 0023e000 08:05 1570 /usr/lib/x86_64-linux-gnu/dri/libdricore.so
7ffff4822000-7ffff4825000 rw-p 00248000 08:05 1570 /usr/lib/x86_64-linux-gnu/dri/libdricore.so
7ffff4825000-7ffff483b000 rw-p 00000000 00:00 0
7ffff483b000-7ffff4909000 r-xp 00000000 08:05 1334 /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
7ffff4909000-7ffff4b09000 ---p 000ce000 08:05 1334 /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
7ffff4b09000-7ffff4b0c000 r--p 000ce000 08:05 1334 /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
7ffff4b0c000-7ffff4b10000 rw-p 000d1000 08:05 1334 /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
7ffff4b10000-7ffff4b17000 r-xp 00000000 08:05 1576567 /lib/x86_64-linux-gnu/librt-2.15.so
7ffff4b17000-7ffff4d16000 ---p 00007000 08:05 1576567 /lib/x86_64-linux-gnu/librt-2.15.so
7ffff4d16000-7ffff4d17000 r--p 00006000 08:05 1576567 /lib/x86_64-linux-gnu/librt-2.15.so
7ffff4d17000-7ffff4d18000 rw-p 00007000 08:05 1576567 /lib/x86_64-linux-gnu/librt-2.15.so
7ffff4d18000-7ffff4d1d000 r-xp 00000000 08:05 5119694 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7ffff4d1d000-7ffff4f1c000 ---p 00005000 08:05 5119694 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7ffff4f1c000-7ffff4f1d000 r--p 00004000 08:05 5119694 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7ffff4f1d000-7ffff4f1e000 rw-p 00005000 08:05 5119694 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7ffff4f1e000-7ffff4f20000 r-xp 00000000 08:05 5119681 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7ffff4f20000-7ffff511f000 ---p 00002000 08:05 5119681 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7ffff511f000-7ffff5120000 r--p 00001000 08:05 5119681 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7ffff5120000-7ffff5121000 rw-p 00002000 08:05 5119681 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7ffff5121000-7ffff5123000 r-xp 00000000 08:05 1576494 /lib/x86_64-linux-gnu/libdl-2.15.so
7ffff5123000-7ffff5323000 ---p 00002000 08:05 1576494 /lib/x86_64-linux-gnu/libdl-2.15.so
7ffff5323000-7ffff5324000 r--p 00002000 08:05 1576494 /lib/x86_64-linux-gnu/libdl-2.15.so
7ffff5324000-7ffff5325000 rw-p 00003000 08:05 1576494 /lib/x86_64-linux-gnu/libdl-2.15.so
7ffff5325000-7ffff532f000 r-xp 00000000 08:05 5119860 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
7ffff532f000-7ffff552e000 ---p 0000a000 08:05 5119860 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
7ffff552e000-7ffff552f000 r--p 00009000 08:05 5119860 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
7ffff552f000-7ffff5530000 rw-p 0000a000 08:05 5119860 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
7ffff5530000-7ffff5534000 r-xp 00000000 08:05 5119726 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7ffff5534000-7ffff5733000 ---p 00004000 08:05 5119726 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7ffff5733000-7ffff5734000 r--p 00003000 08:05 5119726 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7ffff5734000-7ffff5735000 rw-p 00004000 08:05 5119726 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7ffff5735000-7ffff5752000 r-xp 00000000 08:05 5120366 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7ffff5752000-7ffff5951000 ---p 0001d000 08:05 5120366 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7ffff5951000-7ffff5952000 r--p 0001c000 08:05 5120366 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7ffff5952000-7ffff5953000 rw-p 0001d000 08:05 5120366 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7ffff5953000-7ffff5968000 r-xp 00000000 08:05 5120350 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
7ffff5968000-7ffff5b67000 ---p 00015000 08:05 5120350 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
7ffff5b67000-7ffff5b69000 r--p 00014000 08:05 5120350 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
7ffff5b69000-7ffff5b6a000 rw-p 00016000 08:05 5120350 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
7ffff5b6a000-7ffff5b6b000 r-xp 00000000 08:05 5119673 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7ffff5b6b000-7ffff5d6a000 ---p 00001000 08:05 5119673 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7ffff5d6a000-7ffff5d6b000 r--p 00000000 08:05 5119673 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7ffff5d6b000-7ffff5d6c000 rw-p 00001000 08:05 5119673 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7ffff5d6c000-7ffff5d71000 r-xp 00000000 08:05 5119698 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7ffff5d71000-7ffff5f70000 ---p 00005000 08:05 5119698 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7ffff5f70000-7ffff5f71000 r--p 00004000 08:05 5119698 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7ffff5f71000-7ffff5f72000 rw-p 00005000 08:05 5119698 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7ffff5f72000-7ffff5f74000 r-xp 00000000 08:05 5119690 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
7ffff5f74000-7ffff6173000 ---p 00002000 08:05 5119690 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
7ffff6173000-7ffff6174000 r--p 00001000 08:05 5119690 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
7ffff6174000-7ffff6175000 rw-p 00002000 08:05 5119690 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
7ffff6175000-7ffff6185000 r-xp 00000000 08:05 5119696 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7ffff6185000-7ffff6384000 ---p 00010000 08:05 5119696 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7ffff6384000-7ffff6385000 r--p 0000f000 08:05 5119696 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7ffff6385000-7ffff6386000 rw-p 00010000 08:05 5119696 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7ffff6386000-7ffff63a7000 r-xp 00000000 08:05 5126526 /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0
7ffff63a7000-7ffff65a6000 ---p 00021000 08:05 5126526 /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0
7ffff65a6000-7ffff65a9000 r--p 00020000 08:05 5126526 /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0
7ffff65a9000-7ffff65aa000 rw-p 00023000 08:05 5126526 /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0
7ffff65aa000-7ffff65ab000 rw-p 00000000 00:00 0
7ffff65ab000-7ffff66da000 r-xp 00000000 08:05 5119677 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7ffff66da000-7ffff68da000 ---p 0012f000 08:05 5119677 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7ffff68da000-7ffff68db000 r--p 0012f000 08:05 5119677 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7ffff68db000-7ffff68df000 rw-p 00130000 08:05 5119677 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7ffff68df000-7ffff68f7000 r-xp 00000000 08:05 1576561 /lib/x86_64-linux-gnu/libpthread-2.15.so
7ffff68f7000-7ffff6af6000 ---p 00018000 08:05 1576561 /lib/x86_64-linux-gnu/libpthread-2.15.so
7ffff6af6000-7ffff6af7000 r--p 00017000 08:05 1576561 /lib/x86_64-linux-gnu/libpthread-2.15.so
7ffff6af7000-7ffff6af8000 rw-p 00018000 08:05 1576561 /lib/x86_64-linux-gnu/libpthread-2.15.so
7ffff6af8000-7ffff6afc000 rw-p 00000000 00:00 0
7ffff6afc000-7ffff6caf000 r-xp 00000000 08:05 1576481 /lib/x86_64-linux-gnu/libc-2.15.so
7ffff6caf000-7ffff6eae000 ---p 001b3000 08:05 1576481 /lib/x86_64-linux-gnu/libc-2.15.so
7ffff6eae000-7ffff6eb2000 r--p 001b2000 08:05 1576481 /lib/x86_64-linux-gnu/libc-2.15.so
7ffff6eb2000-7ffff6eb4000 rw-p 001b6000 08:05 1576481 /lib/x86_64-linux-gnu/libc-2.15.so
7ffff6eb4000-7ffff6eb9000 rw-p 00000000 00:00 0
7ffff6eb9000-7ffff6ece000 r-xp 00000000 08:05 1576502 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6ece000-7ffff70cd000 ---p 00015000 08:05 1576502 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff70cd000-7ffff70ce000 r--p 00014000 08:05 1576502 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff70ce000-7ffff70cf000 rw-p 00015000 08:05 1576502 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff70cf000-7ffff71c8000 r-xp 00000000 08:05 1576513 /lib/x86_64-linux-gnu/libm-2.15.so
7ffff71c8000-7ffff73c7000 ---p 000f9000 08:05 1576513 /lib/x86_64-linux-gnu/libm-2.15.so
7ffff73c7000-7ffff73c8000 r--p 000f8000 08:05 1576513 /lib/x86_64-linux-gnu/libm-2.15.so
7ffff73c8000-7ffff73c9000 rw-p 000f9000 08:05 1576513 /lib/x86_64-linux-gnu/libm-2.15.so
7ffff73c9000-7ffff74ab000 r-xp 00000000 08:05 5120266 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7ffff74ab000-7ffff76aa000 ---p 000e2000 08:05 5120266 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7ffff76aa000-7ffff76b2000 r--p 000e1000 08:05 5120266 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7ffff76b2000-7ffff76b4000 rw-p 000e9000 08:05 5120266 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7ffff76b4000-7ffff76c9000 rw-p 00000000 00:00 0
7ffff76c9000-7ffff7726000 r-xp 00000000 08:05 2898 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2
7ffff7726000-7ffff7925000 ---p 0005d000 08:05 2898 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2
7ffff7925000-7ffff7927000 r--p 0005c000 08:05 2898 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2
7ffff7927000-7ffff7928000 rw-p 0005e000 08:05 2898 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2
7ffff7928000-7ffff7929000 rw-p 00000000 00:00 0
7ffff7929000-7ffff798a000 r-xp 00000000 08:05 5119616 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.6.0
7ffff798a000-7ffff7b89000 ---p 00061000 08:05 5119616 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.6.0
7ffff7b89000-7ffff7b8f000 r--p 00060000 08:05 5119616 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.6.0
7ffff7b8f000-7ffff7b90000 rw-p 00066000 08:05 5119616 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.6.0
7ffff7b90000-7ffff7b94000 rw-p 00000000 00:00 0
Program received signal SIGABRT, Aborted.
0x00007ffff6b32445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff6b32445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff6b35bab in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff6b6fe2e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff6b7a626 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007ffff4537bb5 in _mesa_symbol_table_dtor ()
from /usr/lib/x86_64-linux-gnu/dri/libdricore.so
#5 0x00007ffff41024dd in glsl_symbol_table::~glsl_symbol_table() ()
from /usr/lib/x86_64-linux-gnu/dri/libglsl.so
#6 0x00007ffff4112306 in cross_validate_globals(gl_shader_program*, gl_shader**, unsigned int, bool) () from /usr/lib/x86_64-linux-gnu/dri/libglsl.so
#7 0x00007ffff4113e40 in link_shaders(gl_context*, gl_shader_program*) ()
from /usr/lib/x86_64-linux-gnu/dri/libglsl.so
#8 0x00007ffff459e21b in _mesa_glsl_link_shader ()
from /usr/lib/x86_64-linux-gnu/dri/libdricore.so
#9 0x00007ffff4592c39 in _mesa_get_fixed_func_fragment_program ()
from /usr/lib/x86_64-linux-gnu/dri/libdricore.so
#10 0x00007ffff44978e2 in _mesa_update_state_locked ()
from /usr/lib/x86_64-linux-gnu/dri/libdricore.so
#11 0x00007ffff4497d51 in _mesa_update_state ()
from /usr/lib/x86_64-linux-gnu/dri/libdricore.so
#12 0x00007ffff44a9c48 in ?? ()
from /usr/lib/x86_64-linux-gnu/dri/libdricore.so
#13 0x00007ffff44aa364 in _mesa_TexImage2D ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/x86_64-linux-gnu/dri/libdricore.so
#14 0x0000000000418b1d in initResources () at src/model.cpp:126
#15 0x0000000000419a28 in main (argc=1, args=0x7fffffffe7e8)
at src/model.cpp:350
我使用make来编译g ++ -g。我正在运行64位Linux Mint。
这是我能想到的所有可能有用的信息。如果我在这里没有提供足够的信息来找到这个问题的解决方案,只需添加评论,我就会对信息进行编辑。
那么......我该怎么做才能解决这个问题?我一直在间断地谷歌搜索并试图将它修复几个小时,但无济于事。