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

Segmentation fault in pymediainfo-2.1-py2.7 on ArchLinux #26

Closed
realvz opened this issue Apr 26, 2016 · 6 comments
Closed

Segmentation fault in pymediainfo-2.1-py2.7 on ArchLinux #26

realvz opened this issue Apr 26, 2016 · 6 comments

Comments

@realvz
Copy link

realvz commented Apr 26, 2016

First of all I am very new to pymediainfo, so I apologize if I am not using this correctly or not providing enough information.

I built a script on Ubuntu 15.10 and it worked perfectly but I recently migrated to ArchLinux and I have been having issues pymediainfo crashing every time I try to parse a file.

My system is running both Python3 and Python2.7, but my script is written in 2.7 so I have used pip2 to install pymediainfo.

When I run the code mentioned below in Python3 it works without any issues, I am trying to see what am I doing wrong in Python2.7

I am running pymediainfo-2.1.
SystemInfo
Linux 4.5.1-1-ARCH #1 SMP PREEMPT Thu Apr 14 19:19:32 CEST 2016 x86_64 GNU/Linux

from pymediainfo import MediaInfo
MediaInfo.parse('/mnt/Media/Movies/Moonwalkers.2015.BR-Rip.AC3.-FGT.mkv')

I have verified I have full permissions on the file in question.

Appreciate the help!

@sbraz
Copy link
Owner

sbraz commented Apr 26, 2016

Can you see in which function the segfault occurs? I assume it is either MediaInfoA_Open or MediaInfo_Inform.

@sbraz
Copy link
Owner

sbraz commented Apr 26, 2016

OK I can reproduce this on archlinux too.

@realvz
Copy link
Author

realvz commented Apr 26, 2016

Sorry I am very new to this and don't understand your question "Can you see in which function the segfault occurs? I assume it is either MediaInfoA_Open or MediaInfo_Inform."

Here's what I am getting.

`[realvarez@MediaServer01 fail2ban]$ python2
Python 2.7.11 (default, Mar 31 2016, 06:18:34)
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from pymediainfo import MediaInfo
MediaInfo.parse('/mnt/Media/Movies/Moonwalkers.2015.BR-Rip.AC3.-FGT.mkv')
Segmentation fault (core dumped)`

@sbraz
Copy link
Owner

sbraz commented Apr 26, 2016

No worries, you wouldn't see it with a normal Archlinux libmediainfo anyway. Since I can reproduce the issue, I'll work on it.
In the meantime, you can probably call the binary instead of using the library:
info = MediaInfo(subprocess.check_output(["mediainfo", "-f", "--output=XML", "file.ext"], universal_newlines=True))

@realvz
Copy link
Author

realvz commented Apr 26, 2016

Thanks. Seems like the only thing I needed to fix in my code to move to Python3 were a few print statements, so that is what I have done.

I am fully functional with pyMediaInfo on Python3 now.

@sbraz sbraz closed this as completed in f4013f0 Apr 27, 2016
@sbraz
Copy link
Owner

sbraz commented Apr 27, 2016

This should now be fixed. I'll make a new release containing the fix.

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

No branches or pull requests

2 participants