intel / dleyna-control

dLeyna-control is a Digital Media Player written in python to demonstrate how to use the dleyna DMS APIs. It detects Digital Media Servers on the local area network and allows users to browse, search and play their contents.
https://01.org/dleyna/
GNU Lesser General Public License v2.1
8 stars 12 forks source link

dleyna control crash #38

Closed trileude closed 11 years ago

trileude commented 11 years ago

I have launch a DLNA server on my computer with minidlna, and when I launch dleyna control I found my server, but when I click on Browse, the interface crash. I have * glibc detected * /usr/bin/python: munmap_chunk(): invalid pointer: 0x00007fceb7de3969 ***. Can you help me ?

markdryan commented 11 years ago

Hi trileude,

I've just installed minidlna and it seems to be working fine for me, i.e., I can browse the directory hierarchy and display images with dLeyna-control. Could you provide a bit more information about your set up, e.g., your OS and the version of dLeyna-control (git revision please) that you are using, and what exactly is crashing.

There was a problem a while back with Ubuntu 13.04 which pulled in some broken libraries (python-gi) that caused a crash in dleyna-control. See https://github.com/01org/dleyna-control/issues/36. However, a work around was submitted for this a couple of months ago so if you are using the latest version you should not have this problem.

trileude commented 11 years ago

Hi ! I'm on Ubuntu 12.04.2. I clone the last one version yesterday. I can launch dLeyna-control, and can see my DLNA server, but with no content. It is write in the terminal : "Fetch failed: com.intel.dleyna.OperationFailed: Search operation failed: Unsupported or invalid search criteria". So I click on the tab "Browse" and then the application crash. This is a part of the traceback : Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/msd/msd_generic_model.py", line 298, in do_get_path return Gtk.TreePath((None,)) File "/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py", line 1162, in new raise TypeError("could not parse subscript '%s' as a tree path" % path) TypeError: could not parse subscript 'None' as a tree path Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/msd/msd_main_window.py", line 145, in __cell_data_func if (path[0] >= requested_range[0] and TypeError: 'TreePath' object does not support indexing

(dleyna-control.py:4036): Gtk-WARNING _: /build/buildd/gtk+3.0-3.4.2/./gtk/gtktreemodel.c:640: Invalid path None passed to gtk_tree_path_new_from_string _* glibc detected * /usr/bin/python: munmap_chunk(): invalid pointer: 0x00007fd6ccf3d969

trileude commented 11 years ago

Edit : I just try with xbmc as DMS, but same result I have both python3-gi and pyhton-gi (3.2.2.1 precise). Thank you for your time !

markdryan commented 11 years ago

@jku , do you have any idea about this?

markdryan commented 11 years ago

Okay so it seems that there are two separate problems here.

  1. Search is not working when it should do. The reason for this seems to be that dLeyna-control is inserting a space before the search expression. So it's sending

''' ' (Type derivedfrom "image" or Type derivedfrom "video" or Type derivedfrom "audio" ) and ( RefPath exists false )',0,50, ["Artist", "DisplayName", "URLs", "Date", "Path", "Type"],'-DisplayName'

and not

' (Type derivedfrom "image" or Type derivedfrom "video" or Type derivedfrom "audio" ) and ( RefPath exists false )',0,50, ["Artist", "DisplayName", "URLs", "Date", "Path", "Type"],'-DisplayName' '''

  1. The second seems to be some problems with the gtk stuff
markdryan commented 11 years ago

I've submitted a PR for the search problem.

https://github.com/01org/dleyna-control/pull/39

@trileude, unfortunately this means that search will probably crash for you as well as search and browse share a lot of common code. We'll try and figure out what is going on tomorrow. It could be that our fix for Ubuntu 13.04 broke older versions of Ubuntu. In the meantime to unblock you I suggest reverting to an earlier revision.

To back out our Ubuntu 13.04 fix try

git reset --hard 9aaba47

To revert to pygtk try

git reset --hard dbbaee7

trileude commented 11 years ago

Hello ! I try "git reset --hard dbbaee7" and now it works perfectly ! Firstly I try the first one (git reset --hard 9aaba47), but with the same result, the second one correct the issue. Thank you !

markdryan commented 11 years ago

Hi trileude,

Good to hear you have a work around. We'll try to figure out why the current version is not working on Ubuntu 12.04. In the meantime you can also fix the search bug by making one small modification to the code.

In dleyna-control/src/msd/msd_search.py change line 42 from

q_buffer.write(' ( ')

to

q_buffer.write('( ')

i.e., delete the leading space.

trileude commented 11 years ago

Hi ! It's OK, the search bug is gone. Thanks

jku commented 11 years ago

Marks patch looks good to me. I'll still test it later (today, maybe tomorrow).

Thanks for testing @trileude. It looks like the "new" py-gi based code has problems on Ubuntu 12.04... I'll see if I can reproduce but this should get me started at least:

gtktreemodel.c:640: Invalid path None passed to gtk_tree_path_new_from_string * glibc detected * /usr/bin/python: munmap_chunk(): invalid pointer: 0x00007fd6ccf3d969 **

I'm guessing the crash is not really a bug in dleyna-control: the latter line sounds like a stack variable being used in the wrong way and that shouldn't be possible as wer'e working with python. That said, if I figure out where the treemodel warning comes from, the crash will hopefully just disappear.

markdryan commented 11 years ago

Hi @trileude,

I've merged @jku's patch for this issue. However, we've never actually been able to reproduce the crash. Could you possibly test the latest version of dLeyna-control to see if the bug is really fixed?

Thanks,

Mark

trileude commented 11 years ago

Hi !

Unfortunately, the bug is still there. I clone the latest commit (1ee0ba0) then install it with sudo ./setup.py install. When I launch the dleyna-control I see the server, but when I click on the Browse tab, the application crash with the message : File "/usr/local/lib/python2.7/dist-packages/msd/msd_generic_model.py", line 290, in do_get_iter if len(self.items) > 0 and path[0] < len(self.items): TypeError: 'TreePath' object does not support indexing 1 rows fetched (1/1 rows cached) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/msd/msd_generic_model.py", line 290, in do_get_iter if len(self.items) > 0 and path[0] < len(self.items): TypeError: 'TreePath' object does not support indexing Erreur de segmentation (core dumped)

When I did git reset --hard dbbaee7 then install it, the dleyna-control works perfectly.

Sorry. Manu

markdryan commented 11 years ago

Okay, well thanks very much for testing. We'll keep working on it.

trileude commented 11 years ago

Don't hesitate if you want me to test :)

tkem commented 9 years ago

Any update on this?

Running Ubuntu 14.04LTS with minidlna 1.1.2 and dleyna-server 0.4.0, a simple "browse" request on the minidlna root using either dleyna-control or mediaconsole.py will result in

Apr  6 20:57:52 tkemmer-XPS-L501X kernel: [ 1768.158698] minidlnad[1234]: segfault at 0 ip 000000000040d080 sp 00007fff1eaa31b0 error 4 in minidlnad[400000+3b000]

Same seems also to occur with minidlna running on dd-wrt.

I guess it would be more appropriate to file an issue with minidlna (or ReadyMedia as it now seems to be called), but since minidlna is widely deployed and is also shipped with a variety of NETGEAR router, and various other DLNA clients seem to work fine with it, I guess this should at least be reviewed by the dLeyna developers. If I should post a separate bug report for this (maybe for dleyna-server), you need more information, or I should try with dleyna-server 0.5.0, I'm open for suggestions/instructions.

rsbells commented 9 years ago

Thomas - This particular issue was closed - July 18, 2013. I would suggest that you test with release 0.5.0. If that does not correct your problem please submit a new bug request and we will take look at it.