mvasilchuk / yasem

GNU General Public License v2.0
77 stars 52 forks source link

crash on start "SIGSEV" #12

Closed saqebakhter closed 9 years ago

saqebakhter commented 9 years ago

Hi,

After compiling, and trying to run I get a crash on startup:

[STUB ][10:37:08:236] yasem::SamsungSmartTvWebPlugin::SamsungSmartTvWebPlugin() [WARN ][10:37:08:244] Cyclic dependency in plugin "webkit-browser" with "desktop-gui" [STUB ][10:37:08:245] void yasem::WebView::loadFixes() [STUB ][10:37:08:245] QString yasem::WebView::loadFix(const QString&) [STUB ][10:37:08:245] QString yasem::WebView::loadFix(const QString&) [STUB ][10:37:08:278] bool yasem::WebPage::stb(yasem::StbPlugin) [STUB ][10:37:08:288] yasem::InterceptorManager::InterceptorManager(yasem::WebPage) [WARN ][10:37:08:288] Cyclic dependency in plugin "web-gui" with "desktop-gui" [STUB ][10:37:08:289] virtual PLUGIN_ERROR_CODES yasem::QtAvMediaPlayer::initialize() [STUB ][10:37:08:295] virtual PLUGIN_ERROR_CODES yasem::DesktopGUI::initialize() [STUB ][10:37:08:447] virtual void yasem::QtAvMediaPlayer::aspectRatio(ASPECTRATIO): 0 [STUB ][10:37:08:479] virtual void yasem::GuiConfigProfile::start() [STUB ][10:37:08:479] bool yasem::WebPage::stb(yasem::StbPlugin) [STUB ][10:37:08:480] void yasem::WebPage::resetPage() [STUB ][10:37:08:480] virtual bool yasem::WebPluginFactoryImpl::addPlugin(yasem::StbPlugin_) [STUB ][10:37:08:480] virtual void yasem::WebPluginFactoryImpl::refreshPlugins() [STUB ][10:37:08:481] void yasem::WebView::onLoadStarted() SIGSEGV 0: ./yasem() [0x40917d] 1: ./yasem() [0x408a88] 2: /lib/x86_64-linux-gnu/libpthread.so.0(+0xfc90) [0x7fe65fe85c90] Aborted (core dumped)

Any idea ?

mvasilchuk commented 9 years ago

Could you please run the app from QtCreator in debug mode to see where exactly the crash happens?

saqebakhter commented 9 years ago

Hey Maxim,

When I try to run debug in QTCreator it says this is not a debug build, and continues to run, and eventually segfault: How do I create a debug build to get hte line numbers, etc ?

0 ?? 1 QObject::disconnect(QObject const, char const, QObject const, char const) /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
0x7ffff6e02da1 2 ?? /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5
0x7fffda3bf5fc 3 QWebPage::setViewportSize(QSize const&) const
/usr/lib/x8664-linux-gnu/libQt5WebKitWidgets.so.5 0x7fffda3bf6c3 4 QWidget::event(QEvent)
/usr/lib/x8664-linux-gnu/libQt5Widgets.so.5 0x7ffff770835e 5 QWebView::event(QEvent)
/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 0x7fffda3c5feb 6 QApplicationPrivate::notifyhelper(QObject, QEvent_)
/usr/lib/x8664-linux-gnu/libQt5Widgets.so.5 0x7ffff76ca16c 7 QApplication::notify(QObject, QEvent_)
/usr/lib/x8664-linux-gnu/libQt5Widgets.so.5 0x7ffff76cf41e 8 YasemApplication::notify(QObject, QEvent) 0x42781b 9 QCoreApplication::notifyInternal(QObject, QEvent_)
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5 0x7ffff6dd181b 10 QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool)
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff7702101 11 QWidgetPrivate::show_helper()
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff770542f 12 QWidget::setVisible(bool)
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff7707915 13 QWidgetPrivate::showChildren(bool)
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff77053c8 14 QWidgetPrivate::show_helper()
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff770544b 15 QWidget::setVisible(bool)
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff7707915 16 QWidgetPrivate::showChildren(bool)
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff77053c8 17 QWidgetPrivate::show_helper()
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff770544b 18 QWidget::setVisible(bool)
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff7707915 19 yasem::DesktopGUI::initialize()
/home/sakhter/source/yasem/bin/plugins/libyasem-desktop-gui.so.0.1.0
0x7fffea34300b 20 yasem::PluginManagerImpl::initPlugin(yasem::Plugin*, int)
0x40cd7d 21 yasem::PluginManagerImpl::initPlugins() 0x40dd97 22 main 0x40724b

Maxim Vasilchuk wrote:

Could you please run the app from QtCreator in debug mode to see where exactly the crash happens?

— Reply to this email directly or view it on GitHub https://github.com/mvasilchuk/yasem/issues/12#issuecomment-74096879.

--Saqeb

mvasilchuk commented 9 years ago

In the left bottom corner where you press Run button there is a build configuration button (with PC picture on it). Click on it and change Release mode to Debug. After that you have to configure build environment variables as described in yasem's Readme.

saqebakhter commented 9 years ago

Weird thing is that there is no other build configurations - i opened the yasem.pro project file.

Never mind - I'm testing it now - will give you the error soon. Maxim Vasilchuk wrote: > In the left bottom corner where you press Run button there is a build > configuration button (with PC picture on it). Click on it and change > Release mode to Debug. After that you have to configure build > environment variables as described in yasem's Readme. > > — > Reply to this email directly or view it on GitHub > https://github.com/mvasilchuk/yasem/issues/12#issuecomment-74118877. ## --Saqeb
saqebakhter commented 9 years ago

Here is the stack trace with the debug build:

0 ??
1 QObject::disconnect(QObject const, char const, QObject const, char const) /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 0x7ffff6e02da1
2 ?? /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 0x7fffda3985fc
3 QWebPage::setViewportSize(QSize const&) const /usr/lib/x8664-linux-gnu/libQt5WebKitWidgets.so.5 0x7fffda3986c3
4 QWidget::event(QEvent
) /usr/lib/x8664-linux-gnu/libQt5Widgets.so.5 0x7ffff770835e
5 QWebView::event(QEvent
) /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 0x7fffda39efeb
6 yasem::WebView::event webview.cpp 136 0x7fffda5e61ad
7 QApplicationPrivate::notifyhelper(QObject, QEvent_) /usr/lib/x8664-linux-gnu/libQt5Widgets.so.5 0x7ffff76ca16c
8 QApplication::notify(QObject
, QEvent_) /usr/lib/x8664-linux-gnu/libQt5Widgets.so.5 0x7ffff76cf41e
9 YasemApplication::notify yasemapplication.cpp 14 0x41f09b
10 QCoreApplication::notifyInternal(QObject
, QEvent_) /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 0x7ffff6dd181b
11 QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff7702101
12 QWidgetPrivate::show_helper() /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff770542f
13 QWidget::setVisible(bool) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff7707915
14 QWidgetPrivate::showChildren(bool) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff77053c8
15 QWidgetPrivate::show_helper() /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff770544b
16 QWidget::setVisible(bool) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff7707915
17 QWidgetPrivate::showChildren(bool) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff77053c8
18 QWidgetPrivate::show_helper() /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff770544b
19 QWidget::setVisible(bool) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 0x7ffff7707915
20 yasem::DesktopGUI::initialize desktopgui.cpp 56 0x7fffea33b6de
21 yasem::PluginManagerImpl::initPlugin pluginmanagerimpl.cpp 286 0x40d213
22 yasem::PluginManagerImpl::initPlugins pluginmanagerimpl.cpp 383 0x40e057
23 main main.cpp 125 0x407673

mvasilchuk commented 9 years ago

What version of Qt are you using? And what linux distro?

saqebakhter commented 9 years ago

Ubuntu 14.10, and Qt 5.3.

saqebakhter commented 9 years ago

Any idea what the issue could be ?

afterburn420 commented 9 years ago

I was having the same problem and it ended up being that I had two versions of qt installed.

I was compiling with one and the path was pulling from the other.

I used a script file to set the path variables in the os to point to the qt install that I was using.

One thing to check is start yasem and let it crash - without closing the crashed version start it again - the second instance of yasem should run. (without the segmentation fault)

The bottom line was that the path variables needed to point to the correct qt and mingw files.

saqebakhter commented 9 years ago

@afterburn420 do you mind sharing your builds that work? Windows is fine

gh0st19 commented 9 years ago

Working windows build would be cool. I haven't been able to get it to compile correctly on Windows or Ubuntu 14.04 both using QT 5.3 Seems to always error on plugin creation.

weekendto commented 9 years ago

Hi, I tried in Ubunto 14.10 - it build bin folder. It runs also OK but on TV channel page no video. Only one second audio & freezes. Also, window for channel preview & black window of video are off. On VOD (video on demand) page, it works 100% perfect with audio & video.

In Windows 7 x64 - it builds exe in BIN folder. copied all DLL files required as per readme. When I double click it - small icon in taskbar near time on bottom right corner. What's next?

Also, tried your bin in ubuntu, same small icon in top left corner. What's next?

Also, tried, your latest APK converted to ARChon runtime for Chrome extension. It does works but no video in TV or VOD. It crashes.

afterburn420 commented 9 years ago

Here is a link to a windows version that Maxim compiled --> https://mega.co.nz/#!8MQRUSjC!wH-i3-zEC3qigwW2o6rzX5MUldOGAsB9a22By_YpRSw It should work without adding anything (there have been several fixes since this version)

You may need to try multiple ffmpeg/libav versions to get one that works right (for tv video)

After compiling in windows - copy all of the ffmpeg/libav DLLs to bin folder and then click "run without deployment" in the build (dropdown) menu of QTCreator to test it.

I have compiled and run yasem with ARCH Linux and Win7 x64 and both worked well.

For windows compile I had some problems with the qtcreator web installer version - I downloaded the version for local install (qtcreator 5.4) and it compiles great.

If you download the second version of qtcreator then copy the QT.bat from the web installer version - paste it into the local install versions directory - and EDIT the paths to match your local installer version. After that point a desktop shortcut to the edited QT.bat to start qtcreator (trust me - with two versions if you don't do this you will be sorry...I was)

afterburn420 commented 9 years ago

Some tips that may help you -->

1) If mvasilchuk gives you advice then follow it - He knows way more than I do about this (it is his code after all)

2) Once you have your path variables with the version of ffmpeg or libav that works best for you set up then copy it to a text file - that way you can copy it then paste it to qtcreator using the "batch edit" button in the build environment section of qtcreator (saves tons of time and headache)

3) When you download source code updates use the date in the folder name - ex..."yasem-02132015" - that way it is easy to tell which folder contains which version of yasem (or other code)

4) Do not put any files into the qtcreator directory that did not come with it (libs, dlls, etc.) it will cause trouble down the road because qt may get files from either there or your path and cause bugs that are hard to trace because of it. (always "include" files within build environment instead)

5) If you only get a tray icon and no program window - then there are most likely files missing....Copy the ffmpeg or libav DLL files to bin and click "run without deployment" in build menu to test (if it doesn't run then look at the "application output" in qtcreator for errors)

mvasilchuk commented 9 years ago

@weekendto on ubuntu try to run ldd on yasem and its plugins (usually only on libyasem-qtav-mediaplayer.so) to see if you have all necessary libs installed.

For Windows I'll try to make a workaround to escape this dll hell. It's possible that I'll change sources to be able to compile yasem with static linking.

weekendto commented 9 years ago

Thanks Afterburn420 for detailed answer.....will follow your steps & post results.

Thanks in advance Mvasilchuk for new initiative to solve windows dll ....

Thanks again both of you

weekendto commented 9 years ago

Starting C:\YasemProj\build-2015-02-14\bin\yasem.exe... [DEBUG][13:46:10:121] Library paths: ("C:/Qt/5.4/mingw491_32/plugins", "C:/YasemProj/build-2015-02-14/bin", "C:/YasemProj/build-2015-02-14/bin/libs", "C:/YasemProj/build-2015-02-14/bin/libs/plugins", "") [DEBUG][13:46:10:121] Settings directory "C:/Users/JP/AppData/Roaming/yasem" [DEBUG][13:46:10:121] Starting application... [DEBUG][13:46:10:121] Looking for plugins... [DEBUG][13:46:10:121] pluginsToLoad: ("desktop-gui", "dunehd-plugin", "ini-ds", "mag-api", "samsung-smart-tv-plugin", "tray-icon", "webkit-browser", "web-gui", "webserver-browser") [DEBUG][13:46:10:121] PluginManager::listPlugins() [DEBUG][13:46:10:121] Blacklisted plugins: ("vlc-mediaplayer", "qt-mediaplayer") [DEBUG][13:46:10:121] Searching for plugins in "C:/YasemProj/build-2015-02-14/bin/plugins" [DEBUG][13:46:10:121] Found file: "libyasem-desktop-gui0.a" [WARN ][13:46:10:136] "Plugin verification data mismatch in 'C:/YasemProj/build-2015-02-14/bin/plugins/libyasem-desktop-gui0.a'" [DEBUG][13:46:10:136] Found file: "libyasem-dunehd-api0.a" [WARN ][13:46:10:152] "Plugin verification data mismatch in 'C:/YasemProj/build-2015-02-14/bin/plugins/libyasem-dunehd-api0.a'" [DEBUG][13:46:10:152] Found file: "libyasem-ini-datasource0.a" [WARN ][13:46:10:168] "Plugin verification data mismatch in 'C:/YasemProj/build-2015-02-14/bin/plugins/libyasem-ini-datasource0.a'" [DEBUG][13:46:10:168] Found file: "libyasem-mag-api0.a" [WARN ][13:46:10:183] "Plugin verification data mismatch in 'C:/YasemProj/build-2015-02-14/bin/plugins/libyasem-mag-api0.a'" [DEBUG][13:46:10:183] Found file: "yasem-desktop-gui0.dll" [DEBUG][13:46:10:308] Registering plugin roles... [DEBUG][13:46:10:308] Registering plugin dependencies... [DEBUG][13:46:10:308] Plugin loaded: "Desktop GUI plugin" [DEBUG][13:46:10:308] Found file: "yasem-dunehd-api0.dll" [DEBUG][13:46:10:448] Registering plugin roles... [DEBUG][13:46:10:448] Registering plugin dependencies... [DEBUG][13:46:10:448] Plugin loaded: "DuneHD JS API implementation" [DEBUG][13:46:10:448] Registered "dunehd" as profile class ID [DEBUG][13:46:10:448] Found STB plugin: "DuneHD JS API implementation" [DEBUG][13:46:10:448] Found STB submodels: "" [DEBUG][13:46:10:448] Found file: "yasem-ini-datasource0.dll" [DEBUG][13:46:10:480] Registering plugin roles... [DEBUG][13:46:10:480] Registering plugin dependencies... [DEBUG][13:46:10:480] Plugin loaded: "INI datasource provider" [DEBUG][13:46:10:480] Found file: "yasem-mag-api0.dll" [DEBUG][13:46:10:792] Registering plugin roles... [DEBUG][13:46:10:792] Registering plugin dependencies... [DEBUG][13:46:10:792] Plugin loaded: "MAG API implementation" [DEBUG][13:46:10:792] Registered "mag" as profile class ID [DEBUG][13:46:10:792] Found STB plugin: "MAG API implementation" [DEBUG][13:46:10:792] Found STB submodels: "MAG100, MAG200, MAG245, MAG250, MAG254, MAG255, MAG260, MAG270, MAG275, AuraHD" [DEBUG][13:46:10:792] initPlugins() [DEBUG][13:46:10:792] Plugin "desktop-gui" initialization... [DEBUG][13:46:10:792] Loading dependencies for "desktop-gui" ... [DEBUG][13:46:10:792] Trying to load dependency "Web server plugin" for "Desktop GUI plugin" [WARN ][13:46:10:792] Dependency "Web server plugin" for "desktop-gui" not found! [WARN ][13:46:10:792] Plugin "desktop-gui" won't be loaded because of missing dependencies! [DEBUG][13:46:10:792] Plugin "dunehd-plugin" initialization... [DEBUG][13:46:10:792] Loading dependencies for "dunehd-plugin" ... [DEBUG][13:46:10:792] Trying to load dependency "Browser plugin" for "DuneHD JS API implementation" [WARN ][13:46:10:792] Dependency "Browser plugin" for "dunehd-plugin" not found! [WARN ][13:46:10:792] Plugin "dunehd-plugin" won't be loaded because of missing dependencies! [DEBUG][13:46:10:792] Plugin "ini-ds" initialization... [DEBUG][13:46:10:792] Loading dependencies for "ini-ds" ... [DEBUG][13:46:10:792] No dependencies for "ini-ds" have been found [DEBUG][13:46:10:792] Plugin "ini-ds" initialized [DEBUG][13:46:10:792] Plugin "mag-api" initialization... [DEBUG][13:46:10:792] Loading dependencies for "mag-api" ... [DEBUG][13:46:10:792] Trying to load dependency "Datasource plugin" for "MAG API implementation" [DEBUG][13:46:10:792] Found plugin 0x15cf0d48 "INI datasource provider" "IniDS" [DEBUG][13:46:10:792] Dependency "Datasource plugin" initialized [DEBUG][13:46:10:792] Trying to load dependency "Browser plugin" for "MAG API implementation" [WARN ][13:46:10:792] Dependency "Browser plugin" for "mag-api" not found! [WARN ][13:46:10:792] Plugin "mag-api" won't be loaded because of missing dependencies! [DEBUG][13:46:10:792] Initialization finished C:\YasemProj\build-2015-02-14\bin\yasem.exe exited with code 1

weekendto commented 9 years ago

icon at bottom but no man program window. Looks like: [WARN ][13:46:10:792] Dependency "Web server plugin" for "desktop-gui" not found! [WARN ][13:46:10:792] Plugin "desktop-gui" won't be loaded because of missing dependencies! may be cause.

afterburn420 commented 9 years ago

Try copying all DLLs from mingw bin folder in qt directory to the yasem bin folder if this is a version that you compiled from source code. (make sure that DLLs are from the qt version that yasem was compiled with)

Example - C:\Qt\5.4\mingw491_32\bin or C:\Qt2\Qt5.4.0\5.4\mingw491_32\bin (for qt 5.4) ----> exact directory name will depend on install location and qt version and type download <----

Also if you have 32 and 64 bit DLLs in your build path then make sure to use the 32 bit ones. (ffmpeg/libav)

afterburn420 commented 9 years ago

Also if you used the "recommended" download link of qtcreator then I would uninstall it and use the download link below - or download and install the version below and modify the QT.bat file like I posted earlier (if you do the second choice then make sure to install to a different directory)

http://download.qt-project.org/official_releases/qt/5.4/5.4.0/qt-opensource-windows-x86-mingw491_opengl-5.4.0.exe

weekendto commented 9 years ago

Thanks AB, Let me try this now let you know.

saqebakhter commented 9 years ago

i was able to compile and run on ubuntu 14.10 - but ran into video problems - opened another issue for that.