VLC wrapper in monodevelop - c#-4.0

I'm programming c# in monodevelop for ubuntu program. When the program is started, it gets run time error. The error message from GDB is here:
Native stacktrace:
/usr/bin/mono() [0x80e6431]
/usr/bin/mono() [0x8062b70]
[0xb77b940c]
/lib/i386-linux-gnu/libc.so.6(_IO_file_underflow+0x68) [0xb76cb9c8]
/lib/i386-linux-gnu/libc.so.6(_IO_default_uflow+0x19) [0xb7612449]
/lib/i386-linux-gnu/libc.so.6(__uflow+0x90) [0xb7612260]
/lib/i386-linux-gnu/libc.so.6(getc+0xb2) [0xb7608772]
/usr/lib/i386-linux-gnu/liblua5.1.so.0(luaL_loadfile+0xdc) [0xb429fd8c]
/usr/lib/vlc/plugins/lua/liblua_plugin.so(+0xa055) [0xb42d8055]
/usr/lib/vlc/plugins/lua/liblua_plugin.so(+0xa220) [0xb42d8220]
/usr/lib/vlc/plugins/lua/liblua_plugin.so(+0xd689) [0xb42db689]
/usr/lib/vlc/plugins/lua/liblua_plugin.so(+0xa546) [0xb42d8546]
/usr/lib/libvlccore.so.5(+0x916a0) [0xb52706a0]
/usr/lib/libvlccore.so.5(vlc_module_load+0x573) [0xb5270de3]
/usr/lib/libvlccore.so.5(module_need+0x42) [0xb5271302]
/usr/lib/libvlccore.so.5(+0x27716) [0xb5206716]
/lib/i386-linux-gnu/libpthread.so.0(+0x6d4c) [0xb774fd4c]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e) [0xb768ddde]
Debug info from gdb:
TagLib: MP4: No audio tracks
Unable to attach: program terminated with signal SIGSEGV, Segmentation fault.
Could anyone give a hand about this?
Than you very much

Related

Xenomai 3.1 mercury prologue failed for thread running official demo

Hello I have the following problem running a Xenomai demo: "prologue failed for thread" EINVAL
debian:~/xenomai_mercury_lib/demo$ sudo ./alchemy/altency
0"000.665| WARNING: [main] prologue failed for thread <anonymous>, EINVAL
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
0"000.997| WARNING: [main] prologue failed for thread alt-display-2077, EINVAL
altency: failed to create display task, code -22
What I have:
debian 10.10.0-amd64, installed inside a VirtualBox
xenomai 3.1 mercury installed and built for 32bit target
xenomai configure:
../xenomai-3.1/configure --enable-lores-clock --with-core=mercury --enable-smp --enable-pshared CFLAGS="-m32 -O2" LDFLAGS="-m32"
Maybe something is missing inside the underlying OS? Something to install?
Do you have some ideas?
Thanks a lot.

LLVM Clang address sanitizer on Linux with Matlab

I tried to use address sanitizer for debug Matlab Mex code. I need invoke Matlab and then run matlab scripts to call Mex function. I did below configuration.
export LD_PRELOAD=/llvm_lib_path/libclang_rt.asan-x86_64.so
export ASAN_OPTIONS=alloc_dealloc_mismatch=0:halt_on_error=false:verbosity=1
But when I invoke Matlab, it hang up soon and can not launch the GUI.
I did the similar thing in MacOs and work as expected.
With verbosity=1, i can saw the sanitizer stopped at
==30485==T27 TSDDtor
==30485==T27 exited
==30485==T28: stack [0x2b2b6d23e000,0x2b2b6d43cdc0) size 0x1fedc0; local=0x2b2b6d43ccd4
==30485==T28 TSDDtor
==30485==T28 exited
==30485==T29: stack [0x2b2b6d23e000,0x2b2b6d43cdc0) size 0x1fedc0; local=0x2b2b6d43ccd4
==30485==T29 TSDDtor
==30485==T29 exited
==30485==T30: stack [0x2b2b6d23e000,0x2b2b6d43cdc0) size 0x1fedc0; local=0x2b2b6d43ccd4
==30485==T30 TSDDtor
==30485==T30 exited
Any thoughts?

How can I debug this User Space application crash?

I'm running a Qt5.4.0 application on my embedded Linux system (TI AM335x based) and it's stopping to run and I'm having a hard time debugging this. This is a QtWebKit QML example (youtubeview) but other QtWebKit examples are preforming the same for me so it's something WebKit based on my system.
When I run the application, it runs for a second or so, then ends with no messages. There is nothing reported to the syslog or dmesg either. When I kick it off with strace I can see this futex message:
futex(0x2d990, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x2d9ac, FUTEX_WAIT_PRIVATE, 7, NULL <unfinished ...>
+++ exited with 1 +++
Then it stops. Not very helpful... My next though was to debug this with GDB, however GDB crashes when I try to run this:
-sh-4.2# gdb youtubeview
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
...
(gdb) run
Starting program: /usr/share/qt5/examples/webkitqml/youtubeview/youtubeview
/home/mike/ulf_qt_450/ulf/build-ulf/out/work/armv7ahf-vfp-neon-linux-gnueabihf/gdb/7.5-r0.0/gdb-7.5/gdb/utils.c:1081: internal-error: virtual memory exhausted: can't allocate 64652911 bytes.
A problem internal to GDB has been detected,
This issue occurs even if I set a break point at main first, just as soon as it starts running it will get stuck and run out of memory.
Are there other tools or techniques that can be used here to help isolate the issue?
Perhaps arguments to GDB to limit memory use or give some more information about why this Qt program made it crash?
Perhaps some FDs or system variables I could use to figure out why the FUTEX is being held and failing?
I'm not sure where to take this problem right now.
The Qt code itself is pretty simple, and I don't anticipate any issues in here:
#include <QGuiApplication>
#include <QQuickView>
int main(int argc, char* argv[])
{
QGuiApplication app(argc,argv);
QQuickView view;
view.setSource(QUrl("qrc:///" QWEBKIT_EXAMPLE_NAME ".qml"));
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.show();
return app.exec();
return 0;
}
Running gdb on the device, especially with a huge library such as WebKit, is bound to get you out of memory errors.
Instead, run gdbserver on the device, and connect to it via gdb running on the host machine, using the toolchain's cross-gdb for that. In that scenario, the gdb on the host loads all the debug information, while the gdbserver on the device needs almost no memory.
It is even possible to have the separate debug information available on the host and stripped libraries on the device.
Please note that parts of WebKit are always built in release mode, even if the rest of Qt was built in debug mode, if you are going to debug into WebKit you might want to change that in the build system.
Here is a minimal example:
Device:
# gdbserver 192.168.1.2:12345 myapp
Process myapp created; pid = 989
Listening on port 12345
Host:
# arm-none-linux-gnueabi-gdb myapp
GNU gdb (Sourcery G++ Lite 2009q1-203) 6.8.50.20081022-cvs
(gdb) set solib-absolute-prefix /opt/targetroot
(gdb) target remote 192.168.1.42:12345
Remote debugging using 192.168.1.42:12345
(gdb) start
The "remote" target does not support "run". Try "help target" or "continue".
(gdb) break main
Breakpoint 1 at 0x1ab9c: file myapp/main.cpp, line 12.
(gdb) cont
Continuing.
Breakpoint 1, main (argc=1, argv=0xbecfedb4) at myapp/main.cpp:12
12 QApplication app(argc, argv, QApplication::GuiServer);
And you are right that it looks like a problem in QtWebKit itself, not in your application. Good luck!

Why process terminates abnormally without coredump?

I have stuck in a such problem that my c++ server program can't coredump when terminate abnormally. The program running in daemon mode with chdir to '/'.
I had done the following things:
ulimit -c unlimited, so coredump enabled.
echo "/tmp/coredump/core.%e.%p.%t" > /proc/sys/kernel/core_pattern, and chmod a+w coredump, so it has the permission to write coredump file.
and I had try such things:
send a SIGABRT via kill -6, it can coredump.
in dmesg, I can't find any info about the abnormally terminates process.
running the program not in daemon mode.
My OS version: CentOS release 6.4 (Final), x86_64
ps. the server program installed a signal handler (sigaction() with flag SA_RESETHAND) to catch such signals {SIGHUP, SIGINT, SIGQUIT, SIGTERM} for normally terminates(free resources). so it can exclude the signal shielding.

Debug error when debugging OpenGL program remotely

I can use gdb to debug my OpenGL program on the server locally. But when I Debug it remotely. some errors come out in glutCreateWindow() function. And I can run my program remotely. Just can't debug .
freeglut (/home/fshen/samuel/project_self/GLSL-learning/teapotshader/teapotshader):
ERROR: Internal error <FBConfig with necessary capabilities not found> in
function fgOpenWindow
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 4 (X_DestroyWindow)
Resource id in failed request: 0x0
Serial number of failed request: 20
Current serial number in output stream: 23
PS:
First I can't run my program remotely. After setting export LIBGL_ALWAYS_INDIRECT=yes (I put this command in .bash_profile),I can run my project. Just can't debug it remotely. So I think i should add export LIBGL_ALWAYS_INDIRECT=yes into the GDB. But I don't know howto do it?

Resources