robweber / cronxbmc

A simple Cron-like service for Kodi
MIT License
19 stars 19 forks source link

xbmc crash when exiting gui #4

Closed wgstarks closed 7 years ago

wgstarks commented 10 years ago

Addon crashes xbmc Gotham (vs 13.2) when exiting gui (delete button on keyboard). Happens every time I press "Delete" to exit gui.

robweber commented 10 years ago

Could you post a debug log of this happening? I tried to duplicate it on 13.2 (Windows version) and couldn't get it to happen. The Delete key doesn't seem to do anything within the addon, I use ESC to exit. That's the key I use on any addon to get out. Thanks.

wgstarks commented 10 years ago

Debug logs posted to pastebin- http://pastebin.com/6ZG7QvAD (crash using Delete key) http://pastebin.com/hZA7HhRN (crash using Esc key) Both keys result in xvmc crash.

robweber commented 10 years ago

That is definitely really weird. The last line though says that XBMC was able to get the script to close successfully. Something is happening after that (core to XBMC) that is causing the crash. I see you're running on a Mac, which I do not have access to, but I doubt this is something with the addon. Any errors there would show up in the python interpreter. XBMC appears to be closing this out correctly and then crashing on some related core task.

I would bump this up to trac.xbmc.org and see if anyone there has any ideas.

pieman64 commented 9 years ago

GUI in Windows looks fine but I have the same problem of Kodi crashing in Debian (Raspberry Pi) when exiting the GUI. I will do further tests asap.

robweber commented 9 years ago

I was able to get Kodi to crash using OpenElec, still no idea what is causing it though. I'm going to have to go through GUI portion in way more detail and try to figure it out.

dagavi commented 9 years ago

I confirm that it crashes in Ubuntu (x64). ¿Any update or it will have no support for Linux systems?

pieman64 commented 9 years ago

It seems to crash on everything other than Windows but that doesn't mean it doesn't work. Even with the crash the record is stored and the cron task should be in place when your machine reboots. Not ideal but operational nonetheless.

dagavi commented 9 years ago

Yep, but crash OpenElec or OSMC is very heavy.

Is a SEGV:

Program received signal SIGSEGV, Segmentation fault. [Cambiando a Thread 0x7fffc5f8f700 (LWP 7416)] 0x0000000001bd695f in ?? () (gdb) bt

0 0x0000000001bd695f in ?? ()

1 0x0000000001be01ca in XBMCAddon::xbmcgui::ControlEdit::~ControlEdit() ()

2 0x0000000001bf8a99 in XBMCAddon::xbmcgui::Window::dispose() ()

3 0x0000000000e3ebf9 in PythonBindings::cleanForDealloc(XBMCAddon::xbmcgui::Window_) ()

4 0x0000000000e609b6 in ?? ()

5 0x00007ffff50cf902 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

6 0x00007ffff50ff9a2 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

7 0x00007ffff5107f09 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

8 0x00007ffff51085f1 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

9 0x00007ffff517eb2c in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

10 0x00007ffff51f1000 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

11 0x00007ffff5179319 in PyEval_EvalCode () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

12 0x00007ffff519bc16 in PyRun_StringFlags () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

13 0x00007ffff519bc9b in PyRun_SimpleStringFlags () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

14 0x0000000000e3d38d in CPythonInvoker::execute(std::string const&, std::vector<std::string, std::allocator > const&) ()

15 0x0000000000e3a607 in CPythonInvoker::Execute(std::string const&, std::vector<std::string, std::allocator > const&) ()

16 0x0000000001c76b2f in CThread::Action() ()

17 0x0000000001c76de9 in CThread::staticThread(void_) ()

18 0x00007ffff618d0a5 in start_thread (arg=0x7fffc5f8f700) at pthread_create.c:309

19 0x00007fffeff4dcfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

pieman64 commented 9 years ago

Hi dagavi,

I actually use the addon interactively from my own Addon and other than the initial crash when setting up cronxbmc it doesn't crash with any OS we have tried (Ubuntu, Openelec, Raspbian, Windows). Are you able to knock together your own addon that calls cronxbmc until such time as a fix is found? What are you using cronxbmc for?

robweber commented 9 years ago

It is definitely something with the GUI code. I honestly wish I could fix this but without coding the whole GUI from scratch I don't know enough about how it works (was contributed by someone else). If anyone has some experience with Kodi custom guis please give it a look.

dagavi commented 9 years ago

Hi, I checked that the crash is produced in these entries:

''' Job Name '''
cntrl = self.addMyControl('editbox', NAME_EDIT_BOX, {'text':''})
self.addResettable(cntrl)
self.addAsInput(cntrl, self.noneEmpty)

''' Command To Run '''
cntrl = self.addMyControl('editbox', COMMAND_EDIT_BOX, {'text':''})
self.addResettable(cntrl)
self.addAsInput(cntrl, self.noneEmpty)

With this, I see that the crash continues until I remove this line in reset():

if 'text' in self.options:
  self.setText(self.options['text'])

I try with self.setText('') but it crashes. I removed this line and it stop crhasing. I don't know why.

dagavi commented 9 years ago

Well, it works until I add an entry, then it crashes again -.-

I will desist, Is first time that I check a Kodi GUI and I have no idea to.

BigSnicker commented 8 years ago

@pieman64 Can confirm that it crashes as described when I tested the GUI under OSMC. Service component seems to work just fine.

pchevallier commented 7 years ago

I also ran into this issue today. If interested, here's the log I get when exiting the cronxbmc configuration panel:

15:34:12 94001.117188 T:1481937984 NOTICE: click
15:34:12 94001.117188 T:1481937984 ERROR: EXCEPTION: argument "defaultRes" for method "WindowXMLDialog" must be unicode or str 15:34:12 94001.125000 T:1481937984 ERROR: Traceback (most recent call last):
15:34:12 94001.125000 T:1481937984 ERROR: File "/storage/.kodi/addons/cronxbmc-master/resources/lib/windowGUI.py", line 253, in click 15:34:12 94001.125000 T:1481937984 ERROR: self.options'onClick'
15:34:12 94001.125000 T:1481937984 ERROR: File "/storage/.kodi/addons/cronxbmc-master/resources/lib/windowGUI.py", line 458, in deleteOrModifyJob 15:34:12 94001.125000 T:1481937984 ERROR: dia = self.openSelectDialog("Delete or Modify Job", ['Modify Job', 'Delete Job']) 15:34:12 94001.125000 T:1481937984 ERROR: File "/storage/.kodi/addons/cronxbmc-master/resources/lib/windowGUI.py", line 364, in openSelectDialog 15:34:12 94001.125000 T:1481937984 ERROR: 'items':list,
15:34:12 94001.125000 T:1481937984 ERROR: TypeError: argument "defaultRes" for method "WindowXMLDialog" must be unicode or str

And here is the exact section of the code where it crashes:

resources/lib/windowGUI.py

def openSelectDialog(self, title, list):
dia = SelectDialog(SelectDialogXML , cwd, SkinName, {
'items':list,
})

The XML file comes from:

SelectDialogXML = 'script-cron-DialogContextMenu.xml'

I checked everywhere on the XML files and see if I could figure out where the default resolution was wrongfully set, but no luck so far.

Any GUI expert out there who could chime in here ?

robweber commented 7 years ago

Playing around with this I managed to get rid of the error but that just caused a whole other set of problems related to how things are displayed on the screen. I tried to sort those out but realized that a lot of the controls are custom programmed rather than using control classes native to Kodi.

I think the GUI code here is starting to show it's age. Anyone willing to take on the task of upgrading it a bit? I think just tweaking it for updated Kodi conventions is all that's needed.