Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash to shell when a layout with a GIF is scheduled #272

Open
dasgarner opened this issue Jun 21, 2022 · 4 comments
Open

Crash to shell when a layout with a GIF is scheduled #272

dasgarner opened this issue Jun 21, 2022 · 4 comments
Assignees
Labels
Milestone

Comments

@dasgarner
Copy link
Member

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.
@dasgarner dasgarner added the bug label Jun 21, 2022
@dasgarner dasgarner added this to the 1.8 R8 milestone Jun 21, 2022
@dasgarner
Copy link
Member Author

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 ..."};
    }

@Stivius
Copy link
Collaborator

Stivius commented Jul 9, 2022

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

@Stivius
Copy link
Collaborator

Stivius commented Jul 9, 2022

@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?

@dasgarner
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants