Opened 15 years ago

Closed 15 years ago

Last modified 3 weeks ago

#1754 closed defect

ALL: Valgrind warning in vorbis.cpp

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

Description

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
snapshot:

==27572== Invalid read of size 4
==27572== at 0x34173EA3: ov_time_seek (in
/usr/lib/libvorbisfile.so.3.1.0)
==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)
(singleton.h:41)
==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 Changed 15 years ago by eriktorbjorn

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

comment:2 Changed 15 years ago by fingolfin

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 Changed 15 years ago by eriktorbjorn

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 Changed 15 years ago by fingolfin

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

comment:5 Changed 15 years ago by Kirben

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.

Changed 15 years ago by Kirben

Attachment: ogg.txt added

Valgrind log

comment:6 Changed 15 years ago by Kirben

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

comment:7 Changed 15 years ago by fingolfin

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 Changed 15 years ago by fingolfin

Status: newclosed

comment:9 Changed 15 years ago by fingolfin

What is the status of this item?

comment:10 Changed 9 months ago by digitall

Component: --Unset--Audio

comment:11 Changed 3 weeks ago by Mataniko

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

comment:12 Changed 3 weeks ago by Mataniko

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