View Single Post
08/31/15, 09:53 PM   #19
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Your welcome, I'm glad it worked for you.
Yes you can tell them if you like. If your sending it to ZOS it might be easier to just tell them to refer to this post, I'll type up an explanation so they can track it down easier...if they want to, they may not since its not really a finished/enabled feature. Addons just turn it on even though its unfinished, and finish the code ourselves.

The error was caused by addons turning on the
Lua Code:
  1. CHAT_SYSTEM:SetAllowMultipleContainers(true)
IN THE PREVIOUS GAME VERSION, when the addons still worked, they were creating multiple chat containers which are saved on the server side. But with the code changes in the new update the chat containers are not getting created properly client side. I tracked the error preventing the containers from being created as far as:

Lua Code:
  1. function SharedChatSystem:InitializeSharedControlManagement(control, newContainerFn)
  2.  ... other code...
  3.     local function CreateContainer(objectPool)
  4.         local containerControl = ZO_ObjectPool_CreateControl("ZO_ChatContainerTemplate", objectPool, GuiRoot)
  5.       -- Error occurs here:
  6.         return newContainerFn(self, containerControl, self.windowPool, self.tabPool)
  7.     end
  8.   ... other code...
  9. end
in the chatSystem/sharedchatsystem.lua code file
At that point I had enough info to fix it and stopped tracking it for now, so that's all I know. That line returns an error so the container did not get created properly client side.

But the chat windows were created before the update & saved on the server side, so they still exist server side. This is why even reinstalling did not help you, because those pesky chat windows are saved on the server!!! So they just keep coming back.

Because the chat containers are not being created client side the old, typical, code for removing/fixing damaged chat containers does not work, things like:
Warning: Spoiler

Those typical ways of removing damaged containers will not work because the container itself does not exist client side, it never got created, but it exists on the server side.

So the fix was to remove them a different way from the server side by using:
Lua Code:
  1. local function OnPlayerActivated()
  2.     local numContainers = GetNumChatContainers()
  3.     for i = numContainers, 2, -1 do
  4.         RemoveChatContainer(i)
  5.     end
  6. end
  7. EVENT_MANAGER:RegisterForEvent(ChatIt.name, EVENT_PLAYER_ACTIVATED, OnPlayerActivated)
which counts down from the total number of chat containers and Removes them. It stops at 1 though and does not remove containerID 1, because that is the primary/main chat container.

OH P.S. If ZOS wants a way to simulate this problem just call this:
Lua Code:
  1. AddChatContainer()
and it will reproduce the problem. You don't even need to turn on
Lua Code:
  1. CHAT_SYSTEM:SetAllowMultipleContainers(true)

Last edited by circonian : 08/31/15 at 10:19 PM.
  Reply With Quote