Linux Kodi crash after click window mode from fullscreen mode
#1
I can use Kodi nomally in Fullscreen mode.
But when I switch to window mode, Kodi will crash and receive a signal SIGABRT or SIGSEGV.

The gdb log files are as follows:
[1]receive a signal SIGABRT: *outdated log*
[2]receive a signal SIGSEGV: *outdated log*

It looks like something problem happend between Kodi and waylandpp library(libwayland-client++.so.0.2) or toolchain issue, but I'm not sure root cause.

Thanks for any suggestions.

My Environment:
Kodi: 18.0 Leia
waylandpp: 0.2.3
libwayland: 1.12.0

Embedded Linux, kernel: 4.4.18
Toolchain: gcc 4.9
Run on wayland window system
Reply
#2
(2019-05-23, 04:26)kuro2357509 Wrote: Kodi: 18.0 Leia

Not too sure if that will solve your problem, but could you please test with a more recent Kodi version? We're on 18.2 already.

Not too familiar with Wayland at all Wink
Reply
#3
Sad 
(2019-05-23, 09:27)DaVu Wrote:
(2019-05-23, 04:26)kuro2357509 Wrote: Kodi: 18.0 Leia

Not too sure if that will solve your problem, but could you please test with a more recent Kodi version? We're on 18.2 already.

Not too familiar with Wayland at all Wink  

Thanks for replying.

I have tried 18.2 too. 
The same problem happended with 18.2 in my envirnment, it's not work. Sad
Reply
#4
@pkerling  This looks interesting.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Windows mode works fine after I have commented out the following code. (between #if 0 and #endif)

What is the purpose of following code?
Is it needs specific environment like toochain version, libraries version...?

Thanks!!

cpp:

void CWindowDecorator::CommitAllBuffers()
{
  CSingleLock lock(m_pendingBuffersMutex);

  for (auto& borderSurface : m_borderSurfaces)
  {
    auto& wlSurface = borderSurface.surface.wlSurface;
    auto& wlBuffer = borderSurface.surface.buffer.wlBuffer;
    #if 0
    // Keep buffers in list so they are kept alive even when the Buffer gets
    // recreated on size change
    auto emplaceResult = m_pendingBuffers.emplace(wlBuffer);
    if (emplaceResult.second)
    {
      // Buffer was not pending already
      auto wlBufferC = reinterpret_cast<wl_buffer*> (wlBuffer.c_ptr());
      // We can refer to the buffer neither by iterator (might be invalidated) nor by
      // capturing the C++ instance in the lambda (would create a reference loop and
      // never allow the object to be freed), so use the raw pointer for now
      wlBuffer.on_release() = [this, wlBufferC]()
      {
        CSingleLock lock(m_pendingBuffersMutex);
        // Construct a dummy object for searching the set
        wayland::buffer_t findDummy(wlBufferC, wayland::proxy_t::wrapper_type::foreign);
        auto iter = m_pendingBuffers.find(findDummy);
        if (iter == m_pendingBuffers.end())
        {
          throw std::logic_error("Cannot release buffer that is not pending");
        }

        // Do not erase again until buffer is reattached (should not happen anyway, just to be safe)
        // const_cast is OK since changing the function pointer does not affect
        // the key in the set
        const_cast<wayland::buffer_t&>(*iter).on_release() = nullptr;
        m_pendingBuffers.erase(iter);
      };
    }
    #endif

    wlSurface.attach(wlBuffer, 0, 0);
    wlSurface.damage(0, 0, borderSurface.surface.size.Width(), borderSurface.surface.size.Height());
    wlSurface.commit();
  }
}
Reply
#6
Hi!

1. What compositor are you running on?
2. Can you please try a recent compiler? (just to rule stuff out quickly, don't think anyone tested that code on gcc 4.9)

This problem obviously never appeared during testing.
Reply
#7
Oh, and after ruling out 2.:

3. Can you reproduce with WAYLAND_DEBUG=1 and post the log?
Reply
#8
(2019-05-24, 17:38)yol Wrote: Hi!

1. What compositor are you running on?
2. Can you please try a recent compiler? (just to rule stuff out quickly, don't think anyone tested that code on gcc 4.9)

This problem obviously never appeared during testing.
Hi,

1. Do you mean a compositing window manager? It's Wayland compositor.
2. I took some time to upgrade the toolchain from linaro 4.9(Sorry, I mentioned above that gcc 4.9 was wrong. The correct version is linaro 4.9.) to gcc 5.5, and the window mode works fine. Smile

Is any possible to solve this issue in linaro 4.9 toolchain environment? It's helpful for me.

Thanks a lot.
Reply
#9
(2019-05-29, 12:22)kuro2357509 Wrote: 1. Do you mean a compositing window manager? It's Wayland compositor.

There are lots of Wayland compositors :-) Wayland is just a protocol.
(2019-05-29, 12:22)kuro2357509 Wrote: 2. I took some time to upgrade the toolchain from linaro 4.9(Sorry, I mentioned above that gcc 4.9 was wrong. The correct version is linaro 4.9.) to gcc 5.5, and the window mode works fine. Smile

Cool! Happy to hear that.
(2019-05-29, 12:22)kuro2357509 Wrote: Is any possible to solve this issue in linaro 4.9 toolchain environment? It's helpful for me.

I'm not sure to be honest, and I currently don't have the time and motivation to look into it in-depth (i.e. determine whether it is a compiler problem or an error in the Kodi code) given that it runs on recent compilers. I'm sorry I can't tell you otherwise.
Reply
#10
Smile 
(2019-05-29, 20:33)yol Wrote: There are lots of Wayland compositors :-) Wayland is just a protocol.
Thanks, I got it. I used weston as my Wayland compositors.  Cool
 
(2019-05-29, 20:33)yol Wrote: I'm not sure to be honest, and I currently don't have the time and motivation to look into it in-depth (i.e. determine whether it is a compiler problem or an error in the Kodi code) given that it runs on recent compilers. I'm sorry I can't tell you otherwise.
Ok, I got.
Thank you for your help. Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi crash after click window mode from fullscreen mode0