ERROR: 'EXCEPTION_ACCESS_VIOLATION' (assert: 1) with flexes.

Hello, so, what I’m trying to do is add a flex to a pre-existing model, but no matter what studiomdl I choose, it returns with the same error.


Compiling ".\oildrum001.qc" ...
    qdir:    "c:\users\[Name censored]\desktop\modding\modelling\decompiled 0.36\"
    gamedir: "C:\Program Files (x86)\Steam\steamapps\steamapps\common\Half-Life 2\hl2\"
    g_path:  "oildrum001.qc"
    Building binary model files...
    Working on "oildrum001.qc"
    SMD MODEL oildrum001_reference.smd
    SMD MODEL oildrum001_reference_lod1.smd
    SMD MODEL oildrum001_anims\idle.smd
    SMD MODEL oildrum001_physics.smd
    VTA MODEL oildrum001_reference.vta
    ERROR: 'EXCEPTION_ACCESS_VIOLATION' (assert: 1)
    ERROR: Aborted Processing on 'props_c17\oildrum001.mdl'
  ... Compiling ".\oildrum001.qc" finished. Check above for any errors.

Here’s the QC:


$ModelName "props_c17\oildrum001.mdl"

$StaticProp

$BodyGroup "Body"
{
	studio "oildrum001_reference.smd"
}

$SurfaceProp "metal_barrel"

$Contents "solid"

$CDMaterials "models\props_c17\"

$TextureGroup "skinfamilies"
{
	{ "Oil_Drum001a" }
	{ "Oil_Drum001c" }
	{ "Oil_Drum001d" }
	{ "Oil_Drum001e" }
	{ "Oil_Drum001f" }
	{ "Oil_Drum001g" }
}

$CBox 0 0 0 0 0 0

$BBox -14.5 -14.5 -0.281 14.5 14.5 45.281


$Sequence "idle" {
	"oildrum001_anims\idle.smd"
	fadein 0.2
	fadeout 0.2
	fps 5
	loop
}

$CollisionModel "oildrum001_physics.smd"
{
	$mass 30
	$inertia 1
	$damping 0
	$rotdamping 0
	$rootbone " "
	$concave

}

$model flextest "oildrum001_reference.smd" {
	flexfile "oildrum001_reference.vta" 
	{		// source of vertex animations
		defaultflex frame 0		// relaxed position
		flex "deform1" frame 1
		flex "deform2" frame 2
	}
	flexcontroller phoneme range 0 1 deform1
	flexcontroller phoneme range 0 1 deform2		// defines controllers that will appear in Faceposer etc.
	%deform1 = deform1
	%deform2 = deform2
}

$KeyValues
{
	prop_data 
	{
		"base" "Metal.Medium"
	}
}

Could someone help me with this?
The .vta is 56 KBs.

The cause of the ‘EXCEPTION_ACCESS_VIOLATION’ could be varied,It’s possible that one or more of your files were corrupt,or the model reach the limit that preseted by studiomdl,and even more possible causes that I don’t know.
Provide us more information please?Such as uploading your source files.

It can’t be the limit because it’s the same barrel model as seen in Half-Life 2.

Here I fixed up the QC for you:



$ModelName "props_c17\oildrum001.mdl"

$model flextest "oildrum001_reference.smd" {
	flexfile "oildrum001_reference.vta" 
	{		// source of vertex animations
		defaultflex frame 0		// relaxed position
		flex "deform1" frame 1
		flex "deform2" frame 2
	}
	flexcontroller phoneme range 0 1 deform1
	flexcontroller phoneme range 0 1 deform2		// defines controllers that will appear in Faceposer etc.
	%deform1 = deform1
	%deform2 = deform2
}

$SurfaceProp "metal_barrel"

$Contents "solid"

$CDMaterials "models\props_c17\"

$TextureGroup "skinfamilies"
{
	{ "Oil_Drum001a" }
	{ "Oil_Drum001c" }
	{ "Oil_Drum001d" }
	{ "Oil_Drum001e" }
	{ "Oil_Drum001f" }
	{ "Oil_Drum001g" }
}

$CBox 0 0 0 0 0 0

$BBox -14.5 -14.5 -0.281 14.5 14.5 45.281


$Sequence "idle" {
	"oildrum001_anims\idle.smd"
	fadein 0.2
	fadeout 0.2
	fps 5
	loop
}

$CollisionModel "oildrum001_physics.smd"
{
	$mass 30
	$inertia 1
	$damping 0
	$rotdamping 0
	$concave

}

$KeyValues
{
	prop_data 
	{
		"base" "Metal.Medium"
	}
}


I removed the $Staticprop line, removed the $Bodygroup lines, removed $rootbone " " from the $Collisionmodel line, and placed the $model and flex lines at the top just under $modelname.

$Staticprop and $Bodygroup conflict with flexes, $rootbone with no name can cause some errors, and $model and flexes need to be placed at the top of the QC under $modelname.

Thank you so much, I’ll test it now.

It works!