[vorbis-dev] VorbisFile library crashs.

Conrad Parker conrad at vergenet.net
Sun Jan 5 18:31:51 PST 2003



[cc'd back to vorbis-dev]

Hi Yuri,

building your program as a single .c file on Linux does not produce this
error. I'd guess that the problem is not in VorbisFile.

Here it is as straight C code:

-----
#include <stdio.h>
#include <vorbis/vorbisfile.h>

int
main (int argc, char ** argv)
{
        FILE * inputFile;
        OggVorbis_File ovFile;
        int xxx;

        if (argc < 3) {
                fprintf (stderr, "Usage: %s file1.ogg file2.ogg\n", argv[0]);
                exit (1);
        }

        inputFile = fopen (argv[1], "r");

        xxx = ov_open (inputFile, &ovFile, NULL, 0);
        xxx = ov_clear (&ovFile);

        inputFile = fopen (argv[2], "r");

        xxx = ov_open (inputFile, &ovFile, NULL, 0);
        xxx = ov_clear (&ovFile);

        return 0;
}

-----

To build in the Terminal:

  gcc ovopen.c -o ovopen -lvorbisfile -lvorbis -logg -lm

-----

I'm not running OS X atm so I can't test this there, perhaps you should
check your project settings. Also I hope you're actually checking the
return values from ov_open in the real project ;)

Conrad.
www.metadecks.org

On Sun, Jan 05, 2003 at 06:31:57PM -0500, Yuri Gulyaev wrote:
> Sure Conrad. Here it is.
> Just in case you cannot reproduse the bug you should probably download the
> project and try to run it. The problem might be in project settings however
> I don't think the settings cause the crash.
> 
> 
> extern "C"
> {
> #include <vorbis/vorbisfile.h>
> }
> 
> int main ()
> {
>     // Change file name to the one that exists on your hard drive.
>     FILE * inputFile = ::fopen
> ("Partition1:Users:yg:Desktop:Work:TestFiles:Ogg:Epoq-Lepidoptera.ogg",
> "rb");
>     OggVorbis_File ovFile;
>     int xxx = ::ov_open (inputFile, & ovFile, NULL, 0);
>     xxx = ::ov_clear (& ovFile);
>     // You can open either the same or a different file, the result will be
> the same.
>     inputFile = ::fopen
> ("Partition1:Users:yg:Desktop:Work:TestFiles:Ogg:Hydrate-Kenny_Beltrey.ogg",
> "rb");
>     // The next attempt to open file will crash with a message "Unmapped
> memory exception".
>     xxx = ::ov_open (inputFile, & ovFile, NULL, 0);
>     xxx = ::ov_clear (& ovFile);
> 
>     return 0;
> }
> 
> 
> > From: Conrad Parker <conrad at vergenet.net>
> > Date: Mon, 6 Jan 2003 10:19:49 +1100
> > To: Yuri Gulyaev <yuri at at-soft.net>
> > Subject: Re: [vorbis-dev] VorbisFile library crashs.
> > 
> > Hi Yuri,
> > 
> > can you post just the .c file that exhibits the bug?
> > 
> > Conrad.
> > 
> > On Sun, Jan 05, 2003 at 05:47:10PM -0500, Yuri Gulyaev wrote:
> >> Hello!
> >> There is a problem with the VorbisFile library. It only works when I open an
> >> OGG file for
> >> the 1st time. After I closed the file and try to open another one or the
> >> same it crashs. It seems it applies to the use of either ov_open or ov_test
> >> functions or their combination.
> >> I wrote a test app that illustrates the bug. It crashs with a message
> >> "Unmapped memory exception". It's available at
> >> http://home.earthlink.net/~yurigulyaev/oggvorbisproject32.sit.hqx
> >> My platform is Mac OS 9.2 and CodeWarrior 8.0. I got the same result with
> >> CodeWarrior 7.0.
> >>> From what I read on the net I see that this bug exists on other platforms
> >> too.
> >> BTW, I had to compile shared libs on my own because the OggVorbis SDK for
> >> Mac OS
> >> comes with shared libs that don't export any functions and thus unusable.
> >> I have also submitted this bug through bugzilla.
> >> SY,
> >> Yuri.
> >> 
> >> --- >8 ----
> >> List archives:  http://www.xiph.org/archives/
> >> Ogg project homepage: http://www.xiph.org/ogg/
> >> To unsubscribe from this list, send a message to
> >> 'vorbis-dev-request at xiph.org'
> >> containing only the word 'unsubscribe' in the body.  No subject is needed.
> >> Unsubscribe messages sent to the list will be ignored/filtered.
> > 
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list