View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000754 | FSSCP | --------- | public | 2006-01-28 03:33 | 2006-01-30 08:07 |
| Reporter | Goober5000 | Assigned To | taylor | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000754: Some sort of pointer rubbish in the OGG code | ||||
| Description | On the first mission of Derelict-SCP, I'm getting a crash whenever I load the first mission. I've traced it to sound.cpp, at the block surrounding line 757. For some reason si->data is never initialized (so MSVC makes it 0xCCCCCCCC), and on certain OGG files (such as dl01_al41.ogg) it's never assigned a value. This means when vm_free is called it's non-NULL but it doesn't point to anything. So there's a nasty pointer error. It can be fixed quite easily by simply setting si->data to NULL before the sound file is opened (it would probably be a good idea to memset the whole thing to 0), so I'm wondering what's going on here. | ||||
| Tags | No tags attached. | ||||
|
|
The OGG code doesn't allocate any room for the data until it's ready to convert to PCM, to temporarily save memory. Both si->data and si->size need to be initialized before use for safety sake and I didn't even notice that. Though this does likely need to be done in ds_parse_sound() and not the calling function. Really and truely though this is a <vector> and as such should already be zero-initialized (I think that's a standard practice anyway). I guess we have to allow for proper operation in situations where that's not the case though. |
|
|
Should be fixed now. |
|
|
Fixered. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2006-01-28 03:33 | Goober5000 | New Issue | |
| 2006-01-28 05:32 | taylor | Status | new => assigned |
| 2006-01-28 05:32 | taylor | Assigned To | => taylor |
| 2006-01-28 06:07 | taylor | Note Added: 0004521 | |
| 2006-01-30 08:07 | taylor | Note Added: 0004561 | |
| 2006-01-30 08:07 | taylor | Status | assigned => resolved |
| 2006-01-30 08:07 | taylor | Resolution | open => fixed |
| 2006-01-30 08:07 | taylor | Note Added: 0004562 |