Class reference too high(24, max 18)
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- alekskiller
- Posts: 5
- Joined: Sat Aug 19, 2017 6:33 am
Class reference too high(24, max 18)
Well, I've been working on a mod for Zdoom(not gzdoom) for quite a while, and decided to make "modern" weapon pwad for it. It was important to save the original gun names in Decorate, so I did that. The thing is, I thought everything was normal(yeah, for me such a thing as declaring something twice is ok), but after completing any level and dying on the next level, the game crashes to console, saying "Class reference too high(24, max 18)". I really don't know what to do, because it renders the wad unusable... If you know how to fix that, please say.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Class reference too high(24, max 18)
I have no idea where that message comes from. Can you post the entire startup log so what we can see where in the startup sequence it gets triggered?
- alekskiller
- Posts: 5
- Joined: Sat Aug 19, 2017 6:33 am
Re: Class reference too high(24, max 18)
Code: Select all
Log started: Sat Aug 19 17:13:16 2017
M_LoadDefaults: Load system defaults.
Using program directory for storage
W_Init: Init WADfiles.
adding C:/Games/ZDoom/zdoom.pk3, 584 lumps
adding doom.wad, 2306 lumps
adding DOOMPACK.wad, 702 lumps
adding doompackmodern.wad, 20 lumps
I_Init: Setting up machine state.
CPU Speed: 2495 MHz
CPU Vendor ID: AuthenticAMD
Name: AMD A10-5757M APU with Radeon(tm) HD Graphics
Family 21 (21), Model 19, Stepping 1
Features: MMX MMX+ SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing FMOD
FMOD Sound System, copyright © Firelight Technologies Pty, Ltd., 1994-2009.
Loaded FMOD version 4.36.23
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
Tried to register class 'Pistol8' more than once.
Tried to register class 'Chaingun2' more than once.
Tried to register class 'SniperRifle' more than once.
Tried to register class 'Shotgun2' more than once.
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
Editor number 30671 refers to hidden class type 'Shotgun2'
Editor number 30790 refers to hidden class type 'SniperRifle'
Editor number 30763 refers to hidden class type 'Chaingun2'
Editor number 30670 refers to hidden class type 'Pistol8'
Editor number 30670 defined twice for classes 'Pistol8' and 'Pistol8'
Editor number 30763 defined twice for classes 'Chaingun2' and 'Chaingun2'
Editor number 30790 defined twice for classes 'SniperRifle' and 'SniperRifle'
Editor number 30671 defined twice for classes 'Shotgun2' and 'Shotgun2'
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading default status bar definition.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
I_InitInput
I_StartupMouse
I_StartupKeyboard
I_StartupXInput
I_StartupRawPS2
I_StartupDirectInputJoystick
Resolution: 1366 x 768
9 bots read from bots.cfg
<------------------------------->
pro7c - The Facility
<------------------------------->
BOSS: The Enforcer
<------------------------------->
<------------------------------->
Prepare to die, Doomguy!
<------------------------------->
]kill monsters
5 Monsters Killed
<------------------------------->
The Enforcer: You will never defeat me!
<------------------------------->
<------------------------------->
DOOMGUY: We'll see!
<------------------------------->
<------------------------------->
The Enforcer: See ya!
<------------------------------->
<------------------------------->
DOOMGUY: Already running, huh? Take that!
<------------------------------->
<------------------------------->
The Enforcer: Catch me if you can!
<------------------------------->
<------------------------------->
pro8c - The Cloning Factory
game saved. (C:/Games/ZDoom/auto1.zds)
]kill
sanek suicides.
<------------------------------->
pro8c - The Cloning Factory
Class reference too high (24; max is 16) //here is my problem!
- alekskiller
- Posts: 5
- Joined: Sat Aug 19, 2017 6:33 am
Re: Class reference too high(24, max 18)
I have found the solution by myself!
Actually, I haven't included the sound files for the weapons in the wad, because they were in the main wad already. That actually was the problem. I have added SNDINFO (with nessecary entries) and the sound files, and it didn't do the same error again!
Actually, I haven't included the sound files for the weapons in the wad, because they were in the main wad already. That actually was the problem. I have added SNDINFO (with nessecary entries) and the sound files, and it didn't do the same error again!
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Class reference too high(24, max 18)
I'd still like to know where this weird message comes from. It's not in the GZDoom source anywhere.
- alekskiller
- Posts: 5
- Joined: Sat Aug 19, 2017 6:33 am
Re: Class reference too high(24, max 18)
It is not in GZDoom, it is in ZDoom! I know it is discontinued, but you probably need to check it's source instead.
Re: Class reference too high(24, max 18)
Looks like it used to be in farchive.cpp
@alekskiller - what version of ZDoom are you running (or is it Zandronum?)? This code was removed from ZDoom in 2010...
@alekskiller - what version of ZDoom are you running (or is it Zandronum?)? This code was removed from ZDoom in 2010...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Class reference too high(24, max 18)
Holy crap...
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: Class reference too high(24, max 18)
Just note that it was removed in the scripting branch, which was merged in master much later.AFADoomer wrote:This code was removed from ZDoom in 2010...
Re: Class reference too high(24, max 18)
Ah, good point... Didn't catch that. Is there a way to tell what branch something is in from the standard commit summary page that I'm missing?
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: Class reference too high(24, max 18)
If such a commit was done during the SVN era, it's clearly written in the 'translated' git commit message ( "SVN r2281 (scripting)" in the last line).
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Class reference too high(24, max 18)
Stuff like this just makes me glad I replaced that old savegame code for good last year. If anything broke in there there was generally no chance whatsoever to track down the cause.
- alekskiller
- Posts: 5
- Joined: Sat Aug 19, 2017 6:33 am
Re: Class reference too high(24, max 18)
I'm using ZDoom version 2.8.1, if you need.AFADoomer wrote:Looks like it used to be in farchive.cpp
@alekskiller - what version of ZDoom are you running (or is it Zandronum?)? This code was removed from ZDoom in 2010...
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Class reference too high(24, max 18)
That code is still in LE:
Code: Select all
const PClass *FArchive::ReadStoredClass (const PClass *wanttype)
{
DWORD index = ReadCount ();
if (index >= m_ClassCount)
{
I_Error ("Class reference too high (%u; max is %u)\n", index, m_ClassCount);
}
const PClass *type = m_TypeMap[index].toCurrent;
if (!type->IsDescendantOf (wanttype))
{
I_Error ("Expected to extract an object of type '%s'.\n"
"Found one of type '%s' instead.\n",
wanttype->TypeName.GetChars(), type->TypeName.GetChars());
}
return type;
}