I passed a valid FILE* (from fopen() with "rb") and the address of an OggVorbis_File struct, but an access violation occured when ov_open is called. I have enabled the Multithreaded, but it still doesn't fix the problem. I look at the vorbis_comment.exe source and I see vcedit_open() function and other vcedit_*() functions everywhere. I am assuming that there is known issue with VC and ov_open that's why vorbis_comment is using the edited version. I don't know if I should use these functions or not. Or maybe I missed something? don't have the exact source code right now, will post source later. ==== --------------------------------- albert tedja <p>__________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
source:
#include <vorbis/vorbisfile.h>
#pragma comment( lib, "vorbisfile.lib" )
FILE* streamFile = 0;
OggVorbis_File streamOggFile;
<p> streamFile = fopen( filename, "rw" );
if ( !streamFile )
{
OutputDebugString( "Cannot open the specified
file.\n" );
exit(0);
}
OutputDebugString( "Open file OK.\n" );
// access violation exception is thrown here.
result = ov_open( streamFile, &streamOggFile, NULL, 0 );
if ( result < 0 )
{
OutputDebugString( "OggVorbis cannot open the
specified file.\n" );
fclose( streamFile );
exit(0);
}
The exception says:
Unhandled exception in ogg player test.exe (NTDLL.DLL):
0xC0000005. Access Violation.
Disassembly output:
77F9236B je 77F935F3
77F92371 mov eax,dword ptr [esi]
77F92373 inc dword ptr [eax+10h] // right here
77F92376 push dword ptr [ebp-4]
77F92379 mov eax,dword ptr [esi]
====
---------------------------------
albert tedja
<p>__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com
--- >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@xiph.org'
containing only the word 'unsubscribe' in the body. No subject is
needed.
Unsubscribe messages sent to the list will be ignored/filtered.
albert tedja wrote:> I have enabled the Multithreaded, but it still doesn't fix > the problem.Are you getting any warnings when you build? Try a clean rebuild of your app and see if there are any warnings. Are you using a debug build with non-debug lib or something like that?> I look at the vorbis_comment.exe source and I > see vcedit_open() function and other vcedit_*() functions > everywhere.In this case 'vc' stands for vorbis comment. <p>Hope that helps, Alan --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Sunday 07 March 2004 06:57, albert tedja wrote:> I passed a valid FILE* (from fopen() with "rb") and the > address of an OggVorbis_File struct, but an access > violation occured when ov_open is called. > > I have enabled the Multithreaded, but it still doesn't fix > the problem. I look at the vorbis_comment.exe source and I > see vcedit_open() function and other vcedit_*() functions > everywhere. I am assuming that there is known issue with VC > and ov_open that's why vorbis_comment is using the edited > version. I don't know if I should use these functions or > not. Or maybe I missed something? >The vcedit_*() functions are completely unrelated to the ov_*() functions, vorbiscomment doesn't use libvorbisfile. ov_open works perfectly on windows (with VC++) if the project options are configured correctly. Mike <p><p>--- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.