FlightControl Posted June 29, 2017 Posted June 29, 2017 Anybody having any idea why sometimes the initiator field in the event S_EVENT_PLAYER_LEAVE_UNIT is empty??? This happens only in multi player. @Grimes, is this a reported bug? See the serialized unmodified EventData that i receive (element 2 of the array): EVENT00000.onEvent({[1]="S_EVENT_PLAYER_LEAVE_UNIT",[2]={["id"]=20,["time"]=28237.301,},[5]=-1,}) There is no way to know which player has left which unit? FC [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Grimes Posted June 29, 2017 Posted June 29, 2017 There is an old bug report where it was occurring if people are selecting slots, though I think it was a SP only issue when it was reported. Any instances of it occurring earlier than 7 hours into a mission that might give a better idea of what could be causing it? 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
FlightControl Posted June 29, 2017 Author Posted June 29, 2017 There is an old bug report where it was occurring if people are selecting slots, though I think it was a SP only issue when it was reported. Any instances of it occurring earlier than 7 hours into a mission that might give a better idea of what could be causing it? Hi Grimes, thanks for reaching out. I ran this morning a test for the new tasking engine in the framework with another person and also using his server. So we ran a MP mission on 1 dedicated server, 2 players logged on as a client to the server. And this situation appears soon, when we changed slots. DCS version 1.5.6. I also saw this in the logging on the server: 01318.206 INFO NET: onPlayerSlot(3, 144) 01318.206 INFO NET: passed onPlayerTryChangeSlot 01318.206 INFO NET: release unit 140 01318.206 INFO SCRIPTING: 5123( 13)/E: EVENT00000.onEvent({[1]="S_EVENT_PLAYER_LEAVE_UNIT",[2]={["id"]=20,["time"]=28237.301,},[5]=-1,}) To my current understanding, there wasn't an slmod or something like that running on the server. (Wasn't my server). I will do some more testing on this issue here at home, until I better understand the scenario when this occurs. Maybe you can do this kind of test also? Sven [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Grimes Posted June 29, 2017 Posted June 29, 2017 I don't have a second PC capable of running DCS to test stuff like that on my own. If it occurs as host it is easy enough to reproduce. 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
FlightControl Posted June 29, 2017 Author Posted June 29, 2017 I don't have a second PC capable of running DCS to test stuff like that on my own. If it occurs as host it is easy enough to reproduce. I will do some more tests in a MP setup (server and client), and will report back. I am currently installing a server on my machine (under another user). You can run a DCS server on the same machine, just create another windows user and logon, install dcs, and run as a server with 3D render disabled. No mods or anything. Then back on your normal windows user, you can connect to the server using IP 127.0.0.1. (localhost). The only thing you need is sufficient memory, like 12GB. CPU is not an issue if your PC has 4 cores, DCS only uses 1. It is a bit of a hassle to switch between users, but it is functional. An alternative could be to install a VM, but that works slower and costs extra f.e. a new windows install license. Sven [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
FlightControl Posted June 29, 2017 Author Posted June 29, 2017 I don't have a second PC capable of running DCS to test stuff like that on my own. If it occurs as host it is easy enough to reproduce. It is really strange. So I've been doin tests on my local machine. So run a DCS Server on a local Windows user session (3D off etc), and then connect to this server using IP 127.0.0.1 from a full DCS Client. And guess what... Now it works, and I just cannot resimulate this problem. The initiator field is correctly provided and no problem finding all the relevant fields, including player name... Note that this is a test with one remote player connected on a local host... But I do see the same messages appearing (the 3 lines of NET in the front)... So that is not the issue neither ... 00414.274 INFO NET: onPlayerSlot(2, 132) 00414.274 INFO NET: passed onPlayerTryChangeSlot 00414.274 INFO NET: release unit 100 00414.279 INFO SCRIPTING: 5123( 13)/E: EVENT00000.onEvent({[1]="S_EVENT_PLAYER_LEAVE_UNIT",[2]={["IniUnit"]={["UnitName"]="Defender",["ClassName"]="UNIT",},["IniCoalition"]=1,["IniPlayerName"]="FlightControl",["initiator"]={["id_"]=16777474,},["id"]=20,["IniTypeName"]="Su-27",["IniObjectCategory"]=1,["IniUnitName"]="Defender",["IniCategory"]=0,["IniGroupName"]="Defender",["time"]=27127.486,["IniDCSGroup"]={["id_"]=37,},["IniGroup"]={["_Menus"]={["Command Center (Lima)@Mission \"A2A Mission (High)\"@Statistics Reports@Report Mission Progress"]={["Path"]="Command Center (Lima)@Mission \"A2A Mission (High)\"@Statistics Reports@Report Mission Progress",["MenuText"]="Report Mission Progress",["MenuPath"]={[1]="Command Center (Lima)",[2]="Mission \"A2A Mission (High)\"",[3]="Statistics Reports",[4]="Report Mission Progress",},["ParentMenu"]={["Path"]="Command Center (Lima)@Mission \"A2A Mission (High)\"@Statistics Reports",["MenuText"]="Statistics Reports",["MenuPath"]={[1]="Command Center (Lima)",[2]="Mission \"A2A Mission (High)\"",[3]="Statistics Reports",},["ParentMenu"]={["Path"]="Command Center (Lima)@Mission \"A2A Mission (High)\"",["MenuText"]="Mission \"A2A Mission (High)\"",["MenuPath"]={[1]="Command Center (Lima)",[2]="Mission \"A2A Mission (High)\"",},["ParentMenu"]={["Menus"]={["Mission \"A2A Mission (High)\""]=,},["MenuText"]="Command Center (Lima)",["Coalition"]=1,["ClassName"]="MENU_COALITION",["MenuPath"]={[1]="Command Center (Lima)",},["MenuCount"]=1,},["MenuGroup"]=,["ClassName"]="MENU_GROUP",["MenuGroupID"]=37,["MenuCount"]=4,},["MenuGroup"]=,["ClassName"]="MENU_GROUP",["MenuGroupID"]=37,["MenuCount"]=2,},["ClassName"]="MENU_GROUP_COMMAND",["MenuGroupID"]=37,["MenuGroup"]=,},["System Settings@Player Settings@Settings \"FlightControl\"@A2G Coordinate System@MGRS Accuracy 2"]={["Path"]="System Settings@Player Settings@Settings \"FlightControl\"@A2G Coordinate System@MGRS Accuracy 2",["MenuText"]="MGRS Accuracy 2",["MenuPath"]={[1]="System Settings",[2]="Player Settings",[3]="Settings \"FlightControl\"",[4]="A2G Coordinate System",[5]="MGRS Accuracy 2",},["ParentMenu"]={["Path"]="System Settings@Player Settings@Settings \"FlightControl\"@A2G Coordinate System",["MenuText"]="A2G Coordinate System",["MenuPath"]={[1]="System Settings",[2]="Player Settings",[3]="Settings \"FlightControl\"",[4]="A2G Coordinate System",},["ParentMenu"]={["Path"]="System Settings@Player Settings@Settings \"FlightControl\"",["MenuText"]="Settings \"FlightControl\"",["MenuPath"]={[1]="System Settings",[2]="Player Settings",[3]="Settings \"FlightControl\"",},["ParentMenu"]={["Path"]="System Settings@Player Settings",["MenuText"]="Player Settings",["MenuPath"]={[1]="System Settings",[2]="Player Settings",},["ParentMenu"]={["Menus"]={[table: 00000000393DB0A0]={["Menus"]={[table: 0000000033C02628]={["Menus"]={[table: 0000000032B367E0]={["MenuPath"]={[1]="System Settings",[2]="Default Settings",[3]="A2A Coordinate System",[4]="Activate BULLS",},["ClassName"]="MENU_MISSION_COMMAND",["ParentMenu"]=,["MenuText"]="Activate BULLS",},},["MenuText"]="A2A Coordinate System",["MenuPath"]={[1]="System Settings",[2]="Default Settings",[3]="A2A Coordinate System",},["ClassName"]="MENU_MISSION",["ParentMenu"]=,},[table: 0000000037B3B540]={["Menus"]={[table: 0000000037B0F5E0]={["MenuPath"]={[1]="System Settings",[2]="Default Settings",[3]="A2G Coordinate System",[4]="MGRS Accuracy 3",},["ClassName"]="MENU_MISSION_COMMAND",["ParentMenu"]=,["MenuText"]="MGRS Accuracy 3",},[table: 000000003392F7B0]={["MenuPath"]={[1]="System Settings",[2]="Default Settings",[3]="A2G Coordinate System",[4]="Activate LL",},["ClassName"]="MENU_MISSION_COMMAND",["ParentMenu"]=,["MenuText"]="Activate LL",},[table: 0000000032E34B20]={["MenuPath"]={[1]="System Settings",[2]="Default Settings",[3]="A2G Coordinate System",[4]="MGRS Accuracy 1",},["ClassName"]="MENU_MISSION_COMMAND",["ParentMenu"]=,["MenuText"]="MGRS Accuracy 1",},[table: 00000000C3F57D10]={["MenuPath"]={[1]="System Settings",[2]="Default Settings",[3]="A2G Coordinate System",[4]="Activate BRA" [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
FlightControl Posted June 29, 2017 Author Posted June 29, 2017 Talked too soon... Here is a problem situation ...: Initiator is nil !!! And this without any network, just on localhost. 01163.389 INFO NET: onPlayerSlot(2, 100) 01163.389 INFO NET: passed onPlayerTryChangeSlot 01163.389 INFO NET: release unit 132 01163.389 INFO SCRIPTING: 5123( 13)/E: EVENT00000.onEvent({[1]="S_EVENT_PLAYER_LEAVE_UNIT",[2]={["id"]=20,["time"]=27876.602,},[5]=-1,}) 01163.389 INFO SCRIPTING: 44867( 44290)/F: MISSION00104.AbortUnit({}) 01163.389 INFO SCRIPTING: Error in SCHEDULER function:[string "C:\Users\fligh\AppData\Local\Temp\DCS\/~mis00001345"]:44871: attempt to index local 'PlayerUnit' (a nil value) 01163.389 INFO SCRIPTING: stack traceback: [string "C:\Users\fligh\AppData\Local\Temp\DCS\/~mis00001345"]:4999: in function <[string "C:\Users\fligh\AppData\Local\Temp\DCS\/~mis00001345"]:4995> [string "C:\Users\fligh\AppData\Local\Temp\DCS\/~mis00001345"]:44871: in function 'AbortUnit' [string "C:\Users\fligh\AppData\Local\Temp\DCS\/~mis00001345"]:44290: in function <[string "C:\Users\fligh\AppData\Local\Temp\DCS\/~mis00001345"]:44285> (tail call): ? [C]: in function 'xpcall' [string "C:\Users\fligh\AppData\Local\Temp\DCS\/~mis00001345"]:5250: in function 'onEvent' [string "Scripts/World/EventHandlers.lua"]:13: in function <[string "Scripts/World/EventHandlers.lua"]:11> [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
FlightControl Posted June 29, 2017 Author Posted June 29, 2017 Found it! The event S_EVENT_PLAYER_LEAVE_UNIT is also fired when the player is connected to the server from a client machine, and when he does the following actions: 1. Select from spectators a slot (plane). 2. Don't press "Briefing", but immediately select another slot (plane). Then the S_EVENT_PLAYER_LEAVE_UNIT will be fired when switching slots, but no initiator field will be populated! So, this is something that is worth sharing to the community. Don't consider this to be a bug. I can easily fix this in the framework in the event dispatcher, now I know why this happens. There is no loss of information neither. When a player joins a unit and flies, and then does Quit, Back to Spectators or just leaves the sim, the S_EVENT_PLAYER_LEAVE_UNIT is correctly fired with the initiator field populated. @Grimes; Don't submit a ticket, not needed! Sorry for disturbing. FC [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Grimes Posted June 29, 2017 Posted June 29, 2017 Sounds like it is just an evolution of the existing bug anyways. 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
Recommended Posts