I am using the code from this tutorial to experiment with OCCI:
http://oradim.blogspot.com.br/2009/08/getting-started-with-occi-linux-version_16.html
When I try to run the application, it gives me the following error:
*** Error in `./occi_test': free(): invalid pointer: 0x0000000000cb7578 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fd386f347e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7fd386f3ce0a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fd386f4098c]
./occi_test[0x4013e3]
./occi_test[0x4011e6]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fd386edd830]
./occi_test[0x4010f9]
======= Memory map: ========
00400000-00403000 r-xp 00000000 08:05 9438076 /home/cohen/NetBeansProjects/OCCI_TEST/dist/Debug/GNU-Linux/occi_test
00602000-00603000 r--p 00002000 08:05 9438076 /home/cohen/NetBeansProjects/OCCI_TEST/dist/Debug/GNU-Linux/occi_test
00603000-00604000 rw-p 00003000 08:05 9438076 /home/cohen/NetBeansProjects/OCCI_TEST/dist/Debug/GNU-Linux/occi_test
00c16000-00cc9000 rw-p 00000000 00:00 0 [heap]
7fd380000000-7fd380021000 rw-p 00000000 00:00 0
7fd380021000-7fd384000000 ---p 00000000 00:00 0
7fd384277000-7fd384278000 r-xp 00000000 08:05 13635893 /lib/x86_64-linux-gnu/libaio.so.1.0.1
7fd384278000-7fd384477000 ---p 00001000 08:05 13635893 /lib/x86_64-linux-gnu/libaio.so.1.0.1
7fd384477000-7fd384478000 r--p 00000000 08:05 13635893 /lib/x86_64-linux-gnu/libaio.so.1.0.1
7fd384478000-7fd384479000 rw-p 00001000 08:05 13635893 /lib/x86_64-linux-gnu/libaio.so.1.0.1
7fd384479000-7fd384489000 r-xp 00000000 08:05 20584019 /u01/app/oracle/product/12/dbhome_1/lib/libnque12.so
7fd384489000-7fd384689000 ---p 00010000 08:05 20584019 /u01/app/oracle/product/12/dbhome_1/lib/libnque12.so
7fd384689000-7fd38468a000 rw-p 00010000 08:05 20584019 /u01/app/oracle/product/12/dbhome_1/lib/libnque12.so
7fd38468a000-7fd38468b000 rw-p 00000000 00:00 0
7fd38468b000-7fd384695000 r-xp 00000000 08:05 25436941 /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
7fd384695000-7fd384894000 ---p 0000a000 08:05 25436941 /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
7fd384894000-7fd384895000 r--p 00009000 08:05 25436941 /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
7fd384895000-7fd384896000 rw-p 0000a000 08:05 25436941 /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
7fd384896000-7fd3848a1000 r-xp 00000000 08:05 13631575 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fd3848a1000-7fd384aa0000 ---p 0000b000 08:05 13631575 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fd384aa0000-7fd384aa1000 r--p 0000a000 08:05 13631575 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fd384aa1000-7fd384aa2000 rw-p 0000b000 08:05 13631575 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fd384aa2000-7fd384aa8000 rw-p 00000000 00:00 0
7fd384aa8000-7fd384ab3000 r-xp 00000000 08:05 13631572 /lib/x86_64-linux-gnu/libnss_nis-2.23.so
7fd384ab3000-7fd384cb2000 ---p 0000b000 08:05 13631572 /lib/x86_64-linux-gnu/libnss_nis-2.23.so
7fd384cb2000-7fd384cb3000 r--p 0000a000 08:05 13631572 /lib/x86_64-linux-gnu/libnss_nis-2.23.so
7fd384cb3000-7fd384cb4000 rw-p 0000b000 08:05 13631572 /lib/x86_64-linux-gnu/libnss_nis-2.23.so
7fd384cb4000-7fd384cca000 r-xp 00000000 08:05 13631513 /lib/x86_64-linux-gnu/libnsl-2.23.so
7fd384cca000-7fd384ec9000 ---p 00016000 08:05 13631513 /lib/x86_64-linux-gnu/libnsl-2.23.so
7fd384ec9000-7fd384eca000 r--p 00015000 08:05 13631513 /lib/x86_64-linux-gnu/libnsl-2.23.so
7fd384eca000-7fd384ecb000 rw-p 00016000 08:05 13631513 /lib/x86_64-linux-gnu/libnsl-2.23.so
7fd384ecb000-7fd384ecd000 rw-p 00000000 00:00 0
7fd384ecd000-7fd384ed5000 r-xp 00000000 08:05 13631502 /lib/x86_64-linux-gnu/libnss_compat-2.23.so
7fd384ed5000-7fd3850d4000 ---p 00008000 08:05 13631502 /lib/x86_64-linux-gnu/libnss_compat-2.23.so
7fd3850d4000-7fd3850d5000 r--p 00007000 08:05 13631502 /lib/x86_64-linux-gnu/libnss_compat-2.23.so
7fd3850d5000-7fd3850d6000 rw-p 00008000 08:05 13631502 /lib/x86_64-linux-gnu/libnss_compat-2.23.so
7fd3850d6000-7fd3850dd000 r-xp 00000000 08:05 13631584 /lib/x86_64-linux-gnu/librt-2.23.so
7fd3850dd000-7fd3852dc000 ---p 00007000 08:05 13631584 /lib/x86_64-linux-gnu/librt-2.23.so
7fd3852dc000-7fd3852dd000 r--p 00006000 08:05 13631584 /lib/x86_64-linux-gnu/librt-2.23.so
7fd3852dd000-7fd3852de000 rw-p 00007000 08:05 13631584 /lib/x86_64-linux-gnu/librt-2.23.so
7fd3852de000-7fd385454000 r-xp 00000000 08:05 20582107 /u01/app/oracle/product/12/dbhome_1/lib/libipc1.so
7fd385454000-7fd385654000 ---p 00176000 08:05 20582107 /u01/app/oracle/product/12/dbhome_1/lib/libipc1.so
7fd385654000-7fd385657000 rw-p 00176000 08:05 20582107 /u01/app/oracle/product/12/dbhome_1/lib/libipc1.so
7fd385657000-7fd38565c000 rw-p 00000000 00:00 0
7fd38565c000-7fd3859af000 r-xp 00000000 08:05 20584015 /u01/app/oracle/product/12/dbhome_1/lib/libclntshcore.so.12.1
7fd3859af000-7fd385baf000 ---p 00353000 08:05 20584015 /u01/app/oracle/product/12/dbhome_1/lib/libclntshcore.so.12.1
7fd385baf000-7fd385bb0000 r--p 00353000 08:05 20584015 /u01/app/oracle/product/12/dbhome_1/lib/libclntshcore.so.12.1
7fd385bb0000-7fd385bc9000 rw-p 00354000 08:05 20584015 /u01/app/oracle/product/12/dbhome_1/lib/libclntshcore.so.12.1
7fd385bc9000-7fd385bce000 rw-p 00000000 00:00 0
7fd385bce000-7fd385be6000 r-xp 00000000 08:05 13635974 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fd385be6000-7fd385de5000 ---p 00018000 08:05 13635974 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fd385de5000-7fd385de6000 r--p 00017000 08:05 13635974 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fd385de6000-7fd385de7000 rw-p 00018000 08:05 13635974 /lib/x86_64-linux-gnu/libpthread-2.23.so
7fd385de7000-7fd385deb000 rw-p 00000000 00:00 0
7fd385deb000-7fd385ef3000 r-xp 00000000 08:05 13631581 /lib/x86_64-linux-gnu/libm-2.23.so
7fd385ef3000-7fd3860f2000 ---p 00108000 08:05 13631581 /lib/x86_64-linux-gnu/libm-2.23.so
7fd3860f2000-7fd3860f3000 r--p 00107000 08:05 13631581 /lib/x86_64-linux-gnu/libm-2.23.so
7fd3860f3000-7fd3860f4000 rw-p 00108000 08:05 13631581 /lib/x86_64-linux-gnu/libm-2.23.so
7fd3860f4000-7fd3860f7000 r-xp 00000000 08:05 13635976 /lib/x86_64-linux-gnu/libdl-2.23.so
7fd3860f7000-7fd3862f6000 ---p 00003000 08:05 13635976 /lib/x86_64-linux-gnu/libdl-2.23.so
7fd3862f6000-7fd3862f7000 r--p 00002000 08:05 13635976 /lib/x86_64-linux-gnu/libdl-2.23.so
7fd3862f7000-7fd3862f8000 rw-p 00003000 08:05 13635976 /lib/x86_64-linux-gnu/libdl-2.23.so
7fd3862f8000-7fd38633c000 r-xp 00000000 08:05 20583989 /u01/app/oracle/product/12/dbhome_1/lib/libons.so
7fd38633c000-7fd38653b000 ---p 00044000 08:05 20583989 /u01/app/oracle/product/12/dbhome_1/lib/libons.so
7fd38653b000-7fd38653d000 rw-p 00043000 08:05 20583989 /u01/app/oracle/product/12/dbhome_1/lib/libons.so
7fd38653d000-7fd3865af000 r-xp 00000000 08:05 20582105 /u01/app/oracle/product/12/dbhome_1/lib/libmql1.so
7fd3865af000-7fd3867ae000 ---p 00072000 08:05 20582105 /u01/app/oracle/product/12/dbhome_1/lib/libmql1.so
7fd3867ae000-7fd3867b1000 rw-p 00071000 08:05 20582105 /u01/app/oracle/product/12/dbhome_1/lib/libmql1.so
7fd3867b1000-7fd3867b3000 rw-p 00000000 00:00 0
7fd3867b3000-7fd386c5a000 r-xp 00000000 08:05 20584044 /u01/app/oracle/product/12/dbhome_1/lib/libnnz12.so
7fd386c5a000-7fd386e5a000 ---p 004a7000 08:05 20584044 /u01/app/oracle/product/12/dbhome_1/lib/libnnz12.so
7fd386e5a000-7fd386ebc000 rw-p 004a7000 08:05 20584044 /u01/app/oracle/product/12/dbhome_1/lib/libnnz12.so
7fd386ebc000-7fd386ebd000 rw-p 00000000 00:00 0
7fd386ebd000-7fd38707c000 r-xp 00000000 08:05 13635975 /lib/x86_64-linux-gnu/libc-2.23.so
7fd38707c000-7fd38727c000 ---p 001bf000 08:05 13635975 /lib/x86_64-linux-gnu/libc-2.23.so
7fd38727c000-7fd387280000 r--p 001bf000 08:05 13635975 /lib/x86_64-linux-gnu/libc-2.23.so
7fd387280000-7fd387282000 rw-p 001c3000 08:05 13635975 /lib/x86_64-linux-gnu/libc-2.23.so
7fd387282000-7fd387286000 rw-p 00000000 00:00 0
7fd387286000-7fd38729c000 r-xp 00000000 08:05 13635995 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fd38729c000-7fd38749b000 ---p 00016000 08:05 13635995 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fd38749b000-7fd38749c000 rw-p 00015000 08:05 13635995 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fd38749c000-7fd38760e000 r-xp 00000000 08:05 25430146 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fd38760e000-7fd38780e000 ---p 00172000 08:05 25430146 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fd38780e000-7fd387818000 r--p 00172000 08:05 25430146 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fd387818000-7fd38781a000 rw-p 0017c000 08:05 25430146 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fd38781a000-7fd38781e000 rw-p 00000000 00:00 0
7fd38781e000-7fd38a3d9000 r-xp 00000000 08:05 20583996 /u01/app/oracle/product/12/dbhome_1/lib/libclntsh.so.12.1
7fd38a3d9000-7fd38a5d8000 ---p 02bbb000 08:05 20583996 /u01/app/oracle/product/12/dbhome_1/lib/libclntsh.so.12.1
7fd38a5d8000-7fd38a5dc000 r--p 02bba000 08:05 20583996 /u01/app/oracle/product/12/dbhome_1/lib/libclntsh.so.12.1
7fd38a5dc000-7fd38a7bb000 rw-p 02bbe000 08:05 20583996 /u01/app/oracle/product/12/dbhome_1/lib/libclntsh.so.12.1
7fd38a7bb000-7fd38a7db000 rw-p 00000000 00:00 0
7fd38a7db000-7fd38a90f000 r-xp 00000000 08:05 20583888 /u01/app/oracle/product/12/dbhome_1/lib/libocci.so.12.1
7fd38a90f000-7fd38ab0f000 ---p 00134000 08:05 20583888 /u01/app/oracle/product/12/dbhome_1/lib/libocci.so.12.1
7fd38ab0f000-7fd38ab10000 r--p 00134000 08:05 20583888 /u01/app/oracle/product/12/dbhome_1/lib/libocci.so.12.1
7fd38ab10000-7fd38ab1a000 rw-p 00135000 08:05 20583888 /u01/app/oracle/product/12/dbhome_1/lib/libocci.so.12.1
7fd38ab1a000-7fd38ab40000 r-xp 00000000 08:05 13631585 /lib/x86_64-linux-gnu/ld-2.23.so
7fd38abce000-7fd38ac30000 rw-p 00000000 00:00 0
7fd38ac30000-7fd38acef000 r--p 00000000 08:05 20583487 /u01/app/oracle/product/12/dbhome_1/oracore/zoneinfo/timezlrg_18.dat
7fd38acef000-7fd38ad20000 rw-p 00000000 00:00 0
7fd38ad3c000-7fd38ad3f000 rw-p 00000000 00:00 0
7fd38ad3f000-7fd38ad40000 r--p 00025000 08:05 13631585 /lib/x86_64-linux-gnu/ld-2.23.so
7fd38ad40000-7fd38ad41000 rw-p 00026000 08:05 13631585 /lib/x86_64-linux-gnu/ld-2.23.so
7fd38ad41000-7fd38ad42000 rw-p 00000000 00:00 0
7fff6ff52000-7fff6ff72000 rwxp 00000000 00:00 0 [stack]
7fff6ff72000-7fff6ff73000 rw-p 00000000 00:00 0
7fff6fff2000-7fff6fff4000 r--p 00000000 00:00 0 [vvar]
7fff6fff4000-7fff6fff6000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
I am running on ubuntu machine with netbeans to compile. Compilation goes like this:
g++ -c -g -I/u01/app/oracle/product/12/dbhome_1/rdbms/public -MMD -MP -MF "build/Debug/GNU-Linux/main.o.d" -o build/Debug/GNU-Linux/main.o main.cpp
mkdir -p dist/Debug/GNU-Linux
g++ -o dist/Debug/GNU-Linux/occi_test build/Debug/GNU-Linux/main.o -L/u01/app/oracle/product/12/dbhome_1/lib -lnnz12 -locci -lclntsh -lipc1
After debugging, I can see that it crashes here (user, password and ip ommited, but I use the same user and password to connect to sqlplus), but I don't know why crashes:
this->user = "usr";
this->passwd = "pass";
this->db = "myip:1521/orcl";
this->env = Environment::createEnvironment(Environment::DEFAULT);
try
{
this->con = env->createConnection(this->user, this->passwd, this->db);
cout << "12cjd" << endl;
}
catch (SQLException& ex)
{
cout << ex.getMessage();
exit(EXIT_FAILURE);
}
From your output it isn't clear your catch block is catching anything.
If you properly cleanup the connection and environment, these errors may go away.
env->terminateConnection(con);
Environment::terminateEnvironment(env);
Related
I'm trying to execute a very basic C++ program that interacts with MySQL. I implemented the very beginning of the tutorial for MySQL Connector/C++, but I keep getting a segfault when I try to execute that code. Here is the code that I'm trying to execute:
try
{
sql::mysql::MySQL_Driver *driver = NULL;
sql::Connection *conn = NULL;
driver = sql::mysql::get_mysql_driver_instance();
if (driver != NULL)
{
conn = driver->connect("127.0.0.1:3306", "root", "root");
cout << "Test" << endl;
}
delete conn;
conn = NULL;
}
When I execute this code, "Test" gets printed, but I get the following error:
*** Error in `./test': free(): invalid pointer: 0x00007f0a9a292158 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f0a999a87e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f0a999b137a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f0a999b553c]
./test(_ZN3sql9SQLStringD1Ev+0x18)[0x401296]
/lib/x86_64-linux-gnu/libc.so.6(+0x39ff8)[0x7f0a9996aff8]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7f0a9996b045]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7f0a99951837]
./test[0x400e79]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:01 6167619
/home/lichtsb1/local/src/ddsWork/mysqlTest/test
00601000-00602000 r--p 00001000 08:01 6167619
/home/lichtsb1/local/src/ddsWork/mysqlTest/test
00602000-00603000 rw-p 00002000 08:01 6167619
/home/lichtsb1/local/src/ddsWork/mysqlTest/test
02357000-023aa000 rw-p 00000000 00:00 0
[heap]
7f0a94000000-7f0a94021000 rw-p 00000000 00:00 0
7f0a94021000-7f0a98000000 ---p 00000000 00:00 0
7f0a989a8000-7f0a98ab0000 r-xp 00000000 08:01 43253857
/lib/x86_64-linux-gnu/libm-2.23.so
7f0a98ab0000-7f0a98caf000 ---p 00108000 08:01 43253857
/lib/x86_64-linux-gnu/libm-2.23.so
7f0a98caf000-7f0a98cb0000 r--p 00107000 08:01 43253857
/lib/x86_64-linux-gnu/libm-2.23.so
7f0a98cb0000-7f0a98cb1000 rw-p 00108000 08:01 43253857
/lib/x86_64-linux-gnu/libm-2.23.so
7f0a98cb1000-7f0a98cb4000 r-xp 00000000 08:01 43254080
/lib/x86_64-linux-gnu/libdl-2.23.so
7f0a98cb4000-7f0a98eb3000 ---p 00003000 08:01 43254080
/lib/x86_64-linux-gnu/libdl-2.23.so
7f0a98eb3000-7f0a98eb4000 r--p 00002000 08:01 43254080
/lib/x86_64-linux-gnu/libdl-2.23.so
7f0a98eb4000-7f0a98eb5000 rw-p 00003000 08:01 43254080
/lib/x86_64-linux-gnu/libdl-2.23.so
7f0a98eb5000-7f0a99074000 r-xp 00000000 08:01 7733609
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libcrypto.so.1.0.0
7f0a99074000-7f0a99273000 ---p 001bf000 08:01 7733609
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libcrypto.so.1.0.0
7f0a99273000-7f0a9929a000 rw-p 001be000 08:01 7733609
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libcrypto.so.1.0.0
7f0a9929a000-7f0a9929d000 rw-p 00000000 00:00 0
7f0a9929d000-7f0a99302000 r-xp 00000000 08:01 7733606
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libssl.so.1.0.0
7f0a99302000-7f0a99502000 ---p 00065000 08:01 7733606
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libssl.so.1.0.0
7f0a99502000-7f0a9950c000 rw-p 00065000 08:01 7733606
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libssl.so.1.0.0
7f0a9950c000-7f0a99513000 r-xp 00000000 08:01 43254289
/lib/x86_64-linux-gnu/librt-2.23.so
7f0a99513000-7f0a99712000 ---p 00007000 08:01 43254289
/lib/x86_64-linux-gnu/librt-2.23.so
7f0a99712000-7f0a99713000 r--p 00006000 08:01 43254289
/lib/x86_64-linux-gnu/librt-2.23.so
7f0a99713000-7f0a99714000 rw-p 00007000 08:01 43254289
/lib/x86_64-linux-gnu/librt-2.23.so
7f0a99714000-7f0a9972c000 r-xp 00000000 08:01 43253992
/lib/x86_64-linux-gnu/libpthread-2.23.so
7f0a9972c000-7f0a9992b000 ---p 00018000 08:01 43253992
/lib/x86_64-linux-gnu/libpthread-2.23.so
7f0a9992b000-7f0a9992c000 r--p 00017000 08:01 43253992
/lib/x86_64-linux-gnu/libpthread-2.23.so
7f0a9992c000-7f0a9992d000 rw-p 00018000 08:01 43253992
/lib/x86_64-linux-gnu/libpthread-2.23.so
7f0a9992d000-7f0a99931000 rw-p 00000000 00:00 0
7f0a99931000-7f0a99af1000 r-xp 00000000 08:01 43254051
/lib/x86_64-linux-gnu/libc-2.23.so
7f0a99af1000-7f0a99cf1000 ---p 001c0000 08:01 43254051
/lib/x86_64-linux-gnu/libc-2.23.so
7f0a99cf1000-7f0a99cf5000 r--p 001c0000 08:01 43254051
/lib/x86_64-linux-gnu/libc-2.23.so
7f0a99cf5000-7f0a99cf7000 rw-p 001c4000 08:01 43254051
/lib/x86_64-linux-gnu/libc-2.23.so
7f0a99cf7000-7f0a99cfb000 rw-p 00000000 00:00 0
7f0a99cfb000-7f0a99d11000 r-xp 00000000 08:01 43254905
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f0a99d11000-7f0a99f10000 ---p 00016000 08:01 43254905
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f0a99f10000-7f0a99f11000 rw-p 00015000 08:01 43254905
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f0a99f11000-7f0a9a083000 r-xp 00000000 08:01 20972156
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f0a9a083000-7f0a9a283000 ---p 00172000 08:01 20972156
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f0a9a283000-7f0a9a28d000 r--p 00172000 08:01 20972156
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f0a9a28d000-7f0a9a28f000 rw-p 0017c000 08:01 20972156
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f0a9a28f000-7f0a9a293000 rw-p 00000000 00:00 0
7f0a9a293000-7f0a9a6ed000 r-xp 00000000 08:01 7733614
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libmysqlcppconn.so.7.8.0.13
7f0a9a6ed000-7f0a9a8ed000 ---p 0045a000 08:01 7733614
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libmysqlcppconn.so.7.8.0.13
7f0a9a8ed000-7f0a9a8f8000 r--p 0045a000 08:01 7733614
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libmysqlcppconn.so.7.8.0.13
7f0a9a8f8000-7f0a9aab7000 rw-p 00465000 08:01 7733614
/home/lichtsb1/local/src/ddsWork/mysqlTest/mysql-connector-c++-8.0.13-linux-glibc2.12-x86-64bit/lib64/libmysqlcppconn.so.7.8.0.13
7f0a9aab7000-7f0a9aabd000 rw-p 00000000 00:00 0
7f0a9aabd000-7f0a9aae3000 r-xp 00000000 08:01 43253979
/lib/x86_64-linux-gnu/ld-2.23.so
7f0a9ac7b000-7f0a9acb7000 r--s 00000000 08:01 16523805
/var/cache/nscd/services
7f0a9acb7000-7f0a9acbe000 rw-p 00000000 00:00 0
7f0a9ace0000-7f0a9ace2000 rw-p 00000000 00:00 0
7f0a9ace2000-7f0a9ace3000 r--p 00025000 08:01 43253979
/lib/x86_64-linux-gnu/ld-2.23.so
7f0a9ace3000-7f0a9ace4000 rw-p 00026000 08:01 43253979
/lib/x86_64-linux-gnu/ld-2.23.so
7f0a9ace4000-7f0a9ace5000 rw-p 00000000 00:00 0
7ffe3b05c000-7ffe3b07e000 rw-p 00000000 00:00 0
[stack]
7ffe3b0dd000-7ffe3b0e0000 r--p 00000000 00:00 0
[vvar]
7ffe3b0e0000-7ffe3b0e2000 r-xp 00000000 00:00 0
[vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0
[vsyscall]
Aborted (core dumped)
This is so basic - what am I doing wrong?
Thank you very much for any help.
I was working on aqua-sim that is based on ns2 for my ubuntu and i'm getting a buffer overflow error and i can't figure out how to trace this kind of error.
i tried to debug using gdb but with no luck as i don't know how to trace the error, can someone please let me know where should i look based on the following error segment:
num_nodes is set 10
INITIALIZE THE LIST xListHead
Starting Simulation...
GOD: the old file name istest.data
GOD: the new file name isunderwater.data
*** buffer overflow detected ***: ns terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f57d8e347e5]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f57d8ed611c]
/lib/x86_64-linux-gnu/libc.so.6(+0x117120)[0x7f57d8ed4120]
/lib/x86_64-linux-gnu/libc.so.6(+0x116689)[0x7f57d8ed3689]
/lib/x86_64-linux-gnu/libc.so.6(_IO_default_xsputn+0x80)[0x7f57d8e386b0]
/lib/x86_64-linux-gnu/libc.so.6(_IO_vfprintf+0xc90)[0x7f57d8e0ae00]
/lib/x86_64-linux-gnu/libc.so.6(__vsprintf_chk+0x84)[0x7f57d8ed3714]
/lib/x86_64-linux-gnu/libc.so.6(__sprintf_chk+0x7d)[0x7f57d8ed366d]
ns[0x57ea03]
ns[0x57eb44]
ns[0x415367]
ns[0x4162e6]
ns[0x416d8c]
ns[0x5b3894]
ns[0x5b85d5]
ns[0x5bdf12]
ns[0x5c0372]
ns[0x5e7de9]
ns[0x5ec6c0]
ns[0x5e7e99]
ns[0x5ec6c0]
ns[0x613615]
ns[0x613803]
ns[0x5b8705]
ns[0x5bdf12]
ns[0x5c0372]
ns[0x5e7de9]
ns[0x5ec6c0]
ns[0x613615]
ns[0x613803]
ns[0x5b85d5]
ns[0x5bdf12]
ns[0x5c0372]
ns[0x5c1c37]
ns[0x603321]
ns[0x606936]
ns[0x405abe]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f57d8ddd830]
ns[0x410f59]
======= Memory map: ========
00400000-00766000 r-xp 00000000 08:06 2491295 /home/me/Aqua-Sim/Aqua-Sim-1.0/ns-2.30/ns
00965000-00967000 r--p 00365000 08:06 2491295 /home/me/Aqua-Sim/Aqua-Sim-1.0/ns-2.30/ns
00967000-009f2000 rw-p 00367000 08:06 2491295 /home/me/Aqua-Sim/Aqua-Sim-1.0/ns-2.30/ns
009f2000-00a00000 rw-p 00000000 00:00 0
00c2e000-01085000 rw-p 00000000 00:00 0 [heap]
7f57d8ad0000-7f57d8dbd000 r--p 00000000 08:06 2627421 /usr/lib/locale/locale-archive
7f57d8dbd000-7f57d8f7d000 r-xp 00000000 08:06 1179887 /lib/x86_64-linux-gnu/libc-2.23.so
7f57d8f7d000-7f57d917d000 ---p 001c0000 08:06 1179887 /lib/x86_64-linux-gnu/libc-2.23.so
7f57d917d000-7f57d9181000 r--p 001c0000 08:06 1179887 /lib/x86_64-linux-gnu/libc-2.23.so
7f57d9181000-7f57d9183000 rw-p 001c4000 08:06 1179887 /lib/x86_64-linux-gnu/libc-2.23.so
7f57d9183000-7f57d9187000 rw-p 00000000 00:00 0
7f57d9187000-7f57d919d000 r-xp 00000000 08:06 1184430 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f57d919d000-7f57d939c000 ---p 00016000 08:06 1184430 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f57d939c000-7f57d939d000 rw-p 00015000 08:06 1184430 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f57d939d000-7f57d9517000 r-xp 00000000 08:06 2621627 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.24
7f57d9517000-7f57d9716000 ---p 0017a000 08:06 2621627 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.24
7f57d9716000-7f57d9720000 r--p 00179000 08:06 2621627 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.24
7f57d9720000-7f57d9722000 rw-p 00183000 08:06 2621627 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.24
7f57d9722000-7f57d9725000 rw-p 00000000 00:00 0
7f57d9725000-7f57d982d000 r-xp 00000000 08:06 1179880 /lib/x86_64-linux-gnu/libm-2.23.so
7f57d982d000-7f57d9a2c000 ---p 00108000 08:06 1179880 /lib/x86_64-linux-gnu/libm-2.23.so
7f57d9a2c000-7f57d9a2d000 r--p 00107000 08:06 1179880 /lib/x86_64-linux-gnu/libm-2.23.so
7f57d9a2d000-7f57d9a2e000 rw-p 00108000 08:06 1179880 /lib/x86_64-linux-gnu/libm-2.23.so
7f57d9a2e000-7f57d9a31000 r-xp 00000000 08:06 1179868 /lib/x86_64-linux-gnu/libdl-2.23.so
7f57d9a31000-7f57d9c30000 ---p 00003000 08:06 1179868 /lib/x86_64-linux-gnu/libdl-2.23.so
7f57d9c30000-7f57d9c31000 r--p 00002000 08:06 1179868 /lib/x86_64-linux-gnu/libdl-2.23.so
7f57d9c31000-7f57d9c32000 rw-p 00003000 08:06 1179868 /lib/x86_64-linux-gnu/libdl-2.23.so
7f57d9c32000-7f57d9c58000 r-xp 00000000 08:06 1179846 /lib/x86_64-linux-gnu/ld-2.23.so
7f57d9e37000-7f57d9e3d000 rw-p 00000000 00:00 0
7f57d9e54000-7f57d9e57000 rw-p 00000000 00:00 0
7f57d9e57000-7f57d9e58000 r--p 00025000 08:06 1179846 /lib/x86_64-linux-gnu/ld-2.23.so
7f57d9e58000-7f57d9e59000 rw-p 00026000 08:06 1179846 /lib/x86_64-linux-gnu/ld-2.23.so
7f57d9e59000-7f57d9e5a000 rw-p 00000000 00:00 0
7ffeddbfa000-7ffeddc1c000 rw-p 00000000 00:00 0 [stack]
7ffeddc4b000-7ffeddc4d000 r--p 00000000 00:00 0 [vvar]
7ffeddc4d000-7ffeddc4f000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)
my gcc is 4.9,on ns-2.30, and ubuntu 16.04
I wrote simple code to try to post data in CURL in a while loop. I'm getting an error that CURL failed to initialize. I ran the simple tutorial that given online, that works and CURL initialized, but I'm having trouble with my code. Please help
I'm new to C++ and very new to CURL so please do explain in more details how to proceed.
Code:
#include <iostream>
#include <string>
#include <sstream>
#include <stdio.h>
#include <curl/curl.h>
using namespace std;
int main(void)
{
// Variables
const char *Myurl = "http://127.0.0.1:3000";
const char *Myid = "My_ID_0";
CURL *curl;
CURLcode res;
/* In windows, this will init the winsock stuff */
curl_global_init(CURL_GLOBAL_ALL);
/* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. This URL can
just as well be a https:// URL if that is what should receive the
data. */
curl_easy_setopt(curl, CURLOPT_URL, Myurl);
/* Now specify the POST data */
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, Myid);
}
double value1[6] = {-6,-5,-4,-3,-2,-1};
double value2[6] = { 1, 2, 3, 4, 5, 6};
for(int i=0; i<6; i++){
string stringvalue1 = std::to_string(value1[i]);
string stringvalue2 = std::to_string(value2[i]);
const char *Myvalue1 = stringvalue1.c_str();
const char *Myvalue2 = stringvalue2.c_str();
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, Myvalue1);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, Myvalue2);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if(res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
cout << "URL output should be: " << Myurl << "/" << Myid;
cout << "/" << Myvalue1 << "/" << Myvalue2 << endl;
}
curl_global_cleanup();
return 0;
}
Error:
curl_easy_perform() failed: Failed initialization
*** Error in `/home/me/me_workplace/Stacksocial-cURL-postURL-example/Debug/Stacksocial-cURL-postURL-example': double free or corruption (!prev): 0x0000000001a6c6d0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f66af5307e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7f66af538e0a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f66af53c98c]
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4(+0x20c9c)[0x7f66afe3ac9c]
/home/me/me_workplace/Stacksocial-cURL-postURL-example/Debug/Stacksocial-cURL-postURL-example[0x4019b2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f66af4d9830]
/home/me/me_workplace/Stacksocial-cURL-postURL-example/Debug/Stacksocial-cURL-postURL-example[0x401689]
======= Memory map: ========
00400000-00403000 r-xp 00000000 08:01 3147659 /home/me/me_workplace/Stacksocial-cURL-postURL-example/Debug/Stacksocial-cURL-postURL-example
00602000-00603000 r--p 00002000 08:01 3147659 /home/me/me_workplace/Stacksocial-cURL-postURL-example/Debug/Stacksocial-cURL-postURL-example
00603000-00604000 rw-p 00003000 08:01 3147659 /home/me/me_workplace/Stacksocial-cURL-postURL-example/Debug/Stacksocial-cURL-postURL-example
01a3c000-01a8d000 rw-p 00000000 00:00 0 [heap]
7f66a4000000-7f66a4021000 rw-p 00000000 00:00 0
7f66a4021000-7f66a8000000 ---p 00000000 00:00 0
7f66aa74b000-7f66aa754000 r-xp 00000000 08:01 1703998 /lib/x86_64-linux-gnu/libcrypt-2.23.so
7f66aa754000-7f66aa953000 ---p 00009000 08:01 1703998 /lib/x86_64-linux-gnu/libcrypt-2.23.so
7f66aa953000-7f66aa954000 r--p 00008000 08:01 1703998 /lib/x86_64-linux-gnu/libcrypt-2.23.so
7f66aa954000-7f66aa955000 rw-p 00009000 08:01 1703998 /lib/x86_64-linux-gnu/libcrypt-2.23.so
7f66aa955000-7f66aa983000 rw-p 00000000 00:00 0
7f66aa983000-7f66aaa52000 r-xp 00000000 08:01 3549154 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f66aaa52000-7f66aac52000 ---p 000cf000 08:01 3549154 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f66aac52000-7f66aac55000 r--p 000cf000 08:01 3549154 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f66aac55000-7f66aac57000 rw-p 000d2000 08:01 3549154 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f66aac57000-7f66aac58000 rw-p 00000000 00:00 0
7f66aac58000-7f66aac9e000 r-xp 00000000 08:01 3548692 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7f66aac9e000-7f66aae9e000 ---p 00046000 08:01 3548692 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7f66aae9e000-7f66aaea0000 r--p 00046000 08:01 3548692 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7f66aaea0000-7f66aaea2000 rw-p 00048000 08:01 3548692 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7f66aaea2000-7f66aaea3000 rw-p 00000000 00:00 0
7f66aaea3000-7f66aaeb1000 r-xp 00000000 08:01 3548674 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7f66aaeb1000-7f66ab0b0000 ---p 0000e000 08:01 3548674 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7f66ab0b0000-7f66ab0b1000 r--p 0000d000 08:01 3548674 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7f66ab0b1000-7f66ab0b2000 rw-p 0000e000 08:01 3548674 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7f66ab0b2000-7f66ab0d9000 r-xp 00000000 08:01 3549319 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7f66ab0d9000-7f66ab2d9000 ---p 00027000 08:01 3549319 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7f66ab2d9000-7f66ab2da000 r--p 00027000 08:01 3549319 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7f66ab2da000-7f66ab2db000 rw-p 00028000 08:01 3549319 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7f66ab2db000-7f66ab2f0000 r-xp 00000000 08:01 3549072 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7f66ab2f0000-7f66ab4ef000 ---p 00015000 08:01 3549072 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7f66ab4ef000-7f66ab4f0000 r--p 00014000 08:01 3549072 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7f66ab4f0000-7f66ab4f1000 rw-p 00015000 08:01 3549072 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7f66ab4f1000-7f66ab521000 r-xp 00000000 08:01 3548672 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7f66ab521000-7f66ab721000 ---p 00030000 08:01 3548672 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7f66ab721000-7f66ab722000 r--p 00030000 08:01 3548672 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7f66ab722000-7f66ab723000 rw-p 00031000 08:01 3548672 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7f66ab723000-7f66ab724000 rw-p 00000000 00:00 0
7f66ab724000-7f66ab7c3000 r-xp 00000000 08:01 3548117 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7f66ab7c3000-7f66ab9c2000 ---p 0009f000 08:01 3548117 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7f66ab9c2000-7f66ab9c3000 r--p 0009e000 08:01 3548117 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7f66ab9c3000-7f66ab9c6000 rw-p 0009f000 08:01 3548117 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7f66ab9c6000-7f66aba4a000 r-xp 00000000 08:01 3548768 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7f66aba4a000-7f66abc49000 ---p 00084000 08:01 3548768 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7f66abc49000-7f66abc4c000 r--p 00083000 08:01 3548768 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7f66abc4c000-7f66abc4f000 rw-p 00086000 08:01 3548768 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7f66abc4f000-7f66abc50000 rw-p 00000000 00:00 0
7f66abc50000-7f66abc58000 r-xp 00000000 08:01 3548676 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7f66abc58000-7f66abe57000 ---p 00008000 08:01 3548676 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7f66abe57000-7f66abe58000 r--p 00007000 08:01 3548676 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7f66abe58000-7f66abe59000 rw-p 00008000 08:01 3548676 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7f66abe59000-7f66abe5c000 r-xp 00000000 08:01 1708766 /lib/x86_64-linux-gnu/libkeyutils.so.1.5
7f66abe5c000-7f66ac05b000 ---p 00003000 08:01 1708766 /lib/x86_64-linux-gnu/libkeyutils.so.1.5
7f66ac05b000-7f66ac05c000 r--p 00002000 08:01 1708766 /lib/x86_64-linux-gnu/libkeyutils.so.1.5
7f66ac05c000-7f66ac05d000 rw-p 00003000 08:01 1708766 /lib/x86_64-linux-gnu/libkeyutils.so.1.5
7f66ac05d000-7f66ac060000 r-xp 00000000 08:01 1703969 /lib/x86_64-linux-gnu/libdl-2.23.so
7f66ac060000-7f66ac25f000 ---p 00003000 08:01 1703969 /lib/x86_64-linux-gnu/libdl-2.23.so
7f66ac25f000-7f66ac260000 r--p 00002000 08:01 1703969 /lib/x86_64-linux-gnu/libdl-2.23.so
7f66ac260000-7f66ac261000 rw-p 00003000 08:01 1703969 /lib/x86_64-linux-gnu/libdl-2.23.so
7f66ac261000-7f66ac268000 r-xp 00000000 08:01 3548409 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7f66ac268000-7f66ac467000 ---p 00007000 08:01 3548409 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7f66ac467000-7f66ac468000 r--p 00006000 08:01 3548409 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7f66ac468000-7f66ac469000 rw-p 00007000 08:01 3548409 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7f66ac469000-7f66ac4a6000 r-xp 00000000 08:01 3548597 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7f66ac4a6000-7f66ac6a6000 ---p 0003d000 08:01 3548597 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7f66ac6a6000-7f66ac6a7000 r--p 0003d000 08:01 3548597 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7f66ac6a7000-7f66ac6a9000 rw-p 0003e000 08:01 3548597 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7f66ac6a9000-7f66ac6aa000 rw-p 00000000 00:00 0
7f66ac6aa000-7f66ac6c3000 r-xp 00000000 08:01 3549099 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7f66ac6c3000-7f66ac8c3000 ---p 00019000 08:01 3549099 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7f66ac8c3000-7f66ac8c4000 r--p 00019000 08:01 3549099 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7f66ac8c4000-7f66ac8c5000 rw-p 0001a000 08:01 3549099 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7f66ac8c5000-7f66ac8dc000 r-xp 00000000 08:01 1703995 /lib/x86_64-linux-gnu/libresolv-2.23.so
7f66ac8dc000-7f66acadc000 ---p 00017000 08:01 1703995 /lib/x86_64-linux-gnu/libresolv-2.23.so
7f66acadc000-7f66acadd000 r--p 00017000 08:01 1703995 /lib/x86_64-linux-gnu/libresolv-2.23.so
7f66acadd000-7f66acade000 rw-p 00018000 08:01 1703995 /lib/x86_64-linux-gnu/libresolv-2.23.so
7f66acade000-7f66acae0000 rw-p 00000000 00:00 0
7f66acae0000-7f66acaea000 r-xp 00000000 08:01 3548772 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7f66acaea000-7f66acce9000 ---p 0000a000 08:01 3548772 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7f66acce9000-7f66accea000 r--p 00009000 08:01 3548772 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7f66accea000-7f66acceb000 rw-p 0000a000 08:01 3548772 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7f66acceb000-7f66accee000 r-xp 00000000 08:01 1708714 /lib/x86_64-linux-gnu/libcom_err.so.2.1
7f66accee000-7f66aceed000 ---p 00003000 08:01 1708714 /lib/x86_64-linux-gnu/libcom_err.so.2.1
7f66aceed000-7f66aceee000 r--p 00002000 08:01 1708714 /lib/x86_64-linux-gnu/libcom_err.so.2.1
7f66aceee000-7f66aceef000 rw-p 00003000 08:01 1708714 /lib/x86_64-linux-gnu/libcom_err.so.2.1
7f66aceef000-7f66acf1b000 r-xp 00000000 08:01 3548764 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7f66acf1b000-7f66ad11a000 ---p 0002c000 08:01 3548764 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7f66ad11a000-7f66ad11c000 r--p 0002b000 08:01 3548764 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7f66ad11c000-7f66ad11d000 rw-p 0002d000 08:01 3548764 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7f66ad11d000-7f66ad11e000 rw-p 00000000 00:00 0
7f66ad11e000-7f66ad1e1000 r-xp 00000000 08:01 3548770 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7f66ad1e1000-7f66ad3e1000 ---p 000c3000 08:01 3548770 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7f66ad3e1000-7f66ad3ee000 r--p 000c3000 08:01 3548770 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7f66ad3ee000-7f66ad3f0000 rw-p 000d0000 08:01 3548770 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7f66ad3f0000-7f66ad401000 r-xp 00000000 08:01 3541039 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1
7f66ad401000-7f66ad601000 ---p 00011000 08:01 3541039 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1
7f66ad601000-7f66ad602000 r--p 00011000 08:01 3541039 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1
7f66ad602000-7f66ad603000 rw-p 00012000 08:01 3541039 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1
7f66ad603000-7f66ad65c000 r-xp 00000000 08:01 3539179 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0
7f66ad65c000-7f66ad85b000 ---p 00059000 08:01 3539179 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0
7f66ad85b000-7f66ad865000 r--p 00058000 08:01 3539179 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0
7f66ad865000-7f66ad867000 rw-p 00062000 08:01 3539179 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0
7f66ad867000-7f66ad8e6000 r-xp 00000000 08:01 3548542 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
7f66ad8e6000-7f66adae5000 ---p 0007f000 08:01 3548542 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
7f66adae5000-7f66adae6000 r--p 0007e000 08:01 3548542 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
7f66adae6000-7f66adae7000 rw-p 0007f000 08:01 3548542 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
7f66adae7000-7f66adb19000 r-xp 00000000 08:01 3542647 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2
7f66adb19000-7f66add18000 ---p 00032000 08:01 3542647 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2
7f66add18000-7f66add19000 r--p 00031000 08:01 3542647 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2
7f66add19000-7f66add1a000 rw-p 00032000 08:01 3542647 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2
7f66add1a000-7f66ade22000 r-xp 00000000 08:01 1703971 /lib/x86_64-linux-gnu/libm-2.23.so
7f66ade22000-7f66ae021000 ---p 00108000 08:01 1703971 /lib/x86_64-linux-gnu/libm-2.23.so
7f66ae021000-7f66ae022000 r--p 00107000 08:01 1703971 /lib/x86_64-linux-gnu/libm-2.23.so
7f66ae022000-7f66ae023000 rw-p 00108000 08:01 1703971 /lib/x86_64-linux-gnu/libm-2.23.so
7f66ae023000-7f66ae03b000 r-xp 00000000 08:01 1703993 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f66ae03b000-7f66ae23a000 ---p 00018000 08:01 1703993 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f66ae23a000-7f66ae23b000 r--p 00017000 08:01 1703993 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f66ae23b000-7f66ae23c000 rw-p 00018000 08:01 1703993 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f66ae23c000-7f66ae240000 rw-p 00000000 00:00 0
7f66ae240000-7f66ae259000 r-xp 00000000 08:01 1708896 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f66ae259000-7f66ae458000 ---p 00019000 08:01 1708896 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f66ae458000-7f66ae459000 r--p 00018000 08:01 1708896 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f66ae459000-7f66ae45a000 rw-p 00019000 08:01 1708896 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f66ae45a000-7f66ae4a7000 r-xp 00000000 08:01 3544162 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5
7f66ae4a7000-7f66ae6a6000 ---p 0004d000 08:01 3544162 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5
7f66ae6a6000-7f66ae6a8000 r--p 0004c000 08:01 3544162 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5
7f66ae6a8000-7f66ae6a9000 rw-p 0004e000 08:01 3544162 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5
7f66ae6a9000-7f66ae6ab000 rw-p 00000000 00:00 0
7f66ae6ab000-7f66ae6b8000 r-xp 00000000 08:01 3544163 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5
7f66ae6b8000-7f66ae8b8000 ---p 0000d000 08:01 3544163 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5
7f66ae8b8000-7f66ae8b9000 r--p 0000d000 08:01 3544163 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5
7f66ae8b9000-7f66ae8ba000 rw-p 0000e000 08:01 3544163 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5
7f66ae8ba000-7f66ae901000 r-xp 00000000 08:01 3548599 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7f66ae901000-7f66aeb00000 ---p 00047000 08:01 3548599 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7f66aeb00000-7f66aeb02000 r--p 00046000 08:01 3548599 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7f66aeb02000-7f66aeb04000 rw-p 00048000 08:01 3548599 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7f66aeb04000-7f66aec27000 r-xp 00000000 08:01 3542652 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2
7f66aec27000-7f66aee26000 ---p 00123000 08:01 3542652 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2
7f66aee26000-7f66aee31000 r--p 00122000 08:01 3542652 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2
7f66aee31000-7f66aee33000 rw-p 0012d000 08:01 3542652 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2
7f66aee33000-7f66aee34000 rw-p 00000000 00:00 0
7f66aee34000-7f66aee68000 r-xp 00000000 08:01 3542650 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2
7f66aee68000-7f66af067000 ---p 00034000 08:01 3542650 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2
7f66af067000-7f66af069000 r--p 00033000 08:01 3542650 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2
7f66af069000-7f66af06a000 rw-p 00035000 08:01 3542650 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2
7f66af06a000-7f66af085000 r-xp 00000000 08:01 3549080 /usr/lib/x86_64-linux-gnu/librtmp.so.1
7f66af085000-7f66af284000 ---p 0001b000 08:01 3549080 /usr/lib/x86_64-linux-gnu/librtmp.so.1
7f66af284000-7f66af285000 r--p 0001a000 08:01 3549080 /usr/lib/x86_64-linux-gnu/librtmp.so.1
7f66af285000-7f66af286000 rw-p 0001b000 08:01 3549080 /usr/lib/x86_64-linux-gnu/librtmp.so.1
7f66af286000-7f66af2b7000 r-xp 00000000 08:01 3539421 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15
7f66af2b7000-7f66af4b7000 ---p 00031000 08:01 3539421 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15
7f66af4b7000-7f66af4b8000 r--p 00031000 08:01 3539421 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15
7f66af4b8000-7f66af4b9000 rw-p 00032000 08:01 3539421 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15
7f66af4b9000-7f66af678000 r-xp 00000000 08:01 1703973 /lib/x86_64-linux-gnu/libc-2.23.so
7f66af678000-7f66af878000 ---p 001bf000 08:01 1703973 /lib/x86_64-linux-gnu/libc-2.23.so
7f66af878000-7f66af87c000 r--p 001bf000 08:01 1703973 /lib/x86_64-linux-gnu/libc-2.23.so
7f66af87c000-7f66af87e000 rw-p 001c3000 08:01 1703973 /lib/x86_64-linux-gnu/libc-2.23.so
7f66af87e000-7f66af882000 rw-p 00000000 00:00 0
7f66af882000-7f66af898000 r-xp 00000000 08:01 1708743 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f66af898000-7f66afa97000 ---p 00016000 08:01 1708743 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f66afa97000-7f66afa98000 rw-p 00015000 08:01 1708743 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f66afa98000-7f66afc0a000 r-xp 00000000 08:01 3543844 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f66afc0a000-7f66afe0a000 ---p 00172000 08:01 3543844 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f66afe0a000-7f66afe14000 r--p 00172000 08:01 3543844 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f66afe14000-7f66afe16000 rw-p 0017c000 08:01 3543844 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f66afe16000-7f66afe1a000 rw-p 00000000 00:00 0
7f66afe1a000-7f66afe83000 r-xp 00000000 08:01 3553596 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0
7f66afe83000-7f66b0083000 ---p 00069000 08:01 3553596 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0
7f66b0083000-7f66b0086000 r--p 00069000 08:01 3553596 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0
7f66b0086000-7f66b0087000 rw-p 0006c000 08:01 3553596 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0
7f66b0087000-7f66b00ad000 r-xp 00000000 08:01 1703974 /lib/x86_64-linux-gnu/ld-2.23.so
7f66b0252000-7f66b0266000 rw-p 00000000 00:00 0
7f66b02a9000-7f66b02ac000 rw-p 00000000 00:00 0
7f66b02ac000-7f66b02ad000 r--p 00025000 08:01 1703974 /lib/x86_64-linux-gnu/ld-2.23.so
7f66b02ad000-7f66b02ae000 rw-p 00026000 08:01 1703974 /lib/x86_64-linux-gnu/ld-2.23.so
7f66b02ae000-7f66b02af000 rw-p 00000000 00:00 0
7ffe077e9000-7ffe0780a000 rw-p 00000000 00:00 0 [stack]
7ffe078c4000-7ffe078c6000 r--p 00000000 00:00 0 [vvar]
7ffe078c6000-7ffe078c8000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
<html><body><h1>POST!</h1><p>URL Path: /</p></body></html>URL output should be: http://127.0.0.1:3000/My_ID_0/-6.000000/1.000000
I'm using boost program options for my project but I can't get program exit without crashing. It crashes after exiting main function.
*** glibc detected *** bin/poolserver: double free or corruption (fasttop): 0x0000000002562100 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71e16)[0x7f64a7a3be16]
/lib/libc.so.6(cfree+0x6c)[0x7f64a7a40b8c]
/usr/lib/libstdc++.so.6(_ZNSsD1Ev+0x39)[0x7f64a826cee9]
/lib/libc.so.6(__cxa_finalize+0xa5)[0x7f64a7a00995]
/usr/local/lib/libboost_program_options.so.1.53.0(+0x2a6d6)[0x7f64a85026d6]
======= Memory map: ========
00400000-004a5000 r-xp 00000000 08:01 29687876 /var/coins/poolserver/cmake/build/bin/poolserver
006a4000-006a6000 rw-p 000a4000 08:01 29687876 /var/coins/poolserver/cmake/build/bin/poolserver
02562000-025a5000 rw-p 00000000 00:00 0 [heap]
7f64a0000000-7f64a0021000 rw-p 00000000 00:00 0
7f64a0021000-7f64a4000000 ---p 00000000 00:00 0
7f64a5b2e000-7f64a5b2f000 ---p 00000000 00:00 0
7f64a5b2f000-7f64a632f000 rw-p 00000000 00:00 0
7f64a632f000-7f64a633b000 r-xp 00000000 08:01 9166850 /lib/libnss_files-2.11.3.so
7f64a633b000-7f64a653a000 ---p 0000c000 08:01 9166850 /lib/libnss_files-2.11.3.so
7f64a653a000-7f64a653b000 r--p 0000b000 08:01 9166850 /lib/libnss_files-2.11.3.so
7f64a653b000-7f64a653c000 rw-p 0000c000 08:01 9166850 /lib/libnss_files-2.11.3.so
7f64a653c000-7f64a653d000 ---p 00000000 00:00 0
7f64a653d000-7f64a6d3d000 rw-p 00000000 00:00 0
7f64a6d3d000-7f64a6d44000 r-xp 00000000 08:01 9166856 /lib/librt-2.11.3.so
7f64a6d44000-7f64a6f43000 ---p 00007000 08:01 9166856 /lib/librt-2.11.3.so
7f64a6f43000-7f64a6f44000 r--p 00006000 08:01 9166856 /lib/librt-2.11.3.so
7f64a6f44000-7f64a6f45000 rw-p 00007000 08:01 9166856 /lib/librt-2.11.3.so
7f64a6f45000-7f64a6f5c000 r-xp 00000000 08:01 22677552 /usr/lib/libz.so.1.2.3.4
7f64a6f5c000-7f64a715b000 ---p 00017000 08:01 22677552 /usr/lib/libz.so.1.2.3.4
7f64a715b000-7f64a715c000 rw-p 00016000 08:01 22677552 /usr/lib/libz.so.1.2.3.4
7f64a715c000-7f64a7171000 r-xp 00000000 08:01 9166863 /lib/libnsl-2.11.3.so
7f64a7171000-7f64a7370000 ---p 00015000 08:01 9166863 /lib/libnsl-2.11.3.so
7f64a7370000-7f64a7371000 r--p 00014000 08:01 9166863 /lib/libnsl-2.11.3.so
7f64a7371000-7f64a7372000 rw-p 00015000 08:01 9166863 /lib/libnsl-2.11.3.so
7f64a7372000-7f64a7374000 rw-p 00000000 00:00 0
7f64a7374000-7f64a737c000 r-xp 00000000 08:01 9166865 /lib/libcrypt-2.11.3.so
7f64a737c000-7f64a757b000 ---p 00008000 08:01 9166865 /lib/libcrypt-2.11.3.so
7f64a757b000-7f64a757c000 r--p 00007000 08:01 9166865 /lib/libcrypt-2.11.3.so
7f64a757c000-7f64a757d000 rw-p 00008000 08:01 9166865 /lib/libcrypt-2.11.3.so
7f64a757d000-7f64a75ab000 rw-p 00000000 00:00 0
7f64a75ab000-7f64a75ae000 r-xp 00000000 08:01 12394545 /usr/local/lib/libboost_system.so.1.53.0
7f64a75ae000-7f64a77ad000 ---p 00003000 08:01 12394545 /usr/local/lib/libboost_system.so.1.53.0
7f64a77ad000-7f64a77ae000 rw-p 00002000 08:01 12394545 /usr/local/lib/libboost_system.so.1.53.0
7f64a77ae000-7f64a77c5000 r-xp 00000000 08:01 9166854 /lib/libpthread-2.11.3.so
7f64a77c5000-7f64a79c4000 ---p 00017000 08:01 9166854 /lib/libpthread-2.11.3.so
7f64a79c4000-7f64a79c5000 r--p 00016000 08:01 9166854 /lib/libpthread-2.11.3.so
7f64a79c5000-7f64a79c6000 rw-p 00017000 08:01 9166854 /lib/libpthread-2.11.3.so
7f64a79c6000-7f64a79ca000 rw-p 00000000 00:00 0
7f64a79ca000-7f64a7b23000 r-xp 00000000 08:01 9166859 /lib/libc-2.11.3.so
7f64a7b23000-7f64a7d22000 ---p 00159000 08:01 9166859 /lib/libc-2.11.3.so
7f64a7d22000-7f64a7d26000 r--p 00158000 08:01 9166859 /lib/libc-2.11.3.so
7f64a7d26000-7f64a7d27000 rw-p 0015c000 08:01 9166859 /lib/libc-2.11.3.so
7f64a7d27000-7f64a7d2c000 rw-p 00000000 00:00 0
7f64a7d2c000-7f64a7d42000 r-xp 00000000 08:01 9166851 /lib/libgcc_s.so.1
7f64a7d42000-7f64a7f41000 ---p 00016000 08:01 9166851 /lib/libgcc_s.so.1
7f64a7f41000-7f64a7f42000 rw-p 00015000 08:01 9166851 /lib/libgcc_s.so.1
7f64a7f42000-7f64a7fc2000 r-xp 00000000 08:01 9166872 /lib/libm-2.11.3.so
7f64a7fc2000-7f64a81c2000 ---p 00080000 08:01 9166872 /lib/libm-2.11.3.so
7f64a81c2000-7f64a81c3000 r--p 00080000 08:01 9166872 /lib/libm-2.11.3.so
7f64a81c3000-7f64a81c4000 rw-p 00081000 08:01 9166872 /lib/libm-2.11.3.so
7f64a81c4000-7f64a82ba000 r-xp 00000000 08:01 22677469 /usr/lib/libstdc++.so.6.0.13
7f64a82ba000-7f64a84ba000 ---p 000f6000 08:01 22677469 /usr/lib/libstdc++.so.6.0.13
7f64a84ba000-7f64a84c1000 r--p 000f6000 08:01 22677469 /usr/lib/libstdc++.so.6.0.13
7f64a84c1000-7f64a84c3000 rw-p 000fd000 08:01 22677469 /usr/lib/libstdc++.so.6.0.13
7f64a84c3000-7f64a84d8000 rw-p 00000000 00:00 0
7f64a84d8000-7f64a853c000 r-xp 00000000 08:01 12394575 /usr/local/lib/libboost_program_options.so.1.53.0
7f64a853c000-7f64a873b000 ---p 00064000 08:01 12394575 /usr/local/lib/libboost_program_options.so.1.53.0
7f64a873b000-7f64a8740000 rw-p 00063000 08:01 12394575 /usr/local/lib/libboost_program_options.so.1.53.0
7f64a8740000-7f64a8757000 r-xp 00000000 08:01 12394559 /usr/local/lib/libboost_thread.so.1.53.0
7f64a8757000-7f64a8956000 ---p 00017000 08:01 12394559 /usr/local/lib/libboost_thread.so.1.53.0
7f64a8956000-7f64a8958000 rw-p 00016000 08:01 12394559 /usr/local/lib/libboost_thread.so.1.53.0
7f64a8958000-7f64a8969000 r-xp 00000000 08:01 22682328 /usr/lib/libboost_date_time.so.1.42.0
7f64a8969000-7f64a8b68000 ---p 00011000 08:01 22682328 /usr/lib/libboost_date_time.so.1.42.0
7f64a8b68000-7f64a8b6a000 rw-p 00010000 08:01 22682328 /usr/lib/libboost_date_time.so.1.42.0Aborted
I'm using cmake with such options:
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(Boost_ALL_DYN_LINK ON)
I tried static linking and it worked for some time but now it crashes with any settings.
OS: Debian Squeeze
If it helps https://github.com/Intel/poolserver this is my source
Your question doesn't give us the code directly, but looking through github, I suspect the boost program options have nothing to do with it.
The error says
double free or corruption
I suspect it's this:
void DatabaseConnectionMySQL::Close()
{
delete this;
}
Problem was with boost package from debian. Compiling newest boost from source fixed crash.
This probably has nothing to do with the problem, but here's the context: I have been following a tutorial on OpenGL and decided to try creating my own bone system before looking up a potentially better implementation.
Here's the problem: I have created a simple text-based format for my skeleton file. I also load an OBJ file, two GLSL shaders, and a texture in PNG format. (In case it matters, I load the texture using STB Image from nothings.org). All of my file loading has been successful before. Loading the skeleton file is successful, but after I load the skeleton file, all subsequent attempts to load files fail, producing various errors, depending on the placement of the function call. In the position I prefer to have it, it produces a SIGABRT.
Here is my code to initialize a skeleton, plus includes:
#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];
}
}
}
}
Here is the output from 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
I am using make to compile with g++ -g. I'm running 64-bit Linux Mint.
That's all of the potentially useful information I could think of. If I did not supply enough information here to find a solution to this problem, just add a comment and I'll put in an edit with the info.
So... What can I do to fix this problem? I've been intermittently Googling it and trying to fix it for hours now, to no avail.