Django and Spatialite crash - django

I followed the instructions here to add Spatialite to my django app, but, when I try to run syncdb all crash.
Here is the only model that uses geographical points:
from django.db import models
from django.contrib.gis.db import models
class Building(models.Model):
nome = models.CharField(max_length=200, unique=True)
versione = models.IntegerField(blank=True)
indirizzo = models.CharField(max_length=200, blank=True)
numero_di_piani = models.IntegerField()
data_creazione = models.DateTimeField('data creazione', blank=True)
data_update = models.DateTimeField('data update', blank=True)
foto = models.ImageField(upload_to='buildings', blank=True)
pronto = models.BooleanField()
# Geo Django field to store a point
posizione = models.PointField(help_text="Represented as (longitude, latitude)", unique=True)
# Geo Django area dell'edificio
# area = models.PolygonField(unique=True)
# You MUST use GeoManager to make Geo Queries
objects = models.GeoManager()
def __unicode__(self):
return self.nome
Here is the error throwed by syncdb:
*** glibc detected *** /usr/bin/python: munmap_chunk(): invalid pointer: 0xb6154f98 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x72132)[0x326132]
/lib/i386-linux-gnu/libc.so.6(+0x72378)[0x326378]
/usr/lib/i386-linux-gnu/libsqlite3.so.0(+0x10d1e)[0x493d1e]
/usr/lib/i386-linux-gnu/libsqlite3.so.0(sqlite3_free+0x81)[0x495461]
/usr/lib/i386-linux-gnu/libsqlite3.so.0(+0x13068)[0x496068]
/usr/lib/i386-linux-gnu/libsqlite3.so.0(sqlite3_close+0x1c0)[0x4d1080]
/usr/local/lib/python2.7/dist-packages/pysqlite2/_sqlite.so(pysqlite_connection_close+0x102)[0x478b52]
/usr/bin/python(PyEval_EvalFrameEx+0x14c8)[0x80f8798]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python[0x808c7a2]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python[0x8073aad]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python(PyEval_EvalFrameEx+0xcd9)[0x80f7fa9]
/usr/bin/python(PyEval_EvalFrameEx+0x930)[0x80f7c00]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python[0x808c9b4]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python(PyEval_EvalFrameEx+0x1f3e)[0x80f920e]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python(PyEval_EvalFrameEx+0x7ef)[0x80f7abf]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python[0x808c7a2]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python[0x8073aad]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python[0x80c29a8]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python(PyEval_EvalFrameEx+0xcd9)[0x80f7fa9]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python[0x808c7a2]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python[0x8073aad]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python[0x80c29a8]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python(PyEval_EvalFrameEx+0xcd9)[0x80f7fa9]
/usr/bin/python(PyEval_EvalFrameEx+0x930)[0x80f7c00]
/usr/bin/python(PyEval_EvalFrameEx+0x930)[0x80f7c00]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python[0x808c9b4]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python(PyEval_EvalFrameEx+0x1f3e)[0x80f920e]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python[0x808c7a2]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python[0x8073aad]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python[0x80c2f5a]
/usr/bin/python[0x80be55b]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python(PyEval_EvalFrameEx+0xcd9)[0x80f7fa9]
/usr/bin/python(PyEval_EvalFrameEx+0x930)[0x80f7c00]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python[0x808c9b4]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python(PyEval_EvalFrameEx+0x1f3e)[0x80f920e]
/usr/bin/python(PyEval_EvalFrameEx+0x930)[0x80f7c00]
/usr/bin/python(PyEval_EvalFrameEx+0x930)[0x80f7c00]
/usr/bin/python(PyEval_EvalCodeEx+0x154)[0x80fd604]
/usr/bin/python[0x808c7a2]
/usr/bin/python(PyObject_Call+0x51)[0x805de71]
/usr/bin/python[0x8073aad]
======= Memory map: ========
00110000-0029d000 r-xp 00000000 08:01 270449 /lib/i386-linux-gnu/libcrypto.so.1.0.0
0029d000-002ab000 r--p 0018d000 08:01 270449 /lib/i386-linux-gnu/libcrypto.so.1.0.0
002ab000-002b1000 rw-p 0019b000 08:01 270449 /lib/i386-linux-gnu/libcrypto.so.1.0.0
002b1000-002b4000 rw-p 00000000 00:00 0
002b4000-00430000 r-xp 00000000 08:01 271651 /lib/i386-linux-gnu/libc-2.13.so
00430000-00432000 r--p 0017c000 08:01 271651 /lib/i386-linux-gnu/libc-2.13.so
00432000-00433000 rw-p 0017e000 08:01 271651 /lib/i386-linux-gnu/libc-2.13.so
00433000-00436000 rw-p 00000000 00:00 0
00436000-00447000 r-xp 00000000 08:01 1455353 /usr/lib/python2.7/lib-dynload/datetime.so
00447000-00448000 r--p 00010000 08:01 1455353 /usr/lib/python2.7/lib-dynload/datetime.so
00448000-0044b000 rw-p 00011000 08:01 1455353 /usr/lib/python2.7/lib-dynload/datetime.so
0044b000-0044e000 r-xp 00000000 08:01 1455372 /usr/lib/python2.7/lib-dynload/termios.so
0044e000-0044f000 r--p 00002000 08:01 1455372 /usr/lib/python2.7/lib-dynload/termios.so
0044f000-00451000 rw-p 00003000 08:01 1455372 /usr/lib/python2.7/lib-dynload/termios.so
00451000-0046b000 r-xp 00000000 08:01 1455366 /usr/lib/python2.7/lib-dynload/_ctypes.so
0046b000-0046e000 r--p 0001a000 08:01 1455366 /usr/lib/python2.7/lib-dynload/_ctypes.so
0046e000-00471000 rw-p 0001d000 08:01 1455366 /usr/lib/python2.7/lib-dynload/_ctypes.so
00471000-00480000 r-xp 00000000 08:01 1834994 /usr/local/lib/python2.7/dist-packages/pysqlite2/_sqlite.so
00480000-00481000 r--p 00 00e000 08:01 1834994 /usr/local/lib/python2.7/dist-packages/pysqlite2/_sqlite.so
00481000-00483000 rw-p 00 00f000 08:01 1834994 /usr/local/lib/python2.7/dist-packages/pysqlite2/_sqlite.so
00483000-00521000 r-xp 00000000 08:01 1447468 /usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6
00521000-00522000 ---p 0009e000 08:01 1447468 /usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6
00522000-00523000 r--p 0009e000 08:01 1447468 /usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6
00523000-00524000 rw-p 0009f000 08:01 1447468 /usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6
00524000-00525000 rw-p 00000000 00:00 0
00525000-00541000 r-xp 00000000 08:01 262584 /lib/i386-linux-gnu/libgcc_s.so.1
00541000-00542000 r--p 0001b000 08:01 262584 /lib/i386-linux-gnu/libgcc_s.so.1
00542000-00543000 rw-p 0001c000 08:01 262584 /lib/i386-linux-gnu/libgcc_s.so.1
00543000-0057f000 r-xp 00000000 08:01 1705015 /usr/lib/python2.7/dist-packages/PIL/_imaging.so
0057f000-00581000 r--p 0003b000 08:01 1705015 /usr/lib/python2.7/dist-packages/PIL/_imaging.so
00581000-00583000 rw-p 0003d000 08:01 1705015 /usr/lib/python2.7/dist-packages/PIL/_imaging.so
00583000-005a5000 r-xp 00000000 08:01 1447341 /usr/lib/i386-linux-gnu/libjpeg.so.62.0.0
005a5000-005a6000 r--p 00022000 08:01 1447341 /usr/lib/i386-linux-gnu/libjpeg.so.62.0.0
005a6000-005a7000 rw-p 00023000 08:01 1447341 /usr/lib/i386-linux-gnu/libjpeg.so.62.0.0
005b3000-005bb000 r-xp 00000000 08:01 1705775 /usr/lib/python2.7/dist-packages/simplejson/_speedups.so
005bb000-005bc000 r--p 00 007000 08:01 1705775 /usr/lib/python2.7/dist-packages/simplejson/_speedups.so
005bc000-005bd000 rw-p 00 008000 08:01 1705775 /usr/lib/python2.7/dist-packages/simplejson/_speedups.so
005c3000-005eb000 r-xp 00000000 08:01 271669 /lib/i386-linux-gnu/libm-2.13.so
005eb000-005ec000 r--p 00028000 08:01 271669 /lib/i386-linux-gnu/libm-2.13.so
005ec000-005ed000 rw-p 00029000 08:01 271669 /lib/i386-linux-gnu/libm-2.13.so
005ed000-00757000 r-xp 00000000 08:01 1851082 /usr/local/lib/libgeos-3.4.0dev.so
00757000-0075e000 r--p 00169000 08:01 1851082 /usr/local/lib/libgeos-3.4.0dev.so
0075e000-00760000 rw-p 00170000 08:01 1851082 /usr/local/lib/libgeos-3.4.0dev.so
00760000-00761000 rw-p 00000000 00:00 0
00761000-0076c000 r-xp 00000000 08:01 271673 /lib/i386-linux-gnu/libnss_files-2.13.so
0076c000-0076d000 r--p 0000a000 08:01 271673 /lib/i386-linux-gnu/libnss_files-2.13.so
0076d000-0076e000 rw-p 0000b000 08:01 271673 /lib/i386-linux-gnu/libnss_files-2.13.so
0078d000-00796000 r-xp 00000000 08:01 1851093 /usr/local/lib/libfreexl.so.1.0.0
00796000-00797000 r--p 00008000 08:01 1851093 /usr/local/lib/libfreexl.so.1.0.0
00797000-00798000 rw-p 00009000 08:01 1851093 /usr/local/lib/libfreexl.so.1.0.0
007d4000-00807000 r-xp 00000000 08:01 1469778 /usr/lib/libproj.so.0.6.6
00807000-00808000 r--p 00032000 08:01 1469778 /usr/lib/libproj.so.0.6.6
00808000-0080a000 rw-p 00033000 08:01 1469778 /usr/lib/libproj.so.0.6.6
00888000-0088b000 r-xp 00000000 08:01 1455336 /usr/lib/python2.7/lib-dynload/_heapq.so
0088b000-0088c000 r--p 00002000 08:01 1455336 /usr/lib/python2.7/lib-dynload/_heapq.so
0088c000-0088e000 rw-p 00003000 08:01 1455336 /usr/lib/python2.7/lib-dynload/_heapq.so
008a5000-00983000 r-xp 00000000 08:01 1447473 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
00983000-00984000 ---p 000de000 08:01 1447473 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
00984000-00988000 r--p 000de000 08:01 1447473 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
00988000-00989000 rw-p 000e2000 08:01 1447473 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
00989000-00990000 rw-p 00000000 00:00 0
00a77000-00a78000 rwxp 00000000 00:00 0
00ac3000-00ae1000 r-xp 00000000 08:01 271671 /lib/i386-linux-gnu/ld-2.13.so
00ae1000-00ae2000 r--p 0001d000 08:01 271671 /lib/i386-linux-gnu/ld-2.13.so
00ae2000-00ae3000 rw-p 0001e000 08:01 271671 /lib/i386-linux-gnu/ld-2.13.so
00b53000-00b77000 r-xp 00000000 08:01 1851085 /usr/local/lib/libgeos_c.so.1.8.0
00b77000-00b78000 r--p 00023000 08:01 1851085 /usr/local/lib/libgeos_c.so.1.8.0
00b78000-00b79000 rw-p 00024000 08:01 1851085 /usr/local/lib/libgeos_c.so.1.8.0
00ba6000-00bb9000 r-xp 00000000 08:01 262646 /lib/i386-linux-gnu/libz.so.1.2.3.4
00bb9000-00bba000 r--p 00012000 08:01 262646 /lib/i386-linux-gnu/libz.so.1.2.3.4
00bba000-00bbb000 rw-p 00013000 08:01 262646 /lib/i386-linux-gnu/libz.so.1.2.3.4
00bfe000-00bff000 r-xp 00000000 00:00 0 [vdso]
00d08000-00d0b000 r-xp 00000000 08:01 271667 /lib/i386-linux-gnu/libdl-2.13.so
00d0b000-00d0c000 r--p 00002000 08:01 271667 /lib/i386-linux-gnu/libdl-2.13.so
00d0c000-00d0d000 rw-p 00003000 08:01 271667 /lib/i386-linux-gnu/libdl-2.13.so
00d86000-00d9d000 r-xp 00000000 08:01 271665 /lib/i386-linux-gnu/libpthread-2.13.so
00d9d000-00d9e000 r--p 00016000 08:01 271665 /lib/i386-linux-gnu/libpthread-2.13.so
00d9e000-00d9f000 rw-p 00017000 08:01 271665 /lib/i386-linux-gnu/libpthread-2.13.so
00d9f000-00da1000 rw-p 00000000 00:00 0
00df3000-00df5000 r-xp 00000000 08:01 271658 /lib/i386-linux-gnu/libutil-2.13.so
00df5000-00df6000 r--p 00001000 08:01 271658 /lib/i386-linux-gnu/libutil-2.13.so
00df6000-00df7000 rw-p 00002000 08:01 271658 /lib/i386-linux-gnu/libutil-2.13.so
00e95000-00edd000 r-xp 00000000 08:01 270457 /lib/i386-linux-gnu/libssl.so.1.0.0
00edd000-00edf000 r--p 00047000 08:01 270457 /lib/i386-linux-gnu/libssl.so.1.0.0
00edf000-00ee2000 rw-p 00049000 08:01 270457 /lib/i386-linux-gnu/libssl.so.1.0.0
00f46000-00f60000 r-xp 00000000 08:01 1455348 /usr/lib/python2.7/lib-dynload/_io.so
00f60000-00f61000 r--p 00019000 08:01 1455348 /usr/lib/python2.7/lib-dynload/_io.so
00f61000-00f69000 rw-p 0001a000 08:01 1455348 /usr/lib/python2.7/lib-dynload/_io.so
00f69000-01326000 r-xp 00000000 08:01 1851113 /usr/local/lib/libspatialite.so.2.2.0
01326000-01327000 ---p 003bd000 08:01 1851113 /usr/local/lib/libspatialite.so.2.2.0
01327000-01328000 r--p 003bd000 08:01 1851113 /usr/local/lib/libspatialite.so.2.2.0
01328000-0132b000 rw-p 003be000 08:01 1851113 /usr/local/lib/libspatialite.so.2.2.0
0132b000-0132e000 rw-p 00000000 00:00 0
08048000-0826b000 r-xp 00000000 08:01 1439182 /usr/bin/python2.7
0826b000-0826c000 r--p 00222000 08:01 1439182 /usr/bin/python2.7
0826c000-082c1000 rw-p 00223000 08:01 1439182 /usr/bin/python2.7
082c1000-082cd000 rw-p 00000000 00:00 0
098d5000-0a31d000 rw-p 00000000 00:00 0 [heap]Aborted
I don't know what is the problem...
Help me!

A pretty old question, but best guess is that you are using an amalgamation build of spatialite, and that there are two (different) versions of sqlite loaded.
Don't ever do spatialite amalgamation builds, except on embedded platforms where you know everything about the configuration.

Related

Why am I getting an invalid pointer error when using MySQL C++ Connector tutorial code?

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.

C++/openCV - why does showing an image create a linux segmentation fault? (openCV bug?)

I am doing some image processing stuff however when I try to show an image which is originated from my webcam I get the following output to my terminal:
debug end of loop
debug 1
*** Error in `./mySoftware': corrupted double-linked list: 0x0917db00 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x67257)[0xb6975257]
/lib/i386-linux-gnu/libc.so.6(+0x6d577)[0xb697b577]
/lib/i386-linux-gnu/libc.so.6(+0x6d854)[0xb697b854]
/lib/i386-linux-gnu/libc.so.6(+0x6f37f)[0xb697d37f]
/lib/i386-linux-gnu/libc.so.6(__libc_malloc+0xc5)[0xb697ee05]
/usr/lib/i386-linux-gnu/libstdc++.so.6(_Znwj+0x27)[0xb6ba7187]
/usr/lib/i386-linux-gnu/libQtGui.so.4(+0x33596d)[0xb609296d]
/usr/lib/i386-linux-gnu/libQtGui.so.4(_ZN8QPainter5beginEP12QPaintDevice+0x17a)[0xb600b2aa]
/usr/lib/i386-linux-gnu/libQtGui.so.4(_ZN8QPainterC2EP12QPaintDevice+0xf9)[0xb600be49]
/usr/lib/i386-linux-gnu/libQtGui.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore+0x549)[0xb5eec1e9]
/usr/lib/i386-linux-gnu/libQtGui.so.4(+0x3842fe)[0xb60e12fe]
/usr/lib/i386-linux-gnu/libQtGui.so.4(_ZN14QWidgetPrivate16syncBackingStoreEv+0xa7)[0xb5ede057]
/usr/lib/i386-linux-gnu/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x536)[0xb5ef2626]
/usr/lib/i386-linux-gnu/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x9a)[0xb5e9364a]
/usr/lib/i386-linux-gnu/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x2e1)[0xb5e9a951]
/usr/lib/i386-linux-gnu/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8a)[0xb5bb457a]
/usr/lib/i386-linux-gnu/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x3a6)[0xb5bb8266]
/usr/lib/i386-linux-gnu/libQtCore.so.4(_ZN16QCoreApplication16sendPostedEventsEP7QObjecti+0x25)[0xb5bb8595]
/usr/lib/i386-linux-gnu/libQtCore.so.4(+0x1b6f91)[0xb5be6f91]
/lib/i386-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x299)[0xb58bced9]
/lib/i386-linux-gnu/libglib-2.0.so.0(+0x47179)[0xb58bd179]
/lib/i386-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34)[0xb58bd244]
/usr/lib/i386-linux-gnu/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x75)[0xb5be70f5]
/usr/lib/i386-linux-gnu/libQtGui.so.4(+0x1f3b66)[0xb5f50b66]
/usr/lib/i386-linux-gnu/libQtCore.so.4(_ZN16QCoreApplication13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x47)[0xb5bb85e7]
/usr/local/lib/libopencv_highgui.so.3.1(cvWaitKey+0x7e)[0xb729a90e]
/usr/local/lib/libopencv_highgui.so.3.1(_ZN2cv7waitKeyEi+0x1b)[0xb729662b]
./mySoftware[0x804c68f]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0xb6926637]
./mySoftware[0x804a851]
======= Memory map: ========
08048000-0805e000 r-xp 00000000 08:01 4194822 /home/John/mySoftware
0805e000-0805f000 r--p 00015000 08:01 4194822 /home/John/mySoftware
0805f000-08060000 rw-p 00016000 08:01 4194822 /home/John/mySoftware
09109000-0973d000 rw-p 00000000 00:00 0 [heap]
ac628000-ac688000 rw-s 00000000 00:05 57147463 /SYSV00000000 (deleted)
ac688000-ac693000 r-xp 00000000 08:01 5250432 /usr/lib/i386-linux-gnu/libjbig.so.0
ac693000-ac694000 r--p 0000a000 08:01 5250432 /usr/lib/i386-linux-gnu/libjbig.so.0
ac694000-ac697000 rw-p 0000b000 08:01 5250432 /usr/lib/i386-linux-gnu/libjbig.so.0
ac697000-ac70d000 r-xp 00000000 08:01 5250908 /usr/lib/i386-linux-gnu/libtiff.so.5.2.4
ac70d000-ac70e000 r--p 00075000 08:01 5250908 /usr/lib/i386-linux-gnu/libtiff.so.5.2.4
ac70e000-ac710000 rw-p 00076000 08:01 5250908 /usr/lib/i386-linux-gnu/libtiff.so.5.2.4
ac710000-ac711000 rw-p 00000000 00:00 0
ac711000-ac765000 r-xp 00000000 08:01 5249612 /usr/lib/i386-linux-gnu/libQtSvg.so.4.8.7
ac765000-ac766000 ---p 00054000 08:01 5249612 /usr/lib/i386-linux-gnu/libQtSvg.so.4.8.7
ac766000-ac767000 r--p 00054000 08:01 5249612 /usr/lib/i386-linux-gnu/libQtSvg.so.4.8.7
ac767000-ac768000 rw-p 00055000 08:01 5249612 /usr/lib/i386-linux-gnu/libQtSvg.so.4.8.7
ac768000-ac7c3000 r-xp 00000000 08:01 5250461 /usr/lib/i386-linux-gnu/liblcms2.so.2.0.6
ac7c3000-ac7c4000 r--p 0005a000 08:01 5250461 /usr/lib/i386-linux-gnu/liblcms2.so.2.0.6
ac7c4000-ac7c8000 rw-p 0005b000 08:01 5250461 /usr/lib/i386-linux-gnu/liblcms2.so.2.0.6
ac7c8000-ac843000 r-xp 00000000 08:01 5250536 /usr/lib/i386-linux-gnu/libmng.so.2.0.2
ac843000-ac844000 r--p 0007b000 08:01 5250536 /usr/lib/i386-linux-gnu/libmng.so.2.0.2
ac844000-ac845000 rw-p 0007c000 08:01 5250536 /usr/lib/i386-linux-gnu/libmng.so.2.0.2
ac865000-ac8c2000 r-xp 00000000 08:01 5250436 /usr/lib/i386-linux-gnu/libjpeg.so.8.0.2
ac8c2000-ac8c3000 r--p 0005c000 08:01 5250436 /usr/lib/i386-linux-gnu/libjpeg.so.8.0.2
ac8c3000-ac8c4000 rw-p 0005d000 08:01 5250436 /usr/lib/i386-linux-gnu/libjpeg.so.8.0.2
ac8cd000-ac8d4000 r-xp 00000000 08:01 5378249 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqtiff.so
ac8d4000-ac8d5000 r--p 00006000 08:01 5378249 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqtiff.so
ac8d5000-ac8d6000 rw-p 00007000 08:01 5378249 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqtiff.so
ac8d6000-ac8db000 r-xp 00000000 08:01 5378247 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqsvg.so
ac8db000-ac8dc000 r--p 00004000 08:01 5378247 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqsvg.so
ac8dc000-ac8dd000 rw-p 00005000 08:01 5378247 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqsvg.so
ac8dd000-ac8e2000 r-xp 00000000 08:01 5378246 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqmng.so
ac8e2000-ac8e3000 r--p 00004000 08:01 5378246 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqmng.so
ac8e3000-ac8e4000 rw-p 00005000 08:01 5378246 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqmng.so
ac8e4000-aca2e000 rw-s 00000000 00:05 57114694 /SYSV00000000 (deleted)
aca2e000-aca39000 r-xp 00000000 08:01 8652185 /lib/i386-linux-gnu/libnss_files-2.23.so
aca39000-aca3a000 r--p 0000a000 08:01 8652185 /lib/i386-linux-gnu/libnss_files-2.23.so
aca3a000-aca3b000 rw-p 0000b000 08:01 8652185 /lib/i386-linux-gnu/libnss_files-2.23.so
aca3b000-aca41000 rw-p 00000000 00:00 0
aca41000-aca4c000 r-xp 00000000 08:01 8652195 /lib/i386-linux-gnu/libnss_nis-2.23.so
aca4c000-aca4d000 r--p 0000a000 08:01 8652195 /lib/i386-linux-gnu/libnss_nis-2.23.so
aca4d000-aca4e000 rw-p 0000b000 08:01 8652195 /lib/i386-linux-gnu/libnss_nis-2.23.so
aca4e000-aca65000 r-xp 00000000 08:01 8652179 /lib/i386-linux-gnu/libnsl-2.23.so
aca65000-aca66000 r--p 00016000 08:01 8652179 /lib/i386-linux-gnu/libnsl-2.23.so
aca66000-aca67000 rw-p 00017000 08:01 8652179 /lib/i386-linux-gnu/libnsl-2.23.so
aca67000-aca69000 rw-p 00000000 00:00 0
aca69000-aca71000 r-xp 00000000 08:01 8652181 /lib/i386-linux-gnu/libnss_compat-2.23.so
aca71000-aca72000 r--p 00007000 08:01 8652181 /lib/i386-linux-gnu/libnss_compat-2.23.so
aca72000-aca73000 rw-p 00008000 08:01 8652181 /lib/i386-linux-gnu/libnss_compat-2.23.so
aca73000-acb55000 rw-p 00000000 00:00 0
acb55000-acba0000 r--p 00000000 08:01 6426266 /usr/share/fonts/truetype/noto/NotoSans-Regular.ttf
acba0000-accf5000 r-xp 00000000 08:01 5249597 /usr/lib/i386-linux-gnu/libQtNetwork.so.4.8.7
accf5000-accf6000 ---p 00155000 08:01 5249597 /usr/lib/i386-linux-gnu/libQtNetwork.so.4.8.7
accf6000-accf9000 r--p 00155000 08:01 5249597 /usr/lib/i386-linux-gnu/libQtNetwork.so.4.8.7
accf9000-accfa000 rw-p 00158000 08:01 5249597 /usr/lib/i386-linux-gnu/libQtNetwork.so.4.8.7
accfa000-ad11a000 r-xp 00000000 08:01 5249624 /usr/lib/i386-linux-gnu/libQtXmlPatterns.so.4.8.7
ad11a000-ad11b000 ---p 00420000 08:01 5249624 /usr/lib/i386-linux-gnu/libQtXmlPatterns.so.4.8.7
ad11b000-ad136000 r--p 00420000 08:01 5249624 /usr/lib/i386-linux-gnu/libQtXmlPatterns.so.4.8.7
ad136000-ad137000 rw-p 0043b000 08:01 5249624 /usr/lib/i386-linux-gnu/libQtXmlPatterns.so.4.8.7
ad137000-ad176000 r-xp 00000000 08:01 5249609 /usr/lib/i386-linux-gnu/libQtSql.so.4.8.7
ad176000-ad177000 r--p 0003e000 08:01 5249609 /usr/lib/i386-linux-gnu/libQtSql.so.4.8.7
ad177000-ad178000 rw-p 0003f000 08:01 5249609 /usr/lib/i386-linux-gnu/libQtSql.so.4.8.7
ad178000-ad410000 r-xp 00000000 08:01 5249603 /usr/lib/i386-linux-gnu/libQtScript.so.4.8.7
ad410000-ad419000 r--p 00297000 08:01 5249603 /usr/lib/i386-linux-gnu/libQtScript.so.4.8.7
ad419000-ad41a000 rw-p 002a0000 08:01 5249603 /usr/lib/i386-linux-gnu/libQtScript.so.4.8.7
ad41a000-ad42a000 rw-p 00000000 00:00 0
ad42a000-ad7c8000 r-xp 00000000 08:01 5249582 /usr/lib/i386-linux-gnu/libQtDeclarative.so.4.8.7
ad7c8000-ad7c9000 ---p 0039e000 08:01 5249582 /usr/lib/i386-linux-gnu/libQtDeclarative.so.4.8.7
ad7c9000-ad7d8000 r--p 0039e000 08:01 5249582 /usr/lib/i386-linux-gnu/libQtDeclarative.so.4.8.7
ad7d8000-ad7da000 rw-p 003ad000 08:01 5249582 /usr/lib/i386-linux-gnu/libQtDeclarative.so.4.8.7
ad7da000-ad827000 r-xp 00000000 08:01 5378229 /usr/lib/i386-linux-gnu/qt4/plugins/accessible/libqtaccessiblewidgets.so
ad827000-ad82a000 r--p 0004c000 08:01 5378229 /usr/lib/i386-linux-gnu/qt4/plugins/accessible/libqtaccessiblewidgets.so
ad82a000-ad82b000 rw-p 0004f000 08:01 5378229 /usr/lib/i386-linux-gnu/qt4/plugins/accessible/libqtaccessiblewidgets.so
ad82b000-ad86d000 r-xp 00000000 08:01 5249621 /usr/lib/i386-linux-gnu/libQtXml.so.4.8.7
ad86d000-ad86e000 ---p 00042000 08:01 5249621 /usr/lib/i386-linux-gnu/libQtXml.so.4.8.7
ad86e000-ad86f000 r--p 00042000 08:01 5249621 /usr/lib/i386-linux-gnu/libQtXml.so.4.8.7
ad86f000-ad870000 rw-p 00043000 08:01 5249621 /usr/lib/i386-linux-gnu/libQtXml.so.4.8.7
ad870000-ad8f5000 r-xp 00000000 08:01 5249579 /usr/lib/i386-linux-gnu/libQtDBus.so.4.8.7
ad8f5000-ad8f6000 r--p 00084000 08:01 5249579 /usr/lib/i386-linux-gnu/libQtDBus.so.4.8.7
ad8f6000-ad8f7000 rw-p 00085000 08:01 5249579 /usr/lib/i386-linux-gnu/libQtDBus.so.4.8.7
ad8f7000-ad934000 r-xp 00000000 08:01 5378230 /usr/lib/i386-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so
ad934000-ad935000 r--p 0003c000 08:01 5378230 /usr/lib/i386-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so
ad935000-ad936000 rw-p 0003d000 08:01 5378230 /usr/lib/i386-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so
ad936000-ad981000 r--p 00000000 08:01 6426266 /usr/share/fonts/truetype/noto/NotoSans-Regular.ttf
ad981000-ad9b6000 r-xp 00000000 08:01 5375962 /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so
ad9b6000-ad9b7000 r--p 00034000 08:01 5375962 /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so
ad9b7000-ad9b8000 rw-p 00035000 08:01 5375962 /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so
ad9b8000-ad9e6000 r-xp 00000000 08:01 5249751 /usr/lib/i386-linux-gnu/libatspi.so.0.0.1
ad9e6000-ad9e8000 r--p 0002d000 08:01 5249751 /usr/lib/i386-linux-gnu/libatspi.so.0.0.1
ad9e8000-ad9e9000 rw-p 0002f000 08:01 5249751 /usr/lib/i386-linux-gnu/libatspi.so.0.0.1
ad9e9000-ada1a000 r-xp 00000000 08:01 5249745 /usr/lib/i386-linux-gnu/libatk-bridge-2.0.so.0.0.0
ada1a000-ada1b000 r--p 00030000 08:01 5249745 /usr/lib/i386-linux-gnu/libatk-bridge-2.0.so.0.0.0
ada1b000-ada1c000 rw-p 00031000 08:01 5249745 /usr/lib/i386-linux-gnu/libatk-bridge-2.0.so.0.0.0
ada1c000-ada1d000 rw-p 00000000 00:00 0
ada1d000-ada21000 r-xp 00000000 08:01 5378248 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqtga.so
ada21000-ada22000 r--p 00003000 08:01 5378248 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqtga.so
ada22000-ada23000 rw-p 00004000 08:01 5378248 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqtga.so
ada23000-ada2a000 r-xp 00000000 08:01 5378245 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqjpeg.so
ada2a000-ada2b000 r--p 00006000 08:01 5378245 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqjpeg.so
ada2b000-ada2c000 rw-p 00007000 08:01 5378245 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqjpeg.so
ada2c000-ada33000 r-xp 00000000 08:01 5378244 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqico.so
ada33000-ada34000 r--p 00006000 08:01 5378244 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqico.so
ada34000-ada35000 rw-p 00007000 08:01 5378244 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqico.so
ada35000-ada3b000 r-xp 00000000 08:01 5378243 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqgif.so
ada3b000-ada3c000 r--p 00005000 08:01 5378243 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqgif.so
ada3c000-ada3d000 rw-p 00006000 08:01 5378243 /usr/lib/i386-linux-gnu/qt4/plugins/imageformats/libqgif.so
ada3d000-ada97000 r-xp 00000000 08:01 5375984 /usr/lib/i386-linux-gnu/gtk-2.0/modules/libgail.so
ada97000-ada98000 r--p 00059000 08:01 5375984 /usr/lib/i386-linux-gnu/gtk-2.0/modules/libgail.so
ada98000-ada99000 rw-p 0005a000 08:01 5375984 /usr/lib/i386-linux-gnu/gtk-2.0/modules/libgail.so
ada99000-adaad000 r-xp 00000000 08:01 8652132 /lib/i386-linux-gnu/libgpg-error.so.0.17.0
adaad000-adaae000 r--p 00013000 08:01 8652132 /lib/i386-linux-gnu/libgpg-error.so.0.17.0
adaae000-adaaf000 rw-p 00014000 08:01 8652132 /lib/i386-linux-gnu/libgpg-error.so.0.17.0
adaaf000-adb5a000 r-xp 00000000 08:01 8652128 /lib/i386-linux-gnu/libgcrypt.so.20.0.5
adb5a000-adb5b000 r--p 000aa000 08:01 8652128 /lib/i386-linux-gnu/libgcrypt.so.20.0.5
adb5b000-adb5e000 rw-p 000ab000 08:01 8652128 /lib/i386-linux-gnu/libgcrypt.so.20.0.5
adb5e000-adbe8000 r-xp 00000000 08:01 5250174 /usr/lib/i386-linux-gnu/libgmp.so.10.3.0
adbe8000-adbe9000 r--p 00089000 08:01 5250174 /usr/lib/i386-linux-gnu/libgmp.so.10.3.0
adbe9000-adbea000 rw-p 0008a000 08:01 5250174 /usr/lib/i386-linux-gnu/libgmp.so.10.3.0
adbea000-adc1d000 r-xp 00000000 08:01 5250349 /usr/lib/i386-linux-gnu/libhogweed.so.4.2
adc1d000-adc1e000 r--p 00032000 08:01 5250349 /usr/lib/i386-linux-gnu/libhogweed.so.4.2
adc1e000-adc1f000 rw-p 00033000 08:01 5250349 /usr/lib/i386-linux-gnu/libhogweed.so.4.2
adc1f000-adc59000 r-xp 00000000 08:01 5250586 /usr/lib/i386-linux-gnu/libnettle.so.6.2
adc59000-adc5a000 r--p 00039000 08:01 5250586 /usr/lib/i386-linux-gnu/libnettle.so.6.2
adc5a000-adc5b000 rw-p 0003a000 08:01 5250586 /usr/lib/i386-linux-gnu/libnettle.so.6.2
adc5b000-adc6e000 r-xp 00000000 08:01 5250885 /usr/lib/i386-linux-gnu/libtasn1.so.6.5.1
adc6e000-adc6f000 r--p 00012000 08:01 5250885 /usr/lib/i386-linux-gnu/libtasn1.so.6.5.1
adc6f000-adc70000 rw-p 00013000 08:01 5250885 /usr/lib/i386-linux-gnu/libtasn1.so.6.5.1
adc70000-adca2000 r-xp 00000000 08:01 5250389 /usr/lib/i386-linux-gnu/libidn.so.11.6.15
adca2000-adca3000 r--p 00031000 08:01 5250389 /usr/lib/i386-linux-gnu/libidn.so.11.6.15
adca3000-adca4000 rw-p 00032000 08:01 5250389 /usr/lib/i386-linux-gnu/libidn.so.11.6.15
adca4000-adcff000 r-xp 00000000 08:01 5250650 /usr/lib/i386-linux-gnu/libp11-kit.so.0.1.0
adcff000-add00000 ---p 0005b000 08:01 5250650 /usr/lib/i386-linux-gnu/libp11-kit.so.0.1.0
add00000-add05000 r--p 0005b000 08:01 5250650 /usr/lib/i386-linux-gnu/libp11-kit.so.0.1.0
add05000-add06000 rw-p 00060000 08:01 5250650 /usr/lib/i386-linux-gnu/libp11-kit.so.0.1.0
add06000-add91000 r-xp 00000000 08:01 8652254 /lib/i386-linux-gnu/libsystemd.so.0.14.0
add91000-add93000 r--p 0008a000 08:01 8652254 /lib/i386-linux-gnu/libsystemd.so.0.14.0
add93000-add94000 rw-p 0008c000 08:01 8652254 /lib/i386-linux-gnu/libsystemd.so.0.14.0
add94000-addb8000 r-xp 00000000 08:01 8652155 /lib/i386-linux-gnu/liblzma.so.5.0.0
addb8000-addb9000 r--p 00023000 08:01 8652155 /lib/i386-linux-gnu/liblzma.so.5.0.0
addb9000-addba000 rw-p 00024000 08:01 8652155 /lib/i386-linux-gnu/liblzma.so.5.0.0
addba000-addcc000 r-xp 00000000 08:01 5249755 /usr/lib/i386-linux-gnu/libavahi-client.so.3.2.9
addcc000-addcd000 r--p 00011000 08:01 5249755 /usr/lib/i386-linux-gnu/libavahi-client.so.3.2.9
addcd000-addce000 rw-p 00012000 08:01 5249755 /usr/lib/i386-linux-gnu/libavahi-client.so.3.2.9
addce000-addda000 r-xp 00000000 08:01 5249757 /usr/lib/i386-linux-gnu/libavahi-common.so.3.5.3
addda000-adddb000 r--p 0000b000 08:01 5249757 /usr/lib/i386-linux-gnu/libavahi-common.so.3.5.3
adddb000-adddc000 rw-p 0000c000 08:01 5249757 /usr/lib/i386-linux-gnu/libavahi-common.so.3.5.3
adddc000-adf2b000 r-xp 00000000 08:01 5250194 /usr/lib/i386-linux-gnu/libgnutls.so.30.6.2
adf2b000-adf2c000 ---p 0014f000 08:01 5250194 /usr/lib/i386-linux-gnu/libgnutls.so.30.6.2
adf2c000-adf32000 r--p 0014f000 08:01 5250194 /usr/lib/i386-linux-gnu/libgnutls.so.30.6.2
adf32000-adf33000 rw-p 00155000 08:01 5250194 /usr/lib/i386-linux-gnu/libgnutls.so.30.6.2
adf33000-adf34000 rw-p 00000000 00:00 0
adf34000-adf8b000 r-xp 00000000 08:01 8652104 /lib/i386-linux-gnu/libdbus-1.so.3.14.6
adf8b000-adf8c000 ---p 00057000 08:01 8652104 /lib/i386-linux-gnu/libdbus-1.so.3.14.6
adf8c000-adf8d000 r--p 00057000 08:01 8652104 /lib/i386-linux-gnu/libdbus-1.so.3.14.6
adf8d000-adf8e000 rw-p 00058000 08:01 8652104 /lib/i386-linux-gnu/libdbus-1.so.3.14.6
adf8e000-adfb7000 r-xp 00000000 08:01 5249911 /usr/lib/i386-linux-gnu/libdbus-glib-1.so.2.3.3
adfb7000-adfb8000 ---p 00029000 08:01 5249911 /usr/lib/i386-linux-gnu/libdbus-glib-1.so.2.3.3
adfb8000-adfb9000 r--p 00029000 08:01 5249911 /usr/lib/i386-linux-gnu/libdbus-glib-1.so.2.3.3
adfb9000-adfba000 rw-p 0002a000 08:01 5249911 /usr/lib/i386-linux-gnu/libdbus-glib-1.so.2.3.3
adfba000-ae191000 r-xp 00000000 08:01 5251112 /usr/lib/i386-linux-gnu/libxml2.so.2.9.3
ae191000-ae192000 ---p 001d7000 08:01 5251112 /usr/lib/i386-linux-gnu/libxml2.so.2.9.3
ae192000-ae196000 r--p 001d7000 08:01 5251112 /usr/lib/i386-linux-gnu/libxml2.so.2.9.3
ae196000-ae197000 rw-p 001db000 08:01 5251112 /usr/lib/i386-linux-gnu/libxml2.so.2.9.3
ae197000-ae198000 rw-p 00000000 00:00 0
ae198000-ae1cb000 r-xp 00000000 08:01 5250108 /usr/lib/i386-linux-gnu/libgconf-2.so.4.1.5
ae1cb000-ae1cc000 r--p 00032000 08:01 5250108 /usr/lib/i386-linux-gnu/libgconf-2.so.4.1.5
ae1cc000-ae1cd000 rw-p 00033000 08:01 5250108 /usr/lib/i386-linux-gnu/libgconf-2.so.4.1.5
ae1cd000-ae23b000 r-xp 00000000 08:01 5250190 /usr/lib/i386-linux-gnu/libgnomevfs-2.so.0.2400.4
ae23b000-ae23d000 r--p 0006d000 08:01 5250190 /usr/lib/i386-linux-gnu/libgnomevfs-2.so.0.2400.4
ae23d000-ae23e000 rw-p 0006f000 08:01 5250190 /usr/lib/i386-linux-gnu/libgnomevfs-2.so.0.2400.4
ae23e000-ae23f000 rw-p 00000000 00:00 0
ae23f000-ae246000 r-xp 00000000 08:01 5249908 /usr/lib/i386-linux-gnu/libdatrie.so.1.3.3
ae246000-ae247000 ---p 00007000 08:01 5249908 /usr/lib/i386-linux-gnu/libdatrie.so.1.3.3
ae247000-ae248000 r--p 00007000 08:01 5249908 /usr/lib/i386-linux-gnu/libdatrie.so.1.3.3
ae248000-ae249000 rw-p 00008000 08:01 5249908 /usr/lib/i386-linux-gnu/libdatrie.so.1.3.3
ae249000-ae26d000 r-xp 00000000 08:01 5250214 /usr/lib/i386-linux-gnu/libgraphite2.so.3.0.1
ae26d000-ae26e000 ---p 00024000 08:01 5250214 /usr/lib/i386-linux-gnu/libgraphite2.so.3.0.1
ae26e000-ae26f000 r--p 00024000 08:01 5250214 /usr/lib/i386-linux-gnu/libgraphite2.so.3.0.1
ae26f000-ae270000 rw-p 00025000 08:01 5250214 /usr/lib/i386-linux-gnu/libgraphite2.so.3.0.1
ae270000-ae279000 r-xp 00000000 08:01 5250897 /usr/lib/i386-linux-gnu/libthai.so.0.2.4
ae279000-ae27a000 r--p 00008000 08:01 5250897 /usr/lib/i386-linux-gnu/libthai.so.0.2.4
ae27a000-ae27b000 rw-p 00009000 08:01 5250897 /usr/lib/i386-linux-gnu/libthai.so.0.2.4
ae27b000-ae2dd000 r-xp 00000000 08:01 5250125 /usr/lib/i386-linux-gnu/libharfbuzz.so.0.10000.1
ae2dd000-ae2de000 r--p 00061000 08:01 5250125 /usr/lib/i386-linux-gnu/libharfbuzz.so.0.10000.1
ae2de000-ae2df000 rw-p 00062000 08:01 5250125 /usr/lib/i386-linux-gnu/libharfbuzz.so.0.10000.1
ae2df000-ae2f3000 r-xp 00000000 08:01 8652238 /lib/i386-linux-gnu/libresolv-2.23.so
ae2f3000-ae2f4000 ---p 00014000 08:01 8652238 /lib/i386-linux-gnu/libresolv-2.23.so
ae2f4000-ae2f5000 r--p 00014000 08:01 8652238 /lib/i386-linux-gnu/libresolv-2.23.so
ae2f5000-ae2f6000 rw-p 00015000 08:01 8652238 /lib/i386-linux-gnu/libresolv-2.23.so
ae2f6000-ae2f8000 rw-p 00000000 00:00 0
ae2f8000-ae31a000 r-xp 00000000 08:01 8652244 /lib/i386-linux-gnu/libselinux.so.1
ae31a000-ae31b000 ---p 00022000 08:01 8652244 /lib/i386-linux-gnu/libselinux.so.1
ae31b000-ae31c000 r--p 00022000 08:01 8652244 /lib/i386-linux-gnu/libselinux.so.1
ae31c000-ae31d000 rw-p 00023000 08:01 8652244 /lib/i386-linux-gnu/libselinux.so.1
ae31d000-ae31e000 rw-p 00000000 00:00 0
ae31e000-ae327000 r-xp 00000000 08:01 5251084 /usr/lib/i386-linux-gnu/libxcb-render.so.0.0.0
ae327000-ae328000 r--p 00008000 08:01 5251084 /usr/lib/i386-linux-gnu/libxcb-render.so.0.0.0
ae328000-ae329000 rw-p 00009000 08:01 5251084 /usr/lib/i386-linux-gnu/libxcb-render.so.0.0.0
ae329000-ae3d2000 r-xp 00000000 08:01 5250690 /usr/lib/i386-linux-gnu/libpixman-1.so.0.33.6
ae3d2000-ae3d8000 r--p 000a8000 08:01 5250690 /usr/lib/i386-linux-gnu/libpixman-1.so.0.33.6
ae3d8000-ae3d9000 rw-p 000ae000 08:01 5250690 /usr/lib/i386-linux-gnu/libpixman-1.so.0.33.6
ae3d9000-ae427000 r-xp 00000000 08:01 5250660 /usr/lib/i386-linux-gnu/libpango-1.0.so.0.3800.1
ae427000-ae428000 ---p 0004e000 08:01 5250660 /usr/lib/i386-linux-gnu/libpango-1.0.so.0.3800.1
ae428000-ae429000 r--p 0004e000 08:01 5250660 /usr/lib/i386-linux-gnu/libpango-1.0.so.0.3800.1
ae429000-ae42a000 rw-p 0004f000 08:01 5250660 /usr/lib/i386-linux-gnu/libpango-1.0.so.0.3800.1
ae42a000-ae5ee000 r-xp 00000000 08:01 5243379 /usr/lib/i386-linux-gnu/libgio-2.0.so.0.4800.1
ae5ee000-ae5ef000 ---p 001c4000 08:01 5243379 /usr/lib/i386-linux-gnu/libgio-2.0.so.0.4800.1
ae5ef000-ae5f1000 r--p 001c4000 08:01 5243379 /usr/lib/i386-linux-gnu/libgio-2.0.so.0.4800.1
ae5f1000-ae5f2000 rw-p 001c6000 08:01 5243379 /usr/lib/i386-linux-gnu/libgio-2.0.so.0.4800.1
ae5f2000-ae5f3000 rw-p 00000000 00:00 0
ae5f3000-ae61a000 r-xp 00000000 08:01 5250171 /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.2
ae61a000-ae61b000 r--p 00026000 08:01 5250171 /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.2
ae61b000-ae61c000 rw-p 00027000 08:01 5250171 /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.2
ae61c000-ae759000 r-xp 00000000 08:01 5249809 /usr/lib/i386-linux-gnu/libcairo.so.2.11400.6
ae759000-ae75b000 r--p 0013c000 08:01 5249809 /usr/lib/i386-linux-gnu/libcairo.so.2.11400.6
ae75b000-ae75c000 rw-p 0013e000 08:01 5249809 /usr/lib/i386-linux-gnu/libcairo.so.2.11400.6
ae75c000-ae75d000 rw-p 00000000 00:00 0
ae75d000-ae781000 r-xp 00000000 08:01 5249743 /usr/lib/i386-linux-gnu/libatk-1.0.so.0.21809.1
ae781000-ae783000 r--p 00023000 08:01 5249743 /usr/lib/i386-linux-gnu/libatk-1.0.so.0.21809.1
ae783000-ae784000 rw-p 00025000 08:01 5249743 /usr/lib/i386-linux-gnu/libatk-1.0.so.0.21809.1
ae784000-ae841000 r-xp 00000000 08:01 5250124 /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0.2400.30
ae841000-ae843000 r--p 000bc000 08:01 5250124 /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0.2400.30
ae843000-ae844000 rw-p 000be000 08:01 5250124 /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0.2400.30
ae844000-aed31000 r-xp 00000000 08:01 5250308 /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.30
aed31000-aed32000 ---p 004ed000 08:01 5250308 /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.30
aed32000-aed36000 r--p 004ed000 08:01 5250308 /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.30
aed36000-aed38000 rw-p 004f1000 08:01 5250308 /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.30
aed38000-aed3a000 rw-p 00000000 00:00 0 Aborted
This is what my code looks like:
int main(int argc, char** argv)
{
while(1)
{
while(1)
{
// some algorithms
cerr<<"debug end of loop"<<endl;
}
imshow("imgFrame", imgFrame);
cerr<<"debug 1"<<endl;
char c = (char)waitKey(10);
cerr<<"debug 2"<<endl;
if( c == 27 ) break;
cap >> imgFrame;
}
return 0;
}
the corresponding valgrind output: https://pastebin.com/ch1h2aFL
Could someone explain me what I may be doing wrong? is this an openCV bug?
the code being used: https://pastebin.com/brtR3eHn
You call imshow first, cap>>imgFrame later which might be the cause at the first run.

C++ CURL - Postfields in a while loop

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

invalid pointer error in OCCI application

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);

C++ Boost program_options crash

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.