hkurban 1 Posted March 3, 2014 (edited) Hello all, This problem has been aggravating me to no end, and I have no idea what's wrong. Basically I have created an addon of gas masks in the goggles/glasses slot and I have also created scripts that call for several units to spawn with said gas masks. I got the masks into the game without problem at first, and was in the midst of creating a mission with several dozen masked individuals. I was able to preview the mission in the editor at least once or twice without any problem. After I made a small update to a few of the other PBOs in my addon, I tried previewing the mission and I would run into a freeze and "Arma 3 has encountered a problem, windows is looking for a solution" dialog during the initial loading (at the second loading bar). This was reproducible 100% of the time. I eventually tracked the problem down to my gas masks. If I spawned a gas mask unit, it would freeze. If I removed the gas mask from the unit's init, no problem. If I added the gas mask via in-mission init line, freeze. If I add the gas mask via trigger after mission start, no freeze. So I thought the problem might have to do with calling the masks during the initial loading phase, so I made all units call the mask after a sleep delay. That seemed to work for a while and I was able to start the mission without loading several times. But then it froze again, this time after mission start at the three second mark then the masks are called via the init scripts. And now it happens 100% of the time again at the 3 second mark. I am at a loss as to why the masks might be causing an error. The RPT has no info on the type of error encountered, just the following data at the point of error: Exception code: C0000005 ACCESS_VIOLATION at 00891BE0graphics: D3D11 resolution: 1920x1080x32 I can post the full RPT file in a reply if needed. It also spawns a bidmp and mdmp file but both appear to be binarized so I don't know what to do with them. Below are also my config and gear spawning scripts respectively. gasmask config.cpp (Note that the helmets work 100% of the time despite having an almost identical configuration aside from helmet vs goggles) enum { DESTRUCTENGINE = 2, DESTRUCTDEFAULT = 6, DESTRUCTWRECK = 7, DESTRUCTTREE = 3, DESTRUCTTENT = 4, STABILIZEDINAXISX = 1, STABILIZEDINAXESXYZ = 4, STABILIZEDINAXISY = 2, STABILIZEDINAXESBOTH = 3, DESTRUCTNO = 0, STABILIZEDINAXESNONE = 0, DESTRUCTMAN = 5, DESTRUCTBUILDING = 1, }; class CfgPatches { class hku_stk_headgear { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; }; class cfgWeapons { class ItemCore; // External class reference class InventoryItem_Base_F; // External class reference class HeadgearItem; class GoggleItem; class hku_h_k6_oli : ItemCore { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Olive)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_oli.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_oli.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_blk : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Black)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_blk.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_blk.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_nvy : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Navy)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_nvy.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_nvy.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_cam : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Camouflage)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_cam.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_cam.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_com : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Comrade)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_com.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_com.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_anr : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Anarchist)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_anr.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_anr.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_rad : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Meltdown)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_rad.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_rad.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_sv1 : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Svoboda)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_sv1.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_sv1.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_sv2 : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Freedom)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_sv2.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_sv2.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_h_k6_cr1 : hku_h_k6_oli { scope = 2; weaponPoolAvailable = 1; displayName = "K6 Ballistic Helmet (Crusader)"; picture = "\stkgear\hku_k6_icon.paa"; model = "\stkgear\hku_h_k6_cr1.p3d"; class ItemInfo : HeadgearItem { mass = 30; uniformModel = "\stkgear\hku_h_k6_cr1.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_msk_gp5_gry : ItemCore { scope = 2; weaponPoolAvailable = 1; displayName = "GP-5 Gas Mask (Grey)"; picture = "\stkgear\hku_gp5_icon.paa"; model = "\stkgear\hku_m_gp5_gry.p3d"; class ItemInfo : GoggleItem { mass = 30; uniformModel = "\stkgear\hku_m_gp5_gry.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; class hku_msk_gp5_blk : ItemCore { scope = 2; weaponPoolAvailable = 1; displayName = "GP-5 Gas Mask (Black)"; picture = "\stkgear\hku_gp5_icon.paa"; model = "\stkgear\hku_m_gp5_blk.p3d"; class ItemInfo : GoggleItem { mass = 30; uniformModel = "\stkgear\hku_m_gp5_blk.p3d"; modelSides[] = {3, 1}; armor = 3*0.5; passThrough = 0.8; }; }; }; .sqf Script for one of the units that has a gas mask, note I have moved the gas mask call to the end of the script. _Stalker = _this select 0; removeuniform _Stalker; _Stalker adduniform "U_C_WorkerCoveralls"; _weaponarray = [["hku_arifle_aks74u","hku_30rnd_545x39_7N6_m"],["hku_arifle_akm","hku_30rnd_762x39_PS_m"],["hku_smg_ppsh","hku_71rnd_762x25_FMJ_m"],["hku_smg_mp5","hku_30rnd_9x19_FMJ_mp5"],["hku_arifle_aks74u","hku_30rnd_545x39_7N6_m"],["hku_arifle_akm","hku_30rnd_762x39_PS_m"],["hku_smg_ppsh","hku_71rnd_762x25_FMJ_m"],["hku_smg_mp5","hku_30rnd_9x19_FMJ_mp5"],["hku_hgun_g17","hku_17rnd_9x19_FMJ_m"],["hku_hgun_tt33","hku_8rnd_762x25_FMJ_m"],["hku_hgun_tt33","hku_8rnd_762x25_FMJ_m"],["hku_hgun_m1911","hku_7rnd_45ACP_FMJ_m"],["hku_hgun_pm","hku_8rnd_9x18_PSt_m"],["hku_hgun_pm","hku_8rnd_9x18_PSt_m"],["hku_sgun_m870wp","hku_4rnd_12ga_buck_s"],["hku_sgun_maverick","hku_6rnd_12ga_buck_s"],["hku_sgun_m590","hku_6rnd_12ga_slug_s"]]; _vestarray = ["V_BandollierB_oli","V_Chestrig_khk","V_Rangemaster_belt","V_BandollierB_khk","V_BandollierB_blk","V_Chestrig_khk","V_Rangemaster_belt"]; _headgeararray = ["H_Watchcap_blk","H_Bandanna_sgg","H_Cap_tan","H_Booniehat_khk","H_Bandanna_camo","H_Bandanna_cbr"]; _backpackarray = ["B_FieldPack_cbr","B_FieldPack_oli","B_FieldPack_oli","B_AssaultPack_sgg","B_AssaultPack_rgr","B_AssaultPack_cbr","B_AssaultPack_khk","B_Bergen_rgr","B_BergenG","B_FieldPack_cbr","B_FieldPack_khk","B_FieldPack_khk"]; _wpn1 = _weaponarray select floor random count _weaponarray; _backpack1 = _backpackarray select floor random count _backpackarray; _vest1 = _vestarray select floor random count _vestarray; _headgear1 = _headgeararray select floor random count _headgeararray; _headgearprob = (floor(random 100)); _maskprob = (floor(random 100)); _vestprob = (floor(random 100)); _backpackprob = (floor(random 100)); removeVest _Stalker; removeHeadgear _Stalker; removeBackpack _Stalker; removeGoggles _Stalker; removeAllWeapons _Stalker; removeAllItems _Stalker; if (_vestprob > 65) then { _Stalker addvest _Vest1; }; if (_backpackprob > 70) then { _Stalker addbackpack _Backpack1; }; if (_headgearprob > 40) then { _Stalker addheadgear _headgear1; }; _Stalker addmagazine (_Wpn1 select 1); _Stalker addWeapon (_Wpn1 select 0); _Stalker addmagazine (_Wpn1 select 1); _Stalker addmagazine (_Wpn1 select 1); _Stalker addmagazine (_Wpn1 select 1); _Stalker addmagazine (_Wpn1 select 1); sleep 3; if (_maskprob > 60) then { _Stalker addGoggles "hku_msk_gp5_gry"; }; I really hope someone can help me here. I am going to keep trying to fix this on my own but my limited knowledge on this subject has me stumped. Edit: There seems to be a sort of "critical mass" of how many units can spawn with the masks at any given time. I can spawn at least 4 masked units without a problem, but when I tried 6 it locked up the game again. I tried calling via in game trigger and the same numerical limitations applied. I tried looking into the p3ds to see if theres any sort of error that might be causing a memory leak but there was nothing obvious. Edited March 3, 2014 by HkUrban Share this post Link to post Share on other sites