[Potential Bug]: Property lookup failed
Dumpshock opened this issue · 7 comments
Please check for an existing issue before making a new report and comment in that report if one exists.
Possibly related to Issue #111
Describe the Bug
I've been running into lag in my savegame that is getting progressively worse. As such, I've been reviewing logs.
I've found the following lines repeating through my log:
[Scripts] 899876.35 *** aicontext<orders.base,0xaaf85>: Script lib.request.orders returned but no new order in the queue
[=ERROR=] 899876.49 Error in AI script lib.request.orders on entity 0xaaf85: Property lookup failed: $object.defaultorder.id
- $object.defaultorder == null
- Expression: global.$mwex_AllMulesCommandTags.indexof.{$object.defaultorder.id}
- Action: <do_if>, line 33
Searching my savegame, the entity seems to be attached to a Xenon S ship.
Version Info (please complete the following information):
- X4 Foundations : 4.0
- Mules Extended Mod : Latest from Steam? 6.3.4?
- I downloaded the mod from: Steam Workshop
Additional context
Add any other context about the problem here.
Again, just ran across this while digging through my logs trying to identify issues that could be causing lag. Not aware as to why it might be attempting to tag a Mule order to a Xenon ship, figured I'd make the report.
Relevant entry from my savegame.
<connection connection="ships">
<component class="ship_s" macro="ship_xen_s_fighter_01_a_macro" connection="space" code="QPS-542" owner="xenon" spawntime="757219.07" thruster="thruster_gen_s_combat_01_mk1_macro" id="[0xaaf80]">
<listeners>
<listener listener="[0x3cbcc]" event="killed"/>
<listener listener="[0xaaf85]" event="killed"/>
<listener listener="[0xaaf88]" event="boostdisabled"/>
<listener listener="[0xaaf89]" event="boostdisabled"/>
</listeners>
<events>
<event event="updateengineparameters" time="899878.371"/>
<event event="updatebuild" time="899935.86"/>
</events>
<movement forceposition="0" class="navigation">
<position>
<read space="[0xaaf17]" avoidbigobjects="1" avoidsmallobjects="1">
<offset>
<position x="-19899.094" y="-5963.063" z="31707.018"/>
<rotation yaw="107.3401"/>
</offset>
<velocity/>
<acceleration/>
</read>
<write space="[0xaaf17]" avoidbigobjects="1" avoidsmallobjects="1">
<offset>
<position x="-19899.094" y="-5963.063" z="31707.018"/>
<rotation yaw="107.3401"/>
</offset>
<velocity/>
<acceleration/>
</write>
</position>
<targetpoints/>
<flightcontrolmodel type="linear"/>
<transition/>
</movement>
<offset>
<position x="-19899.094" y="-5963.063" z="31707.018"/>
<rotation yaw="107.3401"/>
</offset>
<render>
<parameter value="4279242514" name="letter_color" type="color"/>
<parameter value="4280229404" name="number_color" type="color"/>
<parameter value="assets\fx\gui\textures\factions\faction_xenon" name="diffuse_map" type="texture"/>
</render>
<drop ref="ship_small_xenon"/>
<source job="xenon_fighter_escort_s_patrol_variation" seed="1247036561653078442" sector="[0x3f5a3]" zone="[0x4047d]" commandertime="757225.573" class="job"/>
<modification>
<paint ware="paintmod_0001" generated="1"/>
</modification>
<gravidar/>
<subordinate group="0"/>
<control>
<post id="tradecomputer"/>
<post id="aipilot" component="[0xaaf85]"/>
<post id="playerpilot"/>
</control>
<ammunition>
<available>
<item macro="countermeasure_flares_01_macro" amount="9"/>
</available>
</ammunition>
<weapongroups>
<primary active="0">
<entry>
<weapon id="[0xaaf86]"/>
<weapon id="[0xaaf87]"/>
</entry>
</primary>
<secondary active="0"/>
</weapongroups>
<connections>
<connection connection="con_shield_01">
<component class="shieldgenerator" macro="shield_xen_s_standard_01_mk2_macro" connection="connection01" id="[0xaaf81]">
<offset>
<position y="-3.567" z="-7.769"/>
<rotation yaw="-179.99989" roll="-179.99989"/>
</offset>
</component>
</connection>
<connection connection="commander" id="[0xaaf82]">
<connected connection="[0x3cbfb]"/>
</connection>
<connection connection="con_ishield_01">
<component class="shieldgenerator" macro="ishield_xen_s_fighter_01_a_macro" connection="parentconnection" id="[0xaaf83]"/>
</connection>
<connection connection="con_cockpit" macro="con_cockpit">
<component class="cockpit" macro="cockpit_gen_virtual_01_macro" connection="ship" id="[0xaaf84]">
<offset default="1"/>
<render>
<parameter value="assets\fx\gui\textures\factions\faction_xenon" name="diffuse_map" type="texture"/>
</render>
<connections>
<connection connection="entities">
<component class="computer" macro="character_xenon_generic_01_macro" connection="parentconnection" code="VNR-916" owner="xenon" known="1" read="0" id="[0xaaf85]">
<listeners>
<listener listener="[0xaaf80]" event="killed"/>
</listeners>
<traits flags="remotecommable">
<skill type="boarding" value="1"/>
<skill type="engineering" value="13"/>
<skill type="management" value="14"/>
<skill type="morale" value="13"/>
<skill type="piloting" value="11"/>
</traits>
<entity type="officer" post="aipilot"/>
</component>
</connection>
</connections>
</component>
</connection>
<connection connection="con_primaryweapon_02">
<component class="weapon" macro="weapon_xen_s_laser_01_mk1_macro" connection="weaponcon_01" lastshottime="757043.759" ammunition="8" id="[0xaaf86]">
<offset>
<position x="-1.112" y="-2.613" z="-0.7825"/>
</offset>
<render>
<parameter flags="on|override" value="1" owner="[0xaaf86]" name="mat_dynamicglow" type="glow">
<persistent start="757219.027" duration="1.76513" value="1" target="1"/>
</parameter>
</render>
</component>
</connection>
<connection connection="con_primaryweapon_01">
<component class="weapon" macro="weapon_xen_s_laser_01_mk1_macro" connection="weaponcon_01" lastshottime="757043.759" ammunition="8" id="[0xaaf87]">
<offset>
<position x="1.103" y="-2.614" z="-0.7825"/>
</offset>
<render>
<parameter flags="on|override" value="1" owner="[0xaaf87]" name="mat_dynamicglow" type="glow">
<persistent start="757219.027" duration="2.17501" value="1" target="1"/>
</parameter>
</render>
</component>
</connection>
<connection connection="con_engine_02">
<component class="engine" macro="engine_xen_s_combat_01_mk1_macro" connection="conn_engine01" id="[0xaaf88]">
<offset>
<position x="5.815" y="-1.792" z="-12.502"/>
<rotation roll="20.00001"/>
</offset>
<render>
<parameter flags="on|override" value="1" owner="[0xaaf88]" name="mat_dynamicglow" type="glow">
<persistent start="757219.027" duration="2.71026" value="1" target="1"/>
</parameter>
</render>
</component>
</connection>
<connection connection="con_engine_01">
<component class="engine" macro="engine_xen_s_combat_01_mk1_macro" connection="conn_engine01" id="[0xaaf89]">
<offset>
<position x="-5.59" y="-1.73" z="-12.502"/>
<rotation roll="-20.00002"/>
</offset>
<render>
<parameter flags="on|override" value="1" owner="[0xaaf89]" name="mat_dynamicglow" type="glow">
<persistent start="757219.027" duration="2.15093" value="1" target="1"/>
</parameter>
</render>
</component>
</connection>
</connections>
</component>
</connection>
that shouldn't be causing you lag, but is part of the support for the civilian fleets mod @Vectorial1024
really not sure how that could end up on a xenon ship...
Yeah, didn't think it would be causing lag as well, but it shows up enough in my log, that it caused me to look. That it is attached to a Xenon ship as well is... odd.
Although, depending on some settings, the mules could be part of your problem. Both the supply mule and travel mule have been known to cause some stuttering; the primary issue is how large their trade space is to search. The best way to reduce that is to limit their max jumps to only what you know they need; for the supply mule, you can also uncheck the "allow AI suppliers" which will stop us from even retrieving any trades that include the AI.
It doesn't work to simply filter those with trade rules (as far as lag is concerned), because we check the trade rules after the trades have already been pulled.
That is pretty much what I've already been doing - Most of my mules don't allow AI suppliers and most of my mules don't exceed 5 jumps from a source, most are set to 2 - 3.
Whoops I basically forgot I committed sth in the Mules repo...
But still, perhaps I should check again whether the CivFleet compatibility on this side is working for the latest version of CivFleet.
Edit: side info, when I updated the CivFleet to use the new Mimic command I experimented and noticed that if a ship were to do the special Repeat Orders default behavior, I can't seem to use MD to read the ship's default behavior because the default order id would show up as "null", which is identical to when a ship lost all orders/default orders and became a sitting duck.
This should be resolved as of version 6.3.6 of the project.
Thanks, @Vectorial1024 I have integrated the PR manually and new versions of the mod have been published to both Nexus and Steam as of now.
Will leave open in-case feedback is required, if no feedback I will close this ticket end of the week.