TEMPEST.114 Posted March 5, 2023 Posted March 5, 2023 Okay, two steps forward, one backward. I've now got an aircraft spawning and I thought I'd won. I spawn the group on the command of an F10 Radio Menu choice. However, about 40% of the time, DCS just crashes to desktop - no error in the log, no crash report - it just hangs for a second or two then closes. Now, I relaunch DCS and run the exact same mission, in the same exact way and it works perfectly. In fact I can restart (Shift + R) and do it again and again and again... but then once in a while, it will just crash again just like I've described. Now, I'm not asking for a code review because there's too much and most people don't bother to do it, but I'm asking if anyone has ever experienced this and if so, what where things you looked for and how you fixed it? What is weird is that I'm adding a group, with it's route already inside the table so I'm not adding a group and then immediately pushing a task before the back end has got it all setup. I can't fathom why it works more than 50% of the time, without any code changes, and then will just crash doing the exact same thing.
Grimes Posted March 6, 2023 Posted March 6, 2023 I've had it crash like that in the past but I don't remember the precise reasons or if I've gotten it to do it on addGroup. Usually some expected value was really wrong. Best to output the table to DCS.log directly before calling coalition.addGroup. If it crashes then you can copy that table and use it in a fresh mission to see if it crashes there. Might even look at it and realize the mistake that was made. 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
TEMPEST.114 Posted March 6, 2023 Author Posted March 6, 2023 (edited) { ['taskSelected'] = true, ['modulation'] = 0, ['tasks'] = { }, ['frequency'] = 308, ['hidden'] = false, ['units'] = { [1] = { ['alt'] = 166.12214660645, ['type'] = 'KC135MPRS', ['alt_type'] = 'BARO', ['livery_id'] = '22nd arw', ['onboard_num'] = 888, ['name'] = 'TEXACO91', ['payload'] = { ['pylons'] = { }, ['fuel'] = 90700, ['flare'] = 60, ['chaff'] = 120, ['gun'] = 100 }, ['speed'] = 0, ['callsign'] = { [1] = 1, [2] = 9, ['name'] = 'Texaco91', [3] = 1 } } }, ['y'] = 13072.155273438, ['radioSet'] = true, ['name'] = 'EMERGENCY TANKER', ['communication'] = true, ['x'] = 9961.662109375, ['route'] = { ['points'] = { [1] = { ['y'] = 13072.155273438, ['x'] = 9961.662109375, ['action'] = 'From Parking Area', ['alt_type'] = 'BARO', ['type'] = 'TakeOffParking', ['airdromeId'] = 6, ['task'] = { ['id'] = 'ComboTask', ['params'] = { ['tasks'] = { [1] = { ['enabled'] = true, ['id'] = 'WrappedAction', ['auto'] = true, ['params'] = { ['action'] = { ['id'] = 'EPLRS', ['params'] = { ['value'] = true } } } }, [2] = { ['enabled'] = true, ['id'] = 'Tanker', ['auto'] = true, ['params'] = { } }, [3] = { ['id'] = 'WrappedAction', ['enabled'] = true, ['auto'] = true, ['params'] = { ['action'] = { ['id'] = 'ActivateBeacon', ['params'] = { ['type'] = 4, ['AA'] = false, ['callsign'] = 'ETX', ['system'] = 5, ['channel'] = 99, ['modeChannel'] = 'Y', ['unitId'] = 1, ['bearing'] = true, ['frequency'] = 1060000000 } } } } } } }, ['alt'] = 166.12214660645 }, [2] = { ['alt'] = 12801.599980542, ['type'] = 'Turning Point', ['action'] = 'Turning Point', ['alt_type'] = 'BARO', ['speed'] = 231.50000029066, ['x'] = 57611.49487342, ['task'] = { ['id'] = 'ComboTask', ['params'] = { ['tasks'] = { [1] = { ['enabled'] = true, ['id'] = 'Orbit', ['auto'] = false, ['params'] = { ['altitude'] = 12801.599980542, ['pattern'] = 'Circle', ['speed'] = 180.05555578163, ['altitudeEdited'] = true, ['speedEdited'] = true } } } } }, ['y'] = -66327.173675607 } } }, ['task'] = 'Refueling', ['uncontrolled'] = false } So this is the table. I can't see anything wrong with this. I just tried the mission and script again, fresh, just now and it worked perfectly. I SHIFT + R and tried it again and - bang - CTD. I'm confused. Can any fresh eyes see if I've made a mistake here? Edited March 6, 2023 by Elphaba
TEMPEST.114 Posted March 6, 2023 Author Posted March 6, 2023 (edited) In the TACAN task I had a 'unitId' where there shouldn't have been one. On restarts sometimes it was okay, sometimes it wasn't. Spoke too soon.. still crashing. Edited March 6, 2023 by Elphaba
Recommended Posts