Crash to shell when a layout with a GIF is scheduled
dasgarner opened this issue · 4 comments
If you schedule a layout with a GIF on it to the player it crashes to the shell with the following message:
Player exited with code 6
1.8-R7-239
0# signalStacktraceHandler(int) in /snap/xibo-player/239/bin/xibo-player
1# 0x00007FF621F0DF10 in /lib/x86_64-linux-gnu/libc.so.6
2# raise in /lib/x86_64-linux-gnu/libc.so.6
3# abort in /lib/x86_64-linux-gnu/libc.so.6
4# __libunwind_Unwind_Resume in /snap/xibo-player/239/usr/lib/x86_64-linux-gnu/libunwind.so.8
5# Gdk::Pixbuf::create_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, bool) in /snap/xibo-player/239/usr/lib/x86_64-linux-gnu/libgdkmm-3.0.so.1
6# ImageGtk::loadFrom(Uri const&, Xibo::Image::PreserveRatio) in /snap/xibo-player/239/bin/xibo-player
7# ImageWidgetFactory::create(Uri const&, int, int, Xibo::Image::PreserveRatio) in /snap/xibo-player/239/bin/xibo-player
8# ImageFactory::createWidget(Uri const&, int, int, MediaGeometry::ScaleType) in /snap/xibo-player/239/bin/xibo-player
9# ImageFactory::create(MediaOptions const&, int, int) in /snap/xibo-player/239/bin/xibo-player
10# ImageParser::createMedia(MediaOptions const&, boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int, int) in /snap/xibo-player/239/bin/xibo-player
11# MediaParser::mediaFrom(boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int, int, bool) in /snap/xibo-player/239/bin/xibo-player
12# RegionParser::addMedia(Xibo::Region&, boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) in /snap/xibo-player/239/bin/xibo-player
13# RegionParser::regionFrom(boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) in /snap/xibo-player/239/bin/xibo-player
14# MainLayoutParser::addRegions(Xibo::MainLayout&, boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) in /snap/xibo-player/239/bin/xibo-player
15# MainLayoutParser::layoutFrom(boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) in /snap/xibo-player/239/bin/xibo-player
16# MainLayoutParser::parseBy(int) in /snap/xibo-player/239/bin/xibo-player
17# std::unique_ptr<Xibo::MainLayout, std::default_delete<Xibo::MainLayout> > LayoutsManager::createLayout<MainLayoutParser>(int) in /snap/xibo-player/239/bin/xibo-player
18# LayoutsManager::fetchMainLayout() in /snap/xibo-player/239/bin/xibo-player
19# boost::signals2::detail::signal_impl<void (), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void ()>, boost::function<void (boost::signals2::connection const&)>, boost::signals2::mutex>::operator()() in /snap/xibo-player/239/bin/xibo-player
20# Scheduler::reloadQueue() in /snap/xibo-player/239/bin/xibo-player
21# Scheduler::reloadSchedule(LayoutSchedule&&) in /snap/xibo-player/239/bin/xibo-player
22# XiboApp::run() in /snap/xibo-player/239/bin/xibo-player
23# main in /snap/xibo-player/239/bin/xibo-player
24# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
25# _start in /snap/xibo-player/239/bin/xibo-player
On another PC, the following message is logged and the player remains active:
[07:22:53.555] [5647] [error]: [LayoutsManager] [LayoutParser - RegionParser - MediaParser - ImageGtk] Layout 2162 is invalid or missing. Reason: Not all frames of the GIF image were loaded.
Should we add a catch all when trying to create a layout in MainLayoutParser::parseBy(int layoutId)
?
catch (...)
{
throw MainLayoutParser::Error{"LayoutParser", layoutId, "Unknown exception caught by ..."};
}
Should we add a catch all when trying to create a layout in
MainLayoutParser::parseBy(int layoutId)
?catch (...) { throw MainLayoutParser::Error{"LayoutParser", layoutId, "Unknown exception caught by ..."}; }
Yes, error handling should be definitely improved
@dasgarner seems like GIF animations should be handled differently than static images. So the ImageGtk class should be extended to support this feature. Can we mark this issues as enchancement
?
We don't support GIF on the other players as far as I know - so we just need to skip the layout with an appropriate error instead of crashing to the shell.