<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Vorbis] Direct crash on ov_open</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>I had the same problem because my app uses Multithread DLL linkage too.</FONT>
<BR><FONT SIZE=2>To resolve it i had to download the sources of the SDK and generate it with the right linkage settings.</FONT>
</P>
<P><FONT SIZE=2>-----Message d'origine-----</FONT>
<BR><FONT SIZE=2>De : Wessam Bahnassi [<A HREF="mailto:wbahnassi@inframez.com">mailto:wbahnassi@inframez.com</A>]</FONT>
<BR><FONT SIZE=2>Envoyé : lundi 4 avril 2005 07:46</FONT>
<BR><FONT SIZE=2>À : vorbis@xiph.org</FONT>
<BR><FONT SIZE=2>Objet : RE: [Vorbis] Direct crash on ov_open</FONT>
</P>
<BR>
<P><FONT SIZE=2>I'll subscribe there and give it a try, thanks...</FONT>
<BR><FONT SIZE=2>Just for the record, I'm using Visual Studio.Net 2003.</FONT>
<BR><FONT SIZE=2>My app uses Multithreaded DLL linkage to CRT.</FONT>
</P>
<P><FONT SIZE=2>Thanks anyways,</FONT>
<BR><FONT SIZE=2>Wessam Bahnassi</FONT>
</P>
<BR>
<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: Andy [<A HREF="mailto:andycool22@peoplepc.com">mailto:andycool22@peoplepc.com</A>]</FONT>
<BR><FONT SIZE=2>> Sent: Monday, April 04, 2005 1:13 AM</FONT>
<BR><FONT SIZE=2>> To: wbahnassi@inframez.com</FONT>
<BR><FONT SIZE=2>> Subject: Re: [Vorbis] Direct crash on ov_open</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> try posting your question on the vorbis dev list. that list is for</FONT>
<BR><FONT SIZE=2>> developers....they might have more expertise in the areas you're talking</FONT>
<BR><FONT SIZE=2>> about =) i'm not sure how to post to that list though, since i'm not on</FONT>
<BR><FONT SIZE=2>> it (not a developer, just a user of ogg vorbis =) )</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> i would maybe try xiph.org's website.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Andy Smith</FONT>
<BR><FONT SIZE=2>> andycool22@peoplepc.com</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: Michael Smith <mlrsmith@gmail.com></FONT>
<BR><FONT SIZE=2>> Sent: Apr 3, 2005 5:46 PM</FONT>
<BR><FONT SIZE=2>> To: Wessam Bahnassi <wbahnassi@inframez.com></FONT>
<BR><FONT SIZE=2>> Cc: vorbis@xiph.org</FONT>
<BR><FONT SIZE=2>> Subject: Re: [Vorbis] Direct crash on ov_open</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> On Apr 3, 2005 12:42 PM, Wessam Bahnassi <wbahnassi@inframez.com> wrote:</FONT>
<BR><FONT SIZE=2>> > Greetings,</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > I've just downloaded the Ogg/Vorbis Win32 SDK 'OggVorbis-win32sdk-</FONT>
<BR><FONT SIZE=2>> 1.0.1.zip' and</FONT>
<BR><FONT SIZE=2>> > made a test app to open an ogg file. But as soon as I call ov_open() the</FONT>
<BR><FONT SIZE=2>> program</FONT>
<BR><FONT SIZE=2>> > crashes because of an access violation to address 0x00000010...</FONT>
<BR><FONT SIZE=2>> > This happens on both Release and Debug builds.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> This sort of thing is most likely to be incompatibility between the</FONT>
<BR><FONT SIZE=2>> libraries and your executable, caused by how the two are linked (this</FONT>
<BR><FONT SIZE=2>> can happen on win32 systems in many ways, the most common is linking</FONT>
<BR><FONT SIZE=2>> against the wrong C runtime library).</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> > void main(void)</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> That's wrong, but won't be causing your problem in this case. main()</FONT>
<BR><FONT SIZE=2>> must return int.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> > {</FONT>
<BR><FONT SIZE=2>> > // Attempt to open the file</FONT>
<BR><FONT SIZE=2>> > FILE *pFile = NULL;</FONT>
<BR><FONT SIZE=2>> > pFile = fopen("C:\\IronDaimen.ogg","rb");</FONT>
<BR><FONT SIZE=2>> > if (!pFile)</FONT>
<BR><FONT SIZE=2>> > return;</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > OggVorbis_File ovFile;</FONT>
<BR><FONT SIZE=2>> > memset(&ovFile,0,sizeof(ovFile));</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > int iRetval = 0;</FONT>
<BR><FONT SIZE=2>> > iRetval = ov_open(pFile,&ovFile,NULL,0);</FONT>
<BR><FONT SIZE=2>> > if (iRetval != 0)</FONT>
<BR><FONT SIZE=2>> > {</FONT>
<BR><FONT SIZE=2>> > fclose(pFile);</FONT>
<BR><FONT SIZE=2>> > return;</FONT>
<BR><FONT SIZE=2>> > }</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > }</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> The rest of this looks fine, so it's probably a linking problem.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > I link against the ogg/vorbis DLLs (tried both debug and release ones).</FONT>
<BR><FONT SIZE=2>> > This is really very frustrating... I tried several other files, but all</FONT>
<BR><FONT SIZE=2>> crash.</FONT>
<BR><FONT SIZE=2>> > WinAmp plays them correctly, so it's not with the files I suppose...</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Even if it were the files, if vorbisfile were crashing, that would be a</FONT>
<BR><FONT SIZE=2>> bug.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Sorry I can't give you any more specific advice - hopefully one of the</FONT>
<BR><FONT SIZE=2>> windows developers on the list will be able to (I don't use windows</FONT>
<BR><FONT SIZE=2>> regularly myself, and you didn't give any details about what</FONT>
<BR><FONT SIZE=2>> development tools you're using).</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Mike</FONT>
<BR><FONT SIZE=2>> _______________________________________________</FONT>
<BR><FONT SIZE=2>> Vorbis mailing list</FONT>
<BR><FONT SIZE=2>> Vorbis@xiph.org</FONT>
<BR><FONT SIZE=2>> <A HREF="http://lists.xiph.org/mailman/listinfo/vorbis" TARGET="_blank">http://lists.xiph.org/mailman/listinfo/vorbis</A></FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> *Andy Dale*</FONT>
<BR><FONT SIZE=2>> Do not let the sun go down while you are still angry.</FONT>
<BR><FONT SIZE=2>> Ephesians 4:26 (NIV)</FONT>
<BR><FONT SIZE=2>> andycool22@cinci.rr.com</FONT>
<BR><FONT SIZE=2>> AndyCool22 on AIM</FONT>
<BR><FONT SIZE=2>> ICQ # 76178574</FONT>
<BR><FONT SIZE=2>> MSN Messenger andycool22@peoplepc.com</FONT>
<BR><FONT SIZE=2>> Yahoo! Messenger - andycool22@yahoo.com</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> ________________________________________</FONT>
<BR><FONT SIZE=2>> PeoplePC Online</FONT>
<BR><FONT SIZE=2>> A better way to Internet</FONT>
<BR><FONT SIZE=2>> <A HREF="http://www.peoplepc.com" TARGET="_blank">http://www.peoplepc.com</A></FONT>
<BR><FONT SIZE=2>> </FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Vorbis mailing list</FONT>
<BR><FONT SIZE=2>Vorbis@xiph.org</FONT>
<BR><FONT SIZE=2><A HREF="http://lists.xiph.org/mailman/listinfo/vorbis" TARGET="_blank">http://lists.xiph.org/mailman/listinfo/vorbis</A></FONT>
</P>
</BODY>
</HTML>