Author Topic: Issues with entities owned by a deleted alliance  (Read 618 times)

Hammelpilaw

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    476
    • View Profile
    • Scrap Yard - Avofactory
on: September 09, 2017, 08:07:24 AM
There is an issue when having entities (ships or stations) owned by a deleted alliance.

When logging in while you are still in the ship of the deleted alliance this happens once:

Code: [Select]
2017-09-09 07-50-26| error constructing Faction: Faction 3 doesn't exist at     [C]:-1: in function Faction
2017-09-09 07-50-26|     data/scripts/entity/insurance.lua:361: in function generateInsuranceMailText
2017-09-09 07-50-26|     data/scripts/entity/insurance.lua:61: in function ?
2017-09-09 07-50-26| could not execute function 'Insurance.initialize' in '"data/scripts/entity/insurance.lua"':
2017-09-09 07-50-26| data/scripts/entity/insurance.lua:373: attempt to index local 'receiver' (a nil value)
2017-09-09 07-50-26| stack traceback:
2017-09-09 07-50-26|     data/scripts/entity/insurance.lua:373: in function 'generateInsuranceMailText'
2017-09-09 07-50-26|     data/scripts/entity/insurance.lua:61: in function <data/scripts/entity/insurance.lua:49>
2017-09-09 07-50-26|
2017-09-09 07-50-26| error constructing Faction: Faction 3 doesn't exist at     [C]:-1: in function Faction
2017-09-09 07-50-26|     data/scripts/entity/insurance.lua:361: in function generateInsuranceMailText
2017-09-09 07-50-26|     data/scripts/entity/insurance.lua:61: in function ?
2017-09-09 07-50-26| could not execute function 'Insurance.initialize' in '"data/scripts/entity/insurance.lua"':
2017-09-09 07-50-26| data/scripts/entity/insurance.lua:373: attempt to index local 'receiver' (a nil value)
2017-09-09 07-50-26| stack traceback:
2017-09-09 07-50-26|     data/scripts/entity/insurance.lua:373: in function 'generateInsuranceMailText'
2017-09-09 07-50-26|     data/scripts/entity/insurance.lua:61: in function <data/scripts/entity/insurance.lua:49>
2017-09-09 07-50-26|
2017-09-09 07-50-26| error constructing Faction: faction 3 doesn't exist at     [C]:-1: in function Faction
2017-09-09 07-50-26|     data/scripts/entity/gate.lua:124: in function ?
2017-09-09 07-50-26| error constructing Faction: faction 3 doesn't exist at     [C]:-1: in function Faction
2017-09-09 07-50-26|     data/scripts/entity/gate.lua:124: in function ?
2017-09-09 07-50-26| error constructing Faction: faction 3 doesn't exist at     [C]:-1: in function Faction



This is logged in client log at every update tick when the abandoned ship is selected in Avorion.

Code: [Select]
2017-09-09 07-33-52| error constructing Faction: faction 8 doesn't exist at     [C]:-1: in function Faction
2017-09-09 07-33-52|     data/scripts/entity/invitetogroup.lua:14: in function ?
2017-09-09 07-33-52| could not execute function 'InviteToGroup.interactionPossible' in '"data/scripts/entity/invitetogroup.lua"':
2017-09-09 07-33-52| data/scripts/entity/invitetogroup.lua:15: attempt to index local 'faction' (a nil value)
2017-09-09 07-33-52| stack traceback:
2017-09-09 07-33-52|     data/scripts/entity/invitetogroup.lua:15: in function <data/scripts/entity/invitetogroup.lua:11>



In another galaxy there was also an error in another script, wich did not happen though when I reproduced this issue:

Code: [Select]
2017-09-09 07-33-52| error constructing Faction: Faction 8 doesn't exist at     [C]:-1: in function Faction
2017-09-09 07-33-52|     data/scripts/entity/transfercrewgoods.lua:58: in function ?
2017-09-09 07-33-52| could not execute function 'TransferCrewGoods.interactionPossible' in '"data/scripts/entity/transfercrewgoods.lua"':
2017-09-09 07-33-52| data/scripts/entity/transfercrewgoods.lua:59: attempt to index local 'shipFaction' (a nil value)
2017-09-09 07-33-52| stack traceback:
2017-09-09 07-33-52|     data/scripts/entity/transfercrewgoods.lua:59: in function <data/scripts/entity/transfercrewgoods.lua:43>



Steps to reproduce:
  • Found an alliance
  • Found an alliance ship
  • Get on the ship and stay there (this may increase errors, but can be skipped though)
  • Delete the alliance
  • Log off
  • Log on
  • Select the abandoned ship by clicking 3rd mouse button
This issue does not cause a bug or glitch ingame, but spams the client logs with error messages.
My mods and tools

If you find an bug in my mods please pm me, answer on related topic or open new issue on GitLab