libvlc_new and realloc(): invalid pointer
Posted: 08 May 2015 15:10
i have empty project QT 5.4 and problem with vlc
In *.pro file:
LIBS += -lvlc
in *.cpp file:
libvlc_instance_t *instance = libvlc_new(0, NULL);
libvlc_release(instance);
And in this case i have error if it run:
realloc(): invalid pointer: 0xb70e87c8 ***
Linker log:
/opt/Qt5.4.0/5.4/gcc/bin/uic ../untitled/mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.4.0/5.4/gcc/mkspecs/linux-g++ -I../untitled -I/opt/Qt5.4.0/5.4/gcc/include -I/opt/Qt5.4.0/5.4/gcc/include/QtWidgets -I/opt/Qt5.4.0/5.4/gcc/include/QtGui -I/opt/Qt5.4.0/5.4/gcc/include/QtCore -I. -I. -I. -o main.o ../untitled/main.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.4.0/5.4/gcc/mkspecs/linux-g++ -I../untitled -I/opt/Qt5.4.0/5.4/gcc/include -I/opt/Qt5.4.0/5.4/gcc/include/QtWidgets -I/opt/Qt5.4.0/5.4/gcc/include/QtGui -I/opt/Qt5.4.0/5.4/gcc/include/QtCore -I. -I. -I. -o mainwindow.o ../untitled/mainwindow.cpp
/opt/Qt5.4.0/5.4/gcc/bin/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.4.0/5.4/gcc/mkspecs/linux-g++ -I/home/kozev/workspace/Qt/untitled -I/opt/Qt5.4.0/5.4/gcc/include -I/opt/Qt5.4.0/5.4/gcc/include/QtWidgets -I/opt/Qt5.4.0/5.4/gcc/include/QtGui -I/opt/Qt5.4.0/5.4/gcc/include/QtCore -I. ../untitled/mainwindow.h -o moc_mainwindow.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.4.0/5.4/gcc/mkspecs/linux-g++ -I../untitled -I/opt/Qt5.4.0/5.4/gcc/include -I/opt/Qt5.4.0/5.4/gcc/include/QtWidgets -I/opt/Qt5.4.0/5.4/gcc/include/QtGui -I/opt/Qt5.4.0/5.4/gcc/include/QtCore -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
g++ -Wl,-rpath,/opt/Qt5.4.0/5.4/gcc -Wl,-rpath,/opt/Qt5.4.0/5.4/gcc/lib -o untitled main.o mainwindow.o moc_mainwindow.o -lvlc -L/opt/Qt5.4.0/5.4/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
libs uses:
ldd ./untitled
linux-gate.so.1 => (0xb775e000)
libvlc.so.5 => /usr/lib/libvlc.so.5 (0xb7723000)
libQt5Widgets.so.5 => /opt/Qt5.4.0/5.4/gcc/lib/libQt5Widgets.so.5 (0xb70ab000)
libQt5Core.so.5 => /opt/Qt5.4.0/5.4/gcc/lib/libQt5Core.so.5 (0xb6b67000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6a7e000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6a61000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb68b3000)
libvlccore.so.7 => /usr/lib/libvlccore.so.7 (0xb67c4000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb67a7000)
libQt5Gui.so.5 => /opt/Qt5.4.0/5.4/gcc/lib/libQt5Gui.so.5 (0xb6206000)
libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb61b4000)
libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb60a8000)
libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb5f74000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb5f2d000)
libicui18n.so.53 => /opt/Qt5.4.0/5.4/gcc/lib/libicui18n.so.53 (0xb5cd6000)
libicuuc.so.53 => /opt/Qt5.4.0/5.4/gcc/lib/libicuuc.so.53 (0xb5b57000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb5b52000)
libgthread-2.0.so.0 => /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 (0xb5b4f000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb5b45000)
/lib/ld-linux.so.2 (0xb775f000)
libidn.so.11 => /usr/lib/i386-linux-gnu/libidn.so.11 (0xb5b12000)
libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xb5ac7000)
libGL.so.1 => /usr/lib/i386-linux-gnu/mesa/libGL.so.1 (0xb5a67000)
libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb5a60000)
libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb5a21000)
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb59ff000)
libicudata.so.53 => /opt/Qt5.4.0/5.4/gcc/lib/libicudata.so.53 (0xb4576000)
libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xb455e000)
libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb454b000)
libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb4546000)
libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb4540000)
libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xb453d000)
libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xb4525000)
libxcb-dri2.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri2.so.0 (0xb451f000)
libxcb-dri3.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri3.so.0 (0xb451a000)
libxcb-present.so.0 => /usr/lib/i386-linux-gnu/libxcb-present.so.0 (0xb4516000)
libxcb-sync.so.1 => /usr/lib/i386-linux-gnu/libxcb-sync.so.1 (0xb450f000)
libxshmfence.so.1 => /usr/lib/i386-linux-gnu/libxshmfence.so.1 (0xb450c000)
libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xb4506000)
libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xb44f7000)
libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb44f3000)
libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb44ec000)
VLC: VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28)
OS: Linux 3.13.0-52-generic #86-Ubuntu SMP Mon May 4 04:32:15 UTC 2015 i686 i686 i686 GNU/Linux
In *.pro file:
LIBS += -lvlc
in *.cpp file:
libvlc_instance_t *instance = libvlc_new(0, NULL);
libvlc_release(instance);
And in this case i have error if it run:
realloc(): invalid pointer: 0xb70e87c8 ***
Linker log:
/opt/Qt5.4.0/5.4/gcc/bin/uic ../untitled/mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.4.0/5.4/gcc/mkspecs/linux-g++ -I../untitled -I/opt/Qt5.4.0/5.4/gcc/include -I/opt/Qt5.4.0/5.4/gcc/include/QtWidgets -I/opt/Qt5.4.0/5.4/gcc/include/QtGui -I/opt/Qt5.4.0/5.4/gcc/include/QtCore -I. -I. -I. -o main.o ../untitled/main.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.4.0/5.4/gcc/mkspecs/linux-g++ -I../untitled -I/opt/Qt5.4.0/5.4/gcc/include -I/opt/Qt5.4.0/5.4/gcc/include/QtWidgets -I/opt/Qt5.4.0/5.4/gcc/include/QtGui -I/opt/Qt5.4.0/5.4/gcc/include/QtCore -I. -I. -I. -o mainwindow.o ../untitled/mainwindow.cpp
/opt/Qt5.4.0/5.4/gcc/bin/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.4.0/5.4/gcc/mkspecs/linux-g++ -I/home/kozev/workspace/Qt/untitled -I/opt/Qt5.4.0/5.4/gcc/include -I/opt/Qt5.4.0/5.4/gcc/include/QtWidgets -I/opt/Qt5.4.0/5.4/gcc/include/QtGui -I/opt/Qt5.4.0/5.4/gcc/include/QtCore -I. ../untitled/mainwindow.h -o moc_mainwindow.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.4.0/5.4/gcc/mkspecs/linux-g++ -I../untitled -I/opt/Qt5.4.0/5.4/gcc/include -I/opt/Qt5.4.0/5.4/gcc/include/QtWidgets -I/opt/Qt5.4.0/5.4/gcc/include/QtGui -I/opt/Qt5.4.0/5.4/gcc/include/QtCore -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
g++ -Wl,-rpath,/opt/Qt5.4.0/5.4/gcc -Wl,-rpath,/opt/Qt5.4.0/5.4/gcc/lib -o untitled main.o mainwindow.o moc_mainwindow.o -lvlc -L/opt/Qt5.4.0/5.4/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
libs uses:
ldd ./untitled
linux-gate.so.1 => (0xb775e000)
libvlc.so.5 => /usr/lib/libvlc.so.5 (0xb7723000)
libQt5Widgets.so.5 => /opt/Qt5.4.0/5.4/gcc/lib/libQt5Widgets.so.5 (0xb70ab000)
libQt5Core.so.5 => /opt/Qt5.4.0/5.4/gcc/lib/libQt5Core.so.5 (0xb6b67000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6a7e000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6a61000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb68b3000)
libvlccore.so.7 => /usr/lib/libvlccore.so.7 (0xb67c4000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb67a7000)
libQt5Gui.so.5 => /opt/Qt5.4.0/5.4/gcc/lib/libQt5Gui.so.5 (0xb6206000)
libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb61b4000)
libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb60a8000)
libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb5f74000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb5f2d000)
libicui18n.so.53 => /opt/Qt5.4.0/5.4/gcc/lib/libicui18n.so.53 (0xb5cd6000)
libicuuc.so.53 => /opt/Qt5.4.0/5.4/gcc/lib/libicuuc.so.53 (0xb5b57000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb5b52000)
libgthread-2.0.so.0 => /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 (0xb5b4f000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb5b45000)
/lib/ld-linux.so.2 (0xb775f000)
libidn.so.11 => /usr/lib/i386-linux-gnu/libidn.so.11 (0xb5b12000)
libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xb5ac7000)
libGL.so.1 => /usr/lib/i386-linux-gnu/mesa/libGL.so.1 (0xb5a67000)
libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb5a60000)
libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb5a21000)
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb59ff000)
libicudata.so.53 => /opt/Qt5.4.0/5.4/gcc/lib/libicudata.so.53 (0xb4576000)
libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xb455e000)
libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb454b000)
libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb4546000)
libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb4540000)
libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xb453d000)
libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xb4525000)
libxcb-dri2.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri2.so.0 (0xb451f000)
libxcb-dri3.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri3.so.0 (0xb451a000)
libxcb-present.so.0 => /usr/lib/i386-linux-gnu/libxcb-present.so.0 (0xb4516000)
libxcb-sync.so.1 => /usr/lib/i386-linux-gnu/libxcb-sync.so.1 (0xb450f000)
libxshmfence.so.1 => /usr/lib/i386-linux-gnu/libxshmfence.so.1 (0xb450c000)
libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xb4506000)
libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xb44f7000)
libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb44f3000)
libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb44ec000)
VLC: VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28)
OS: Linux 3.13.0-52-generic #86-Ubuntu SMP Mon May 4 04:32:15 UTC 2015 i686 i686 i686 GNU/Linux