Jump to content

(MIST) Mission crashes DCS if re-run


JackDant

Recommended Posts

Hi,

 

Posting here first as I'm not sure whether this is a MIST or DCS bug (or both).

 

I have a mission where I have a JTAC unit, and a deactivated group for targets. At mission startup, this group is cloned into a random location via mist.cloneInZone and assigned to the FAC as a task. At the simplest, the code for this is:

 

do
 local tgt = mist.cloneInZone("Target", {"Target Zone"}, true)
 local groupController = Group.getController(Group.getByName("FAC"))
 Controller.pushTask(groupController,{ 
 id = "FAC_EngageGroup", 
 params = { 
   groupId = tgt.groupId,
   weaponType = 1073741822,
   designation = "WP",
   datalink = true,
   frequency = 150000000,
   modulation = 0,
   callname = 1,
   number = 1,
   priority = 0
 } 
 })
end

 

This works great, the first time the mission is run. On quitting the mission, the dcs.log shows the messages:

 

2018-11-11 19:55:39.377 WARNING DCS: task "FAC_EngageGroup" still exists
2018-11-11 19:55:39.377 WARNING DCS: task state for "FAC_EngageGroup" still exists

 

If I then go back to the mission editor, and launch the mission again, as soon as the simulation starts, DCS crashes, with the following in the dcs.log:

 

2018-11-11 19:56:12.155 INFO    EDCORE: # C0000005 ACCESS_VIOLATION at C49CD7FD 00:00000000
2018-11-11 19:56:12.160 INFO    EDCORE: 00000000 00000000 0000:00000000
2018-11-11 19:56:12.167 INFO    EDCORE: C49CD7FD 004FE3F0 0000:00000000 C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe
2018-11-11 19:56:12.172 INFO    EDCORE: C49CB2AC 004FE460 0000:00000000 C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe
2018-11-11 19:56:12.198 INFO    EDCORE: C49CF833 004FE500 0000:00000000 C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe
2018-11-11 19:56:12.199 INFO    EDCORE: DB4DF5C3 004FE530 0000:00000000 C:\Program Files\Eagle Dynamics\DCS World\bin\WorldGeneral.dll ?setTask@Controller@AI@@UEAAPEAVTaskState@2@P
2018-11-11 19:56:12.200 INFO    EDCORE: DB4DF732 004FE580 0000:00000000 C:\Program Files\Eagle Dynamics\DCS World\bin\WorldGeneral.dll ?pushTask@Controller@AI@@UEAAPEAVTaskState@2@
2018-11-11 19:56:12.201 INFO    EDCORE: D87CBF65 004FE600 0000:00000000 C:\Program Files\Eagle Dynamics\DCS World\bin\Scripting.dll ?regLuaCommunicator@Scripting@@YAXPEAUlua_State@

 

I believe this is somehow related to mist.cloneInZone, because at one point I was doing a similar process building my own group data and calling mist.dynAdd directly, and this did not happen.

 

I'm attaching a simple reproduction mission. Launching it twice in the same DCS session seems enough to reproduce (stable or open beta both).

 

Any ideas?

crash.miz

Link to comment
Share on other sites

Move the clone part of the script to a different trigger and use time more than 1 second. There have been bugs with DCS in the past when running scripting functions to quickly or at mission start, especially when it comes to assigning tasks to AI.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...