Coder Social home page Coder Social logo

Comments (10)

Zuzu-Typ avatar Zuzu-Typ commented on September 23, 2024

Hm.. I don't have a Linux system handy to test this myself unfortunately.

I'm currently reworking PyOgg and it's still in a very early stage, but maybe you could try cloning the future branch and try if the following code still causes a double free
(make sure you run pip install -e . or python setup.py install before you begin):

import pyogg
vf = pyogg.VorbisFile("Example.ogg") # replace "Example.ogg" with any ogg vorbis file you have lying around
vf.close()

If that does indeed work, please also try the following:

import pyogg
vf = pyogg.VorbisFile("Example.ogg") # same as before

# maybe it only happens after reading the data..?
data = vf.read() # use read(2048) if the file is rather big and you don't want to wait all day

vf.close()

Hopefully that does the trick.

from pyogg.

krisfris avatar krisfris commented on September 23, 2024

Ok this is what I observed:

In setup.py:91 there is a comma missing before install_requires.

Using pyogg by itself results in segfault in libvorbisfile.ov_fopen about 90% of the time. Adding a from openal import * before using pyogg prevents this problem.

Then, execution continues until it fails with:

corrupted size vs. prev_size
Aborted (core dumped)

I might be able to look into it at a later time but for now I'm going to use the master branch with the ov_clear line removed and together with openal.

from pyogg.

Zuzu-Typ avatar Zuzu-Typ commented on September 23, 2024

Okay, I updated future.
Please give it another try. There shouldn't be any more issues with open, since I'm not relying on ov_fopen any longer (which is completely broken apparently).

It might not work with PyOpenAL, as it won't be backwards compatible (probably).

Should be a bit more stable now.

from pyogg.

krisfris avatar krisfris commented on September 23, 2024

The ov_open_callbacks call now segfaults:

> python -c 'import pyogg; vf = pyogg.VorbisFile("test.ogg")'
Segmentation fault (core dumped)
> python -c 'from openal import *; import pyogg; vf = pyogg.VorbisFile("test.ogg")'
free(): invalid size
Aborted (core dumped)

from pyogg.

Zuzu-Typ avatar Zuzu-Typ commented on September 23, 2024

Hmm.
I tried the same on a Linux Mint 19 VM and it worked perfectly fine.

What's your setup?
Which ogg/vorbis libraries are you using?
What file are you trying to open?

from pyogg.

krisfris avatar krisfris commented on September 23, 2024

I'm on ubuntu bionic, using python 3.8.0 (tried 3.6.8 as well). libogg.so.0.8.2, libvorbis.so.0.4.8 and libvorbisfile.so.3.3.7.
test.ogg.zip

from pyogg.

Zuzu-Typ avatar Zuzu-Typ commented on September 23, 2024

Hm. I don't have any problems reading that file.
I'm not sure where you got those libraries from...
The version numbers look like their totally made up somehow.

The latest ogg version is 1.3.4 and as far as my research goes, a version 0.8.2 never existed at all.
As for vorbis, vorbis and vorbisfile can't have different version numbers ar they're part of the same package.
Besides, latest version is 1.3.6, so how can you have 3.3.7?

I'm not as familiar with Linux anymore, but I would recommend you to either build the libs yourself from here or use the binary redistributions from ubuntu (e.g. this one and this one).

Either way, thank you very much for your support!

from pyogg.

krisfris avatar krisfris commented on September 23, 2024

Those are the so files used by ExternalLibrary. Default libraries from ubuntu 18.04. I don't know how those version numbers relate to the library version.
As I said I'm happy with the older version so this issue doesn't really concern me but it might be a problem for others.

from pyogg.

pimzand avatar pimzand commented on September 23, 2024

Just wanted to mention that the exact same thing happens in both Fedora 31 and Fedora 32.
Fedora 32 was released just this week, and it contains the latest libogg and libvorbis.

from pyogg.

Zuzu-Typ avatar Zuzu-Typ commented on September 23, 2024

Just wanted to mention that the exact same thing happens in both Fedora 31 and Fedora 32.
Fedora 32 was released just this week, and it contains the latest libogg and libvorbis.

Well, I would love to fix this issue, but as I can't reproduce it and don't really have a lot of info to base my work off of, I see no way to do so.

from pyogg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.