STEAM GROUP
Crowbar [Source Engine Modding Tool] CrowbarTool
STEAM GROUP
Crowbar [Source Engine Modding Tool] CrowbarTool
791
IN-GAME
6,152
ONLINE
Founded
October 26, 2013
Language
English
fine cuisine Nov 24, 2019 @ 2:55am
access violation error when compiling w/ ins2 studiomdl
so i decompiled an existing insurgency mod so i could recompile it for a different weapon, and i'm getting an access violation error every time i try.

my first attempt was to compile the weapon without changing any of the bodygroups. the original weapon had about 4 bodygroups.

// Created by Crowbar 0.62

Compiling ".\v_m4a1.qc" ...
Output from compiler "C:\Program Files (x86)\Steam\steamapps\common\insurgency2\bin\studiomdl.exe":
qdir: "c:\users\user\documents\m16a3\decompile\"
gamedir: "C:\Program Files (x86)\Steam\steamapps\common\insurgency2\insurgency\"
g_path: "v_m4a1.qc"
Building binary model files...
Working on "v_m4a1.qc"
SMD MODEL v_m16a3_SKM_1P_M16A4.smd
SMD MODEL v_m16a3_SKM_1P_A_FB_M16A4.smd
ERROR: 'EXCEPTION_ACCESS_VIOLATION' (assert: 1)
ERROR: Aborted Processing on 'weapons\v_m4a1.mdl'
WARNING: Leaking 1 elements
... Compiling ".\v_m4a1.qc" finished. Check above for any errors.

i figured that having 4 bodygroups was the issue and i needed to reduce the bodygroup count, so i merged some of the models together and reduced the bodygroup count to 2. i still got an access violation error upon compiling.

// Created by Crowbar 0.62

Compiling ".\v_m4a1_m16_comp.qc" ...
Output from compiler "C:\Program Files (x86)\Steam\steamapps\common\insurgency2\bin\studiomdl.exe":
qdir: "c:\users\user\documents\m16a3\decompile\"
gamedir: "C:\Program Files (x86)\Steam\steamapps\common\insurgency2\insurgency\"
g_path: "v_m4a1_m16_comp.qc"
Building binary model files...
Working on "v_m4a1_m16_comp.qc"
SMD MODEL v_m16a3_wpn.smd
SMD MODEL v_m16a3_gl.smd
SMD MODEL v_m4a1_anims\a_delta_foregrip.smd
ERROR: 'EXCEPTION_ACCESS_VIOLATION' (assert: 1)
ERROR: Aborted Processing on 'weapons\v_m4a1.mdl'
... Compiling ".\v_m4a1_m16_comp.qc" finished. Check above for any errors.

then i figure that the issue is the presence of more than 1 bodygroup, so i merge all the models into one .smd file. lo and behold, another access violation.

// Created by Crowbar 0.62

Compiling ".\v_m4a1_m16_comp.qc" ...
Output from compiler "C:\Program Files (x86)\Steam\steamapps\common\insurgency2\bin\studiomdl.exe":
qdir: "c:\users\user\documents\m16a3\decompile\"
gamedir: "C:\Program Files (x86)\Steam\steamapps\common\insurgency2\insurgency\"
g_path: "v_m4a1_m16_comp.qc"
Building binary model files...
Working on "v_m4a1_m16_comp.qc"
SMD MODEL v_m16a3_SKM_1P_M16A4_comp.smd
SMD MODEL v_m4a1_anims\a_delta_foregrip.smd
ERROR: 'EXCEPTION_ACCESS_VIOLATION' (assert: 1)
ERROR: Aborted Processing on 'weapons\v_m4a1.mdl'
... Compiling ".\v_m4a1_m16_comp.qc" finished. Check above for any errors.

the best part is that a month later, i recompile this exact same weapon ( not porting) with a single bodygroup, and it worked.

what exactly am i doing wrong here ? it sure as hell can't be the polycount because the total polycount (all models) clocks in at around 10.4k verts/20k faces, i've previously compiled a model with over 40k faces for insurgency and it worked fine. the default abrams tank model in the game literally exceeds the polycount of this by several thousand verts. i doubt its the fact that the bone count exceeds the supported count for .smd files either, because i've recompiled similar models that exceed 128 bones without issue.


edit - if it helps at all:
the workshop mod in question
  • its probably of important note that all of the .smd files had a "null" bone that prevented me from importing into blender, so i had to open all of the .smd files with notepad++ and manually remove the "null" bones from them.
  • if its of any relevance, i was trying to port the weapon to the games' m4a1.

edit 2:
i realize that i've attempted compiling all of this with crowbar 0.62 instead of 0.64, but compile with 0.64 literally changes nothing.

Compiling with Crowbar 0.64: "C:\Users\User\Documents\m16a3\decompile\v_m4a1_m16_comp.qc" ...

Compiling ".\v_m4a1_m16_comp.qc" ...
Output from compiler "C:\Program Files (x86)\Steam\steamapps\common\insurgency2\bin\studiomdl.exe":
qdir: "c:\users\user\documents\m16a3\decompile\"
gamedir: "C:\Program Files (x86)\Steam\steamapps\common\insurgency2\insurgency\"
g_path: "v_m4a1_m16_comp.qc"
Building binary model files...
Working on "v_m4a1_m16_comp.qc"
SMD MODEL v_m16a3_wpn.smd
SMD MODEL v_m16a3_gl.smd
SMD MODEL v_m4a1_anims\a_delta_foregrip.smd
ERROR: 'EXCEPTION_ACCESS_VIOLATION' (assert: 1)
ERROR: Aborted Processing on 'weapons\v_m4a1.mdl'
... Compiling ".\v_m4a1_m16_comp.qc" finished. Check above for any errors.

... Compiling with Crowbar 0.64: "C:\Users\User\Documents\m16a3\decompile\v_m4a1_m16_comp.qc" finished.
Last edited by fine cuisine; Nov 24, 2019 @ 3:05am
< >
Showing 1-2 of 2 comments
lorjason34 Nov 24, 2019 @ 6:31am 
This should not happen, but I have a feeling that model you're using has so many vertices that studiomdl is literally deciding not to compile. It happened to me when I compiled a character who had boots with very high vertex count. See if you can try splitting up the main weapon into 5 parts and the Grenade Launcher into 2, with each part having their own $bodygroup assigned to them in the qc file.
ZeqMacaw Nov 24, 2019 @ 8:33am 
I downloaded the workshop item, decompiled the v_m16a3 model, and tried to recompile via Crowbar 0.64. The compile log showed these messages:
"WARNING: unknown studio command "end"
Based on what you said about null bones, I noticed each SMD file I checked had this line in the skeleton:
163 "" -1
I am not sure how this was originally compiled, but this certainly is not good for re-compiling. So, I used a "find and replace tool" to change that line in all SMD files (mesh and animation) into:
163 "test" -1
This allowed the model to compile.

The empty or "null" bone name seems like a decompile problem, so I'll consider having Crowbar rename empty bone names to unique names when decompiling.
Last edited by ZeqMacaw; Nov 24, 2019 @ 8:34am
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Nov 24, 2019 @ 2:55am
Posts: 2