Kodi Community Forum

Full Version: Total crash when accessing 'showtimerrule' window if one-shot timer exists
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I've been making extensive use of the cool feature ksoo added here for a while now. It basically allows you to access the create timer/series link screen directly from any EPG entry and it makes for super-quick series linking. I've noticed a bug though and it causes Kodi to completely crash. This occurs when you try to access the epg event's context menu for a programme that already has a one-shot timer set. To reproduce, first assign a key to the showtimerrule window, in my case I've mapped it to a long press of the 'r' key like so:

Code:
    <tvguide>
        <keyboard>
            <r>Record</r>
            <r mod="longpress">showtimerrule</r>
        </keyboard>
    </tvguide>


once that's done, simply enter the EPG, find a programme which is part of a series and currently has no timers set on it. Press 'r' to create a one-shot timer. Now hold 'r' to bring up the showtimerrule windows. In my case, I now get a crash. This is what is left in Event Viewer afterwards:

Code:
Faulting application name: Kodi.exe, version: 17.0.901.0, time stamp: 0x58af1a17
Faulting module name: Kodi.exe, version: 17.0.901.0, time stamp: 0x58af1a17
Exception code: 0xc0000005
Fault offset: 0x0006c181
Faulting process ID: 0x4dc4
Faulting application start time: 0x01d28efab96c8974
Faulting application path: C:\Program Files (x86)\Kodi\Kodi.exe
Faulting module path: C:\Program Files (x86)\Kodi\Kodi.exe
Report ID: a40fdcc4-e800-4b7d-ac08-eb513194bcc1
Faulting package full name:
Faulting package-relative application ID:

I'm using Kodi 17.1RC with the DVBLink addon. The DVBLink backend is running on a Windows Server 2012 R2 box. I tried enabling debig logging but the last line is just CInputManager logging the long press of 'r' and then nothing.

edit: found a crash dump.
Sorry, cannot reproduce the crash.

EDIT: Tried on latest kodi master and latest Krypton.
I guess it's specific to a DVBLink/Kodi setup then. Happens to me on 2 NUCs running Win10 Pro and also the desktop which is Win10 Pro with completely different hardware. Nothing meaningful in the crash dump?
Don't have Windows, those crash dumps are useless for me.

EDIT: I doubt this is specific to DVBLink. Could be more Windows, as I tested on macOS and Linux.
I've reproduced this, using 17.0~git20170210.1529-final-0xenial on Linux, with a tvheadend backend.

kodi_crashlog-20170225_110613.log
(2017-02-25, 13:09)Caesium Wrote: [ -> ]I've reproduced this, using 17.0~git20170210.1529-final-0xenial on Linux, with a tvheadend backend.

kodi_crashlog-20170225_110613.log

This crash seems to be unrelated, as it bombs in json-rpc. Have you used one of the Kodi remote control apps to "reproduce"? Then you found another bug.
No, this was keyboard. Followed beeswax's instructions exactly. I setup a keyboard.xml specially as I don't normally use keyboard, containing:

Code:
tvheadend:~> cat .kodi/userdata/keymaps/keyboard.xml
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <tvguide>
    <keyboard>
      <r>Record</r>
      <r mod="longpress">showtimerrule</r>
    </keyboard>
  </tvguide>
</keymap>

Plugged in a keyboard, went to guide, navigated to a programme in the near future, pressed r to set a timer, accidentally short-pressed r again and dismissed the "do you want to cancel" then long pressed r and got instant crash. No remote control app involved.

Edit: I'll do it a few more times and see if the crashes differ
Ok these do look different. Dunno what the other one was doing in JSON-RPC as I did exactly the same for these..

kodi_crashlog-20170225_111759.log
kodi_crashlog-20170225_111835.log
(2017-02-25, 13:21)Caesium Wrote: [ -> ]Ok these do look different. Dunno what the other one was doing in JSON-RPC as I did exactly the same for these..

kodi_crashlog-20170225_111759.log
kodi_crashlog-20170225_111835.log

They look the same. Crash in json-rpc. Sorry, I have no clue about this component of Kodi. Maybe another dev can help.
Code:
Thread 1 (Thread 0x7f18d44c3980 (LWP 23692)):
#0  0x000000000104cfe9 in CFileItem::CFileItem(std::shared_ptr<PVR::CPVRTimerInfoTag> const&) ()
#1  0x000000000117e41a in PVR::CPVRTimers::GetTimerRule(CFileItem const*) const ()
#2  0x000000000116168c in PVR::CGUIWindowPVRBase::ActionShowTimerRule(CFileItem*) ()
#3  0x00000000011659af in PVR::CGUIWindowPVRGuide::OnMessage(CGUIMessage&) ()
#4  0x0000000000ea92c9 in EPG::CGUIEPGGridContainer::OnClick(int) ()
#5  0x0000000000e505aa in CGUIWindow::OnAction(CAction const&) ()
#6  0x0000000000c0b5f3 in CGUIMediaWindow::OnAction(CAction const&) ()
#7  0x000000000115d0c5 in PVR::CGUIWindowPVRBase::OnAction(CAction const&) ()
#8  0x0000000000e5754e in CGUIWindowManager::OnAction(CAction const&) const ()
<snip>

you don't see this in the 111759 log?
(2017-02-25, 13:34)Caesium Wrote: [ -> ]
Code:
Thread 1 (Thread 0x7f18d44c3980 (LWP 23692)):
#0  0x000000000104cfe9 in CFileItem::CFileItem(std::shared_ptr<PVR::CPVRTimerInfoTag> const&) ()
#1  0x000000000117e41a in PVR::CPVRTimers::GetTimerRule(CFileItem const*) const ()
#2  0x000000000116168c in PVR::CGUIWindowPVRBase::ActionShowTimerRule(CFileItem*) ()
#3  0x00000000011659af in PVR::CGUIWindowPVRGuide::OnMessage(CGUIMessage&) ()
#4  0x0000000000ea92c9 in EPG::CGUIEPGGridContainer::OnClick(int) ()
#5  0x0000000000e505aa in CGUIWindow::OnAction(CAction const&) ()
#6  0x0000000000c0b5f3 in CGUIMediaWindow::OnAction(CAction const&) ()
#7  0x000000000115d0c5 in PVR::CGUIWindowPVRBase::OnAction(CAction const&) ()
#8  0x0000000000e5754e in CGUIWindowManager::OnAction(CAction const&) const ()
<snip>

you don't see this in the 111759 log?

Ofc I see this, it is evidence that the log matches what you state you did, but this does not cause the crash. It is another thread that crashes and I have no idea why, because I have no idea about Kodi's json-rpc implementation.
Ok I see Smile Hopefully someone else can chime in then, thanks for the attention ksooo Smile
(2017-02-25, 13:39)Caesium Wrote: [ -> ]Ok I see Smile Hopefully someone else can chime in then, thanks for the attention ksooo Smile

Okay, I now have an idea what goes wrong. Not sure, but might actually be caused by (another) special behavior of the DVBLink addon, which triggers a PVR core bug. Would be unrelated to json-rpc indeed. The stack traces were misleading.

Best would be if you file a trac ticket for this issue (http://trac.kodi.tv). Then, I will not forget and take care asap.

EDIT: You said it happens too with tvheadend. So, not DVBLink related. Anyway, create the ticket, please.
Thanks ksooo, I'll get a ticket created and thanks Cae for the testing, much appreciated.
Ticket created: Trac
Pages: 1 2