ERROR: CM_InlineModel: bad number on specific map

I’m getting this strange error while joining specific map ‘aerowalk’. This issue is occur only on remote host. I can load this map without problem locally /devmap aerowalk.

Relevant part of console output:

stitched 10 LoD cracks
...loaded 1840 faces, 24 meshes, 42 trisurfs, 0 flares
CL_InitCGame:  0.52 seconds
3 msec to draw all images
Com_TouchMemory: 0 msec
change_map_please^7 entered the game
ERROR: CM_InlineModel: bad number
forcefully unloading cgame vm
RE_Shutdown( 0 )
Hunk_Clear: reset the hunk ok

What could be cause of that error and how can i fix that? It’s really good map :slight_smile:

Version of ioquake3:

ioq3 1.36_GIT_41f83ac-2015-10-17 linux-x86_64 Oct 17 2015^7

Is this a Quake Live map?

The usual map name for Aerowalk is cpm22 (or hub3aeroq3)

I found a map called aerowalk on lvlworld: there are also a bunch of variants there.

QL has it’s own version i believe (never played ql). Original map is cpm22 from CPMA mod. Aerowalk or hub3aeroq3 is just a remake designed for vq3.

We are going off topic sir. CM_InlineModel error seems to be common on idtech3 based engines and it’s probably related to bsp maps.
So… can we do anything about it? Like debug the cause?

Maybe a entity references a BSP submodel that does not exist? Not sure how that would happen though.

Change the print message to include the number and max submodels.

Change the Com_Error in code/qcommon/cm_load.c

clipHandle_t	CM_InlineModel( int index ) {
	if ( index < 0 || index >= cm.numSubModels ) {
		Com_Error (ERR_DROP, "CM_InlineModel: bad number %d (total %d)", index, cm.numSubModels);
	return index;

Then compile the engine and load the map to find the number.

Check the entities string in the level BSP file for "model" "*1" (where 1 is whatever the reported ‘bad number’ is) to find the entity that references the inline model. Use a hex editor or strings command line program to read the BSP.

After finding the entity see if it is limited to specific gametypes using "notfree" "1" or "gametype" "team ctf" etc. Using different gametype for remote and local server might explain why it’s an issue on one but not the other.

Not really sure what to do with the entity if it’s found. You could change the “classname” to something else to disable the entity though then it won’t be network compatible. Report bad number, total submodels, and entity definition here if you can find them I guess?

Thanks for detailed explanation, but still i need a little help on that. I found that bad number is 7 (and cm.numSubModels=7). Some relevant output from strings:

"model" "*6"
"origin" "-384 -448 136"
"classname" "weapon_rocketlauncher"
"classname" "item_health_mega"
"origin" "128 -464 64"
"classname" "ammo_bullets"
"origin" "668 -512 64"
"classname" "ammo_shells"
"origin" "612 -512 64"
"origin" "432 -464 64"
"classname" "item_armor_jacket"
"origin" "928 -160 376"
"targetname" "gldest"
"angle" "270"
"classname" "misc_teleporter_dest"
"spawnflags" "0"
"targetname" "t8"
"classname" "info_null"
"origin" "-6 10 408"
"origin" "40 112 408"
"classname" "info_null"
"targetname" "t9"
"origin" "376 -272 408"
"classname" "info_null"
"targetname" "t10"
"classname" "func_static"  
"cellId" "281"
"model" "*7"
"cellId" "283"
"classname" "func_static"  
"model" "*8"
"classname" "func_static"  
"cellId" "282"
"model" "*9"
"origin" "128 -32 584"
"noise" "sound/ambient/loop_wind_stroggos.wav"
"spawnflags" "1"
"classname" "target_speaker"
"classname" "target_speaker"
"spawnflags" "1"
"noise" "sound/ambient/loop_wind_stroggos.wav"
"origin" "976 -608 560"
"origin" "-320 464 584"
"noise" "sound/ambient/loop_wind_stroggos.wav"
"spawnflags" "1"
"classname" "target_speaker"
"origin" "-384 -106 360"
"angle" "90"
"classname" "info_player_deathmatch"
"classname" "item_armor_body"
"origin" "-384 -70 352"
"classname" "info_player_deathmatch"
"angle" "90"
"origin" "544 -668 376"
"classname" "info_player_deathmatch"
"angle" "225"
"origin" "408 560 376"
"identifier" "1"
"count" "128"
"gametype" "dom"
"origin" "128 -32 -56"
"classname" "team_dom_point"
"classname" "func_static"
"_rs" "1"
"_cs" "0"

It seems that model #7 is not rich with attributes. I can load this map with no issue locally, but got disconnected every time, when map is loaded on server.
Any idea on next step?

It is also possible that the “item_armor_jacket” entity is causing the problem. I saw several maps that won’t load because of this item (“item_armor_jacket” is not a q3 item)!
The item is placed at origin: -544 -304 136.
Either use BSPTool to remove it, or change “classname” to something else (as zturtleman said).

Interesting theory. It’s q3 item locally, but not on remote server?

I don’t think it’s the unknown entities (team_dom_point, item_armor_jacket, …). They should just cause a warning message.

I’m not sure what “cellId” is for func_static is. Looks like it’s for Quake Live advertisements. I’m guessing the submodels after/equal to cm.numSubModels are from the BSP Advertisements lump that’s only loaded in Quake Live. I don’t know why it’s not an issue for local server though.

You could modify the game qvm to drop func_static that have cellId set, or modify the BSP to remove or disable them.

@bagherra: Do you know of other maps that produces the same result?
I searched for the maps I thought that won’t load, didn’t find it, maybe I was wrong!
But I found another one that didn’t load (even locally). It’s this one:
This map loads on ioquake 1.36, but do not load anymore. Though eventually this is a renderer issue.
Can you check if this map produces the same error, or another error?
Eventually we can inspect the affected map files than.
Just some thoughts to help you!

Sorry, this thread will be closed because we cannot help run Quake Live maps in any other engine. Quake Live is a closed-source fork of Quake 3.