View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002408 | FSSCP | tables | public | 2011-03-05 23:21 | 2012-12-17 05:29 |
Reporter | FUBAR-BDHR | Assigned To | Goober5000 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.13 | ||||
Summary | 0002408: Better error checking for souds.tbl needed | ||||
Description | I just traced a bug with the wrong sound playing out to a bad table entry in sounds.tbl. Here's the entry: $Name: 6 Breakup_fighter.ogg, 0, 0,50, 1, 200, 1000 ;; Fighter Death roll A very easy mistake to make that should be caught during parse but isn't. In case you don't see it it's supposed to be 0.50 not 0,50. So in that case we not only have too many arguments on the line but and invalid value for sound type and a volume of 0 (not sure if that is legal but can't think of a reason it should be). | ||||
Tags | No tags attached. | ||||
|
|
|
Tested with this sound.tbm. It is indeed not caught be debugger as anything other than a duplicate sound... though looking at the syntax I'm wondering how it could be checked anyway. And given the new sound entry format available, I'm wondering if it's worth it... given that any new sounds from now on should use the new format anyway. On 9357. |
|
This is pretty much unfixable within the current parsing code. It's not even possible to write a good error check thingie here. If you look at parse_gamesnd_old, which is the function that is the culprit here, you will see that it's a rather simple-minded function. Changing it so that it can account for the tabler making a mistake like the one that caused this error is futile, especially given that as mjn said, there are other ways to table sounds now. |
|
It's uncorrectable, true, but it's not impossible to write a simple error detector that will check for extraneous values. I've done so in r9443. (Awkwardly, it required tweaking some parselo functions first.) |
fs2open: trunk r9443 2012-12-17 00:54 Ported: N/A Details Diff |
there is actually a way to check for extra sound values per Mantis 0002408, and here it is |
Affected Issues 0002408 |
|
mod - /trunk/fs2_open/code/gamesnd/gamesnd.cpp | Diff File | ||
mod - /trunk/fs2_open/code/parse/parselo.cpp | Diff File | ||
mod - /trunk/fs2_open/code/parse/parselo.h | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-05 23:21 | FUBAR-BDHR | New Issue | |
2012-11-19 15:04 | MjnMixael | File Added: test-snd.tbm | |
2012-11-19 15:05 | MjnMixael | Note Added: 0014072 | |
2012-11-19 15:06 | MjnMixael | Note Edited: 0014072 | |
2012-11-19 15:06 | MjnMixael | Note Edited: 0014072 | |
2012-11-19 16:49 | Goober5000 | Assigned To | => Goober5000 |
2012-11-19 16:49 | Goober5000 | Status | new => assigned |
2012-12-16 23:12 | The_E | Note Added: 0014490 | |
2012-12-16 23:12 | The_E | Status | assigned => closed |
2012-12-16 23:12 | The_E | Resolution | open => suspended |
2012-12-17 05:24 | Goober5000 | Note Added: 0014495 | |
2012-12-17 05:24 | Goober5000 | Status | closed => resolved |
2012-12-17 05:24 | Goober5000 | Resolution | suspended => fixed |
2012-12-17 05:29 | Goober5000 | Changeset attached | => fs2open trunk r9443 |