Hard Light Productions Forums
General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: Lepanto on May 27, 2014, 05:56:15 pm
-
So I'm working on my mod, and I get the following error (without a debug build):
dc-wep.tbm(line 2589):
Error: Required token = [#End] or [$Name:], found [+Tech Title: XSTR("GTM MX-64 Rockeye", 3311)].
ntdll.dll! NtWaitForSingleObject + 12 bytes
KERNELBASE.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_2_RC1.exe! <no symbol>
fs2_open_3_7_2_RC1.exe! <no symbol>
fs2_open_3_7_2_RC1.exe! <no symbol>
I am positive that this line is nowhere to be found in my mod's weapons .tbm, but FSO blames my .tbm (dc-wep.tbm) for the error. After fiddling with the MediaVPs, I conclude that the only place where FSO could be reading this line from is the Rockeye's entry in the retail weapons.tbl, in Root_fs2.vp, but that doesn't match up with what FSO is telling me.
When I try to run the same mod with a debug build, I get the following error instead:
Assert: 0
File: parselo.cpp
Line: 277
ntdll.dll! NtWaitForSingleObject + 12 bytes
KERNELBASE.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! SCP_DumpStack + 354 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! WinAssert + 194 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! get_line_num + 123 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! error_display + 228 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! required_string_either + 225 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! parse_weaponstbl + 228 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! parse_modular_table + 267 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! weapon_init + 101 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! game_init + 1738 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! game_main + 519 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! WinMain + 330 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! __tmainCRTStartup + 358 bytes
fs2_open_3_7_2_RC1-DEBUG.exe! WinMainCRTStartup + 15 bytes
KERNEL32.DLL! BaseThreadInitThunk + 14 bytes
ntdll.dll! RtlInitializeExceptionChain + 133 bytes
ntdll.dll! RtlInitializeExceptionChain + 88 bytes
Does anyone have any clue what might be generating this error? I can live with debugging errors, if only the errors make sense! :P
[attachment deleted by an evil time traveler]
-
Searching root pack 'C:\GOG Games\Freespace 2\SathMod.vp' ... 15 files
Searching root pack 'C:\GOG Games\Freespace 2\SLAnis.vp' ... 246 files
Tried killing these?
-
Searching root pack 'C:\GOG Games\Freespace 2\SathMod.vp' ... 15 files
Searching root pack 'C:\GOG Games\Freespace 2\SLAnis.vp' ... 246 files
Tried killing these?
Just tried, no luck.
-
Can you post your tbm?
-
Sure thing.
[attachment deleted by an evil time traveler]
-
Hmm... well let's start with the obvious stuff.
WARNING: Unrecognized parameter in ai_profiles: $Default weapon select effect: OFF
WARNING: Unrecognized parameter in ai_profiles: $Default ship select effect: OFF
Those were moved to game_settings.tbl, iirc, so let's do that.
You're debug log is less than helpful in this case. I suspect that somewhere along the line, you have a small error in a table entry leading to a much larger parsing error. Essentially, I'm guessing that a line is messed up that doesn't really matter, but gets the whole weapons.tbl parser off by a line to where it's finally looking for an #End where it shouldn't.
Leading guess is a missing $end_multi_text.
EDIT: Iris in your tbm is missing it.
-
wow! Eagle-eyed Mjn!!! :yes:
(or maybe it was your notepad++ syntax highlighting...)
-
Hmm... well let's start with the obvious stuff.
WARNING: Unrecognized parameter in ai_profiles: $Default weapon select effect: OFF
WARNING: Unrecognized parameter in ai_profiles: $Default ship select effect: OFF
Those were moved to game_settings.tbl, iirc, so let's do that.
You're debug log is less than helpful in this case. I suspect that somewhere along the line, you have a small error in a table entry leading to a much larger parsing error. Essentially, I'm guessing that a line is messed up that doesn't really matter, but gets the whole weapons.tbl parser off by a line to where it's finally looking for an #End where it shouldn't.
Leading guess is a missing $end_multi_text.
EDIT: Iris in your tbm is missing it.
Thanks, that did it! I could've found that if I had looked more attentively, I know.
-
Experience taught me where to look. The syntax highlighting made it really easy to scroll the tbm to find it. :)
-
I'm familiar with those sorts of table errors. I just dunno how an error in one table can make FSO start reading another table entirely, and yet blame the first table for the error.
-
yeah, the handling of table errors isn't always modder-friendly. In this case, the error was completely irrelevant (probably leftover from a previous parse) and it was the last table reported as being parsed that was the problem.
(aside: I wonder if some sort of max read length check for parsing the tech description would be a good idea. Or if not that, at least something a bit friendlier that says something like: "I was reading the +Tech Description for +Tech Title <BLAH> and I reached the end of the file! Did you miss an $end_multi_text?")
-
(aside: I wonder if some sort of max read length check for parsing the tech description would be a good idea. Or if not that, at least something a bit friendlier that says something like: "I was reading the +Tech Description for +Tech Title <BLAH> and I reached the end of the file! Did you miss an $end_multi_text?")
That would be much handier than the assert + random error. Though, you do learn with experience. This error, for example, led me in that direction because it mentioned the the right file in the error, but impossible line/entry in that file. (I'm under the impression that FSO essentially constructs a full weapons.tbl out of all the .tbms which leads to this sort of weirdness.)
-
It's a bit weirder than that, but yeah. The error handling of $end_multi_text is something in desperate need of improval.