[Vorbis-dev] Direct crash on ov_open

Wessam Bahnassi wbahnassi at inframez.com
Sun Apr 3 22:53:48 PDT 2005


Greetings,

I've just downloaded the Ogg/Vorbis Win32 SDK 'OggVorbis-win32sdk-1.0.1.zip'
and made a test app to open an ogg file. But as soon as I call ov_open() the
program crashes because of an access violation to address 0x00000010...
This happens on both Release and Debug builds.

The test app is simple:

#include "vorbis/codec.h"
#include "vorbis/vorbisfile.h"
#include <stdio.h>
#include <memory.h>

void main(void)
{
	// Attempt to open the file
	FILE *pFile = NULL;
	pFile = fopen("C:\\IronDaimen.ogg","rb");
	if (!pFile)
		return;

	OggVorbis_File ovFile;
	memset(&ovFile,0,sizeof(ovFile));

	int iRetval = 0;
	iRetval = ov_open(pFile,&ovFile,NULL,0);
	if (iRetval != 0)
	{
		fclose(pFile);
		return;
	}

}

Platform Info:
Win32, Visual Studio.Net 2003. The app above is a Win32 console application,
which uses Single Threaded Static linkage to CRT libraries. (I also tried
Multithreaded DLL linkage, but same error).

I link against the ogg/vorbis DLLs (tried both debug and release ones).

This is really very frustrating... I tried several other files, but all
crash.
WinAmp plays them correctly, so it's not with the files I suppose...

Any help is much appreciated,
Wessam Bahnassi




More information about the Vorbis-dev mailing list