[vorbis-dev] vorbis_comment_add_tag() and Codewarrior OS X
Scott Wheeler
wheeler at kde.org
Mon Oct 20 08:34:23 PDT 2003
Quoting Olaf Matthes <olaf.matthes at gmx.de>:
> Hi, after banging my head against the wall for quite a while I finally
> found what crashes my code:
>
> Because I'm working with Codewarrior 8 on OS X I had to compile the ogg
> / vorbis libs with CW. To do so I used the CW projects for OS 9 and
> modified them. Howerver, they don't work as expected.
> Everything seems to be fine, encoding & decoding works, only
> vorbis_comment_add_tag() crashes my App on any subsequent call. I.e. I
> can call vorbis_comment_add_tag() several times for one stream/file and
> it works. When I deinit the encoder and init it again all calls to
> vorbis_comment_add_tag() will crash.
> I've tested the very same code on Win2000 and IRIX 6.5 and on both
> platforms it works, so I'm very shure my code is okay. So my question
> is, is there a known bug in vorbis_comment_add_tag() that makes it crash
> on Mac OS X when using CW or is it me having overlooked anything when
> compling the libs with CW?
There's really not much there -- the full function is:
void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *contents){
char *comment=alloca(strlen(tag)+strlen(contents)+2);
strcpy(comment, tag);
strcat(comment, "=");
strcat(comment, contents);
vorbis_comment_add(vc, comment);
}
i.e. it's probably crashing deeper into the code than this, as such a
backtrace (ideally with full debugging symbols that would give a line number)
would be helpful...
-Scott
--- >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