[vorbis-dev] ov_clear segfaults?
msmith at labyrinth.net.au
Wed Dec 13 15:15:34 PST 2000
At 04:42 PM 12/13/00 -0600, you wrote:
>I'm working doing the Java->JNI->OggVorbis thing. As a test to get me
>going, I've just written a quick routine that dumps info about the file
>test.ogg in the current directory.
>The problem arises when I call ov_clear. I get a segfault everytime. Note
>that I am *not* doing any decoding (ov_read) at all, just ov_comment and
>ov_info. Should I only call ov_clear if I have called ov_read?
That should work correctly. For a test (to see where the problem might be)
what happens if you comment out the java stuff, and just rename that
function to main?
Ahh.. I see you're doing some stuff for win32 - if that's your actual dev
platform, then I can see one potential problem. You MUST do fopen(...,
"rb") - the binary tells it to open the file in binary mode. Windows does
really weird things if you don't, in unpredictable ways.
The other thing to check for (again assuming you're doing this under
windows) is that you're using the 'right' version of the C runtime. You
should usually use the multithreaded DLL unless there's a good reason to do
otherwise. This can make things behave strangely too if
libraries/applications are linked against different C runtimes.
If I'm completely on the wrong track here, or these don't help anyway,
could you try and find out exactly where it's crashing (i.e. line number)?
--- >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