Opened 15 years ago

Closed 15 years ago

Last modified 3 months ago

#1754 closed defect

ALL: Valgrind warning in vorbis.cpp

Reported by: eriktorbjorn Owned by:
Priority: normal Component: Audio
Keywords: Cc:


My computer isn't fast enough to debug Valgrind
warnings in code that I'm not familiar with. I got this
one from starting Monkey Island 1 with Ogg
Vorbis-encoded CD tracks with an August 3 CVS ScummVM

==27572== Invalid read of size 4
==27572== at 0x34173EA3: ov_time_seek (in
==27572== by 0x81C0C9F:
VorbisTrackInfo::play(SoundMixer*, PlayingSoundHandle*,
int, int) (vorbis.cpp:177)
==27572== by 0x81B55DF: AudioCDManager::play(int,
int, int, int) (audiocd.cpp:82)
==27572== by 0x806875A:
Scumm::Sound::playCDTrack(int, int, int, int)
==27572== Address 0x34CF0A80 is not stack'd, malloc'd
or (recently) free'd

It could, of course, be a bug in ov_time_seek() itself.

Ticket imported from: #1022264. Ticket imported from: bugs/1754.

Attachments (1)

ogg.txt (6.9 KB ) - added by Kirben 15 years ago.
Valgrind log

Download all attachments as: .zip

Change History (13)

comment:1 by eriktorbjorn, 15 years ago

Gah, I meant a *September* 3 CVS snapshot, of course.

comment:2 by fingolfin, 15 years ago

On a cursory glance, there seems to be nothing "obvious" wrong with
that code. Maybe a value of startFrame is passed in which is too big (or
even negative?)... impossible for me to comment since I don't have
Valgrind. I tried briefly with libgmalloc, which allows me to catch many
OOB accesses, but nothing turned up when I just tried with loomcd.
Maybe it's MICD specific, but my MICD tracks are MP3 encoded. I could
re-rip them as OGG of course, but frankly don't have the time for that
right now (and am leaving for a 2 week vacation soon).

comment:3 by eriktorbjorn, 15 years ago

I don't have Valgrind on the computer I'm using at the
moment, unfortunately, so I can't try it with Loom CD right
now. But the startFrame at the beginning of the MICD intro
was 0, which seems sensible enough.

Anyway, since it's not crashing I don't consider it serious.
I just filed the bug report to make sure I wouldn't forget
it. (Much like the memory leak bug report that you've
already fixed, actually. :-)

comment:4 by fingolfin, 15 years ago

Summary: Valgrind warning in vorbis.cppALL: Valgrind warning in vorbis.cpp

comment:5 by Kirben, 15 years ago

I have noticed the exact same valgrind warning when using
another game with ogg for CD tracks for a long time too. I
always assumed the issue was in library itself, rather than
ScummVM though.

by Kirben, 15 years ago

Attachment: ogg.txt added

Valgrind log

comment:6 by Kirben, 15 years ago

Not sure if it will help much, but I attached recent
Valgrind log with gdb back trace when invalid read occurs.

comment:7 by fingolfin, 15 years ago

So, any news on this? Maybe there are some small apps using the Ogg
Vorbis libs, which we could valgrind, too, to find out whether the bug is
on their side or ours (in the former case, we might want to file a bug
report with the OV devs).

comment:8 by fingolfin, 15 years ago

Status: newclosed

comment:9 by fingolfin, 15 years ago

What is the status of this item?

comment:10 by digitall, 12 months ago

Component: --Unset--Audio

comment:11 by Mataniko, 3 months ago

Last edited 3 months ago by criezy (previous) (diff)

comment:12 by Mataniko, 3 months ago

Last edited 3 months ago by criezy (previous) (diff)
Note: See TracTickets for help on using tickets.