LOIHCal

LOIHCal

29.6k Downloads

Clash with Guilds of WoW addon

Poisonenvy2 opened this issue · 24 comments

commented

Currently there is an issue when both LOIHCal and GoW addon are loaded. When GoW (Guilds of WoW) addon is running (not open, just running), and I open an event on the calendar, but then close the calendar .. not long after, that LOIHCal page will re-active by itself, without the calendar open. And will not close. The only way to close it, is to open up the calendar and select that event again, then close it. Which closes it for a while, before it then reopens by itself again. Only way to fix it, is to disable GoW addon. No bugs showing in Bugsack.

commented

Use command /loihcal debug ingame and repeat the actions needed to trigger this issue at will or wait until it starts happening by itself and take a screenshot or copy & paste the debug outputs here. Feel free to censor/remove any player names etc. you don't feel comfortable to share.

You can turn off the debugging with the same command.

commented

Meh .. typically .. since I've done that, it's refused to behave and misbehave :P It was doing to on such a regular basis, I was switching off GoW and only switching it on very occasionally - but now it's stopped. I'll keep an eye on it and report with a debug if it happens again. Sorry!

commented

.. and it finally just happened again. I had the debugger on but nothing showed up. I had been working on a calendar event for a while, closed the calendar, then about 10 seconds later, the LOIHCal screen just popped up again, without the calendar open. The "X" in the top right corner would not work and the only way to close it was to open the calendar up again, select the event, then close it again.
image

commented

It might possibly be to do with when I have a recurring event in GoW addon that is next month .. just realised that this only seems to happen when there is also a calendar glitch which, when you open up the calendar for this month, will flick to next month. For GoW you can create recurring events so that it adds to the calendar 2 weeks in advance, for example. Two weeks from today has just gone over to 1st June.

commented

The debug doesn't output anything other than the "True" and "False" when switching it on and off. Even when I'm opening and closing events on the calendar. I'm using it with the UI next to the calendar frame .. but tried as an overlay and the same issue happens. I'm also having conversations with those over at GoW on their discord https://discord.gg/VfGJnCS ... I'll ask about the eventtype thing :-)

commented

.. and it finally just happened again. I had the debugger on but nothing showed up. I had been working on a calendar event for a while, closed the calendar, then about 10 seconds later, the LOIHCal screen just popped up again, without the calendar open. The "X" in the top right corner would not work and the only way to close it was to open the calendar up again, select the event, then close it again. image

Don't understand why the debug doesn't output anything when it should be impossible to make the UI appear without debug outputting why it is being shown. Trying to fix this with current information is like trying to hit unkown target in complete darkness and I have to do bit of guessing to be able to even understand where to start.

Does the debug work for everything else you do with the events? Are you using the Overlay option or is the UI next to the CalendarFrame?

It might possibly be to do with when I have a recurring event in GoW addon that is next month .. just realised that this only seems to happen when there is also a calendar glitch which, when you open up the calendar for this month, will flick to next month. For GoW you can create recurring events so that it adds to the calendar 2 weeks in advance, for example. Two weeks from today has just gone over to 1st June.

Do you happen to know what is the eventType of that recurring event?

P.S.: I don't need screenshots of the floating UI, just the debug outputs if you can't copy & paste those.

commented

So the information I've had from GoW discord - I'm going to copy/paste straight across so I don't accidentally mis-translate something :P

"The "calendar jumping" issue you were describing before probably comes from Core:searchForEvent(event) in the addon - basically what's happening there is, given an event key (ex: -GoW######), if the specified event's date is after server time (not in progress), it sets the calendar to the month/year of said event and returns its index. It's the only place in the code that's utilizing the native C_calendar.SetAbsMonth() function, which is used to programmatically change the calendar's month/year. I'm not that knowledgeable on the game's calendar API, but in order to cut down on resource use, it likely doesn't "expose" information about events unless the user has loaded them first via the calendar, so the addon has to flip to the month/year of an event to be able to grab more data about it. In the case that your events aren't visible on the current month's calendar page, it will flip to grab information about upcoming scheduled events.

If the LOIHCal developer is asking about the calendar event type for events, guild events are GUILD_EVENT and team events are PLAYER (since they're by invite)."

The GoW Author replied to that comment:

"Yep this's totally it. I'll check if addon's making some unnecessary month changes after processing all events but this behaviour is inevitable during processing after reload/first-log-in. Blizzard needs to provide real APIs without impacting UI."

commented

Hi .. good news! It appears it's been fixed. GoW have pushed an update and it no longer seems to be an issue. Thank you for your time on this anyway, and thank you for an awesome addon - I really really hate the default Blizzard calendar and this addon just makes life so much easier when organising raids :-)

commented

Glad this got sorted. Using the API to change the month in the ingame calendar shouldn't cause any issues with LOIHCal because it should only show up when event CALENDAR_OPEN_EVENT is fired.

Maybe the GoW-addon checking those recurring events causes it to fire the CALENDAR_OPEN_EVENT and LOIHCal shows the UI, but GoW has already moved on and the blizzard CalendarFrame isn't shown anymore and the LOIHCal UI is left waiting for the blizzard CalendarFrame to close to hide itself?

Just to be safe, I'll try to come up few extra checks to hide the UI when it shouldn't be visible and at least force the UI to hide with slash-command.

commented

Sorry to be a pain. I thought this was fixed .. it seemed to be fixed, then I downloaded the update for LOIHCal and I got the bug again. It's not as bad as before .. I can now close the window using the hide option, and the debug seems to be outputting now. It also doesn't seem to be happening as often.

This is the debug output:

LOIHCal: CALENDAR_OPEN_EVENT "GUILD_EVENT"
LOIHCal: >getState
LOIHCal: >setState
LOIHCal: _updateEventInfo: GUILD_EVENT
LOIHCal: >>> 1: Sepulcher SKIP-GoW118162, 2: Poisonenvy, 3: 7, 4: 5, 5: 27, 6: 2022, 7: 21, 8: 30
LOIHCal: - 2022 5 27 2130 7-Poisonenvy
LOIHCal: - Found DB entry 7-Poisonenvy, updating
LOIHCal: >>> Brewdogz, 60, WARLOCK, 4, nil
LOIHCal: >>> Hoofymetal-Dentarg, 60, PALADIN, 4, nil
LOIHCal: >>> Myta, 60, DRUID, 4, nil
LOIHCal: >>> Málic, 60, DEMONHUNTER, 4, nil
LOIHCal: >>> Poisonenvy, 60, PRIEST, 4, CREATOR
LOIHCal: >>> Tryingh, 60, SHAMAN, 4, nil
LOIHCal: MIB Enabled
LOIHCal: _countSignups
LOIHCal: >>> 1, 4, Málic
LOIHCal: >>> 60, 4, DEMONHUNTER, nil
LOIHCal: >>> 1, 2, Hoofymetal-Dentarg
LOIHCal: >>> 60, 4, PALADIN, nil
LOIHCal: >>> 1, 1, Brewdogz
LOIHCal: >>> 60, 4, WARLOCK, nil
LOIHCal: >>> 2, 3, Myta
LOIHCal: >>> 60, 4, DRUID, nil
LOIHCal: >>> 3, 5, Poisonenvy
LOIHCal: >>> 60, 4, PRIEST, CREATOR
LOIHCal: >>> 4, 6, Tryingh
LOIHCal: >>> 60, 4, SHAMAN, nil
LOIHCal: _bottomText

commented

Pushed out new version with one extra sanity check to bail out on the Show UI -logic and added little bit more debugging to help figure out what happens. Let me know how it works.

commented

Hi ahak!

Just wanted to chime in and say that I'm experiencing the same issue. No LUA errors being thrown, but it seems to happen fairly regularly, albeit randomly, and I'm not able to reliably reproduce the issue.

Addon Version: 9.2.1.1
LOIHCal Debug Export:

[12:12] LOIHCal: - CalendarCreateEventFrame 
[12:12] LOIHCal: - Action Pending... 
[12:12] LOIHCal: >getState 
[12:12] LOIHCal: - Pending Action completed in 183ms. 
[12:12] LOIHCal: >setState 
[12:12] LOIHCal: _updateEventInfo: GUILD_EVENT 
[12:12] LOIHCal: >>> 1: Raid: Learning/Casual-GoW118562, 2: Ayr, 3: 7, 4: 5, 5: 21, 6: 2022, 7: 20, 8: 0 
[12:12] LOIHCal: - 2022 5 21 200 7-Ayr 
[12:12] LOIHCal: - Found DB entry 7-Ayr, updating 
[12:12] LOIHCal: _countSignups 
[12:12] LOIHCal: <<< Healers: 2 
[12:12] LOIHCal: <<< Melee: 1 
[12:12] LOIHCal: <<< Signup: 2 
[12:12] LOIHCal: _bottomText 
[12:12] LOIHCal: >>> NumInvites: 5, numSignup: 3, notReplied: 0 
[12:12] LOIHCal: MIB Enabled 
[12:12] LOIHCal: Hiding UI with /slash

Edit 1: For additional context - I'm not 100% certain that the issue is strictly limited to type GUILD_EVENT, but we use type PLAYER for our progression raids (to only invite our roster) and it doesn't seem to happen with those - only our guild-wide events.

Edit 2: It doesn't happen every time I do it, but I seem to be able to fairly reliably reproduce this issue by opening my world map. Additionally, it happens fairly often when zoning in somewhere. Every time, the updateEventInfo is GUILD_EVENT.

Edit 3: It also seems to be happening quite frequently when I open vendor windows?

commented

So I've had time now to update the addon and have it running for about 45 minutes so far, and so far nothing untoward has happened. I'll keep monitoring it and will let you know once I've had an extended period with it.

This was the output from the debugger:

LOGGING IN, NOT OPENING ANYTHING (these will be the GoW addon doing it's thing, I guess):

LOIHCal: - Settings:
LOIHCal: - overlay false
LOIHCal: - autoRoleDecay false
LOIHCal: - debug true
LOIHCal: - InvWhisper Raid event "%s" is about to start, please accept this invite and, if you're not already there .. get to raid entrance.
LOIHCal: - autoRoleDecayTime 2
LOIHCal: - defaultView false
LOIHCal: - nameDebug false
LOIHCal: - autoRoleCount 3
LOIHCal: - quickMode false
LOIHCal: - defaultDifficulty 14
LOIHCal: - elvSkin false
LOIHCal: - sendWhisper true
LOIHCal: - autoRole true
LOIHCal: - autoConfirm false
LOIHCal: CALENDAR_CLOSE_EVENT
LOIHCal: CALENDAR_OPEN_EVENT "GUILD_EVENT"
LOIHCal: - We ended up in a limbo... Trying to recover...
LOIHCal: Panik! Escaping limbo...
LOIHCal: - Action Pending...
LOIHCal: - Pending Action completed in 170ms.
LOIHCal: CalendarFrame closed before Pending Action was completed
LOIHCal: CALENDAR_CLOSE_EVENT
LOIHCal: CALENDAR_OPEN_EVENT "GUILD_EVENT"
LOIHCal: - We ended up in a limbo... Trying to recover...
LOIHCal: Panik! Escaping limbo...
LOIHCal: - Action Pending...
LOIHCal: - Pending Action completed in 169ms.
LOIHCal: CalendarFrame closed before Pending Action was completed
Rohjan has gone offline.
LOIHCal: CALENDAR_CLOSE_EVENT
LOIHCal: CALENDAR_OPEN_EVENT "GUILD_EVENT"
LOIHCal: - We ended up in a limbo... Trying to recover...
LOIHCal: Panik! Escaping limbo...
LOIHCal: - Action Pending...
LOIHCal: - Pending Action completed in 174ms.
LOIHCal: CalendarFrame closed before Pending Action was completed
[Arcaydis-Dentarg] has come online.
LOIHCal: CALENDAR_CLOSE_EVENT
LOIHCal: CALENDAR_OPEN_EVENT "GUILD_EVENT"
LOIHCal: - We ended up in a limbo... Trying to recover...
LOIHCal: Panik! Escaping limbo...
LOIHCal: - Action Pending...
LOIHCal: - Pending Action completed in 171ms.
LOIHCal: CalendarFrame closed before Pending Action was completed
Guilds of WoW: Event invites are completed. Number of events: 4

OPENING CALENDAR TO CHECK EVENT:

LOIHCal: CALENDAR_OPEN_EVENT "GUILD_EVENT"
LOIHCal: - CalendarCreateEventFrame
LOIHCal: - Action Pending...
LOIHCal: >getState
LOIHCal: - Pending Action completed in 172ms.
LOIHCal: >setState
LOIHCal: _updateEventInfo: GUILD_EVENT
LOIHCal: >>> 1: Sepulcher SKIP-GoW116512, 2: Poisonenvy, 3: 7, 4: 5, 5: 20, 6: 2022, 7: 21, 8: 30
LOIHCal: - 2022 5 20 2130 7-Poisonenvy
LOIHCal: - Found DB entry 7-Poisonenvy, updating
LOIHCal: - Removed "Blodsz" from event 7-Poisonenvy
LOIHCal: Removed character "Blodsz" from event "Sepulcher SKIP-GoW116512" (20.05.2022 21:30)
LOIHCal: _countSignups
LOIHCal: <<< Tanks: 2
LOIHCal: <<< Healers: 3
LOIHCal: <<< Melee: 4
LOIHCal: <<< Ranged: 11
LOIHCal: <<< Ranged: 11
LOIHCal: <<< Signup: 3
LOIHCal: <<< Standby: 1
LOIHCal: _bottomText
LOIHCal: >>> NumInvites: 24, numSignup: 21, notReplied: 2
LOIHCal: MIB Enabled

commented

After over an hour online .. it popped up again, by itself:

LOIHCal: CALENDAR_UPDATE_INVITE_LIST
LOIHCal: _updateEventInfo: nil
LOIHCal: >>> 1: Sepulcher SKIP-GoW116512, 2: Poisonenvy, 3: 7, 4: 5, 5: 20, 6: 2022, 7: 21, 8: 30
LOIHCal: - 2022 5 20 2130 7-Poisonenvy
LOIHCal: - Found DB entry 7-Poisonenvy, updating
LOIHCal: _countSignups
LOIHCal: <<< Tanks: 2
LOIHCal: <<< Healers: 3
LOIHCal: <<< Melee: 5
LOIHCal: <<< Ranged: 11
LOIHCal: <<< Signup: 2
LOIHCal: <<< Standby: 2
LOIHCal: _bottomText
LOIHCal: >>> NumInvites: 25, numSignup: 21, notReplied: 0
LOIHCal: MIB Enabled
LOIHCal: Hiding UI with /slash

commented

I have to say - I'm not even sure GoW is the sole problem here either. I was prepping for raid earlier and once I had what I needed from the GoW addon, I disabled it to avoid additional clashes while I was getting organised .. but not long after I did that, the LOIHCal window popped up all by itself again. By that time I was running late, didn't have the debugger running, and didn't really have time to look into it further, so just disabled it and went into the raid. I'll be able to spend more time watching it over the weekend, and I'll let you know if anything happens :-)

commented

@Poisonenvy2

So I've had time now to update the addon and have it running for about 45 minutes so far, and so far nothing untoward has happened. I'll keep monitoring it and will let you know once I've had an extended period with it.

This was the output from the debugger:

LOGGING IN, NOT OPENING ANYTHING (these will be the GoW addon doing it's thing, I guess):

SNIP SNIP some debug stuff

OPENING CALENDAR TO CHECK EVENT:

SNIP SNIP some debug stuff

Thanks for this, at least this revealed one mistake I made in the previous version that will be fixed.

After over an hour online .. it popped up again, by itself:

SNIP SNIP some debug stuff

I don't understand why this causes the UI to show, but I'll try to make sure this shouldn't happen again.

@Scryrz

Hi ahak!

Just wanted to chime in and say that I'm experiencing the same issue. No LUA errors being thrown, but it seems to happen fairly regularly, albeit randomly, and I'm not able to reliably reproduce the issue.

SNIP SNIP some debug stuff

Yes, this issue isn't caused by an actual error in the code that would throw errors, rather than this addon reacting to events that it should detect to be not worth reacting to, but does it anyway and I try to add more/better checks.

In the future it would be good if you could also include the event that started the chain reaction. They look something like this: LOIHCal: CALENDAR_UPDATE_INVITE_LIST (all caps, spaces replaced with _ and there might be some follow up text after them depending on event)

Edit 1: For additional context - I'm not 100% certain that the issue is strictly limited to type GUILD_EVENT, but we use type PLAYER for our progression raids (to only invite our roster) and it doesn't seem to happen with those - only our guild-wide events.

This addon accepts both GUILD_EVENT and PLAYER type events

Edit 2: It doesn't happen every time I do it, but I seem to be able to fairly reliably reproduce this issue by opening my world map. Additionally, it happens fairly often when zoning in somewhere. Every time, the updateEventInfo is GUILD_EVENT.

Do you happen to remember the firing event(s) that causes this to happen?

Edit 3: It also seems to be happening quite frequently when I open vendor windows?

Never heard of this either, would need to hear the firing event to look more into this.

commented

This addon accepts both GUILD_EVENT and PLAYER type events

I know, just in terms of context surrounding this specific issue, we have a number of events on the calendar of both types, and the only events that seem to cause this particular issue are those of type GUILD_EVENT.

Never heard of this either, would need to hear the firing event to look more into this.

I'll grab specific debug exports for each one that pops up when I'm back home in a little bit and categorize them on Paste.ee so that they have their own tabs, but as far as I can remember the stark majority of the fired events resulting in this issue, regardless of cause, were CALENDAR_UPDATE_EVENT. (Perhaps the seemingly unrelated actions, such as opening map and vendor windows, were just coincidences and it happened at the same time as me performing these actions, but it happened multiple times so I'm not sure.)

commented

This addon accepts both GUILD_EVENT and PLAYER type events

I know, just in terms of context surrounding this specific issue, we have a number of events on the calendar of both types, and the only events that seem to cause this particular issue are those of type GUILD_EVENT.

I think the cause of these issues coming from GUILD_EVENT is that I assume GoW uses only those for the events it handles. Btw. I forgot that the addon also supports COMMUNITY_EVENT type events, but don't know what those are since I just added them to be supported based on user requests.

Never heard of this either, would need to hear the firing event to look more into this.

I'll grab specific debug exports for each one that pops up when I'm back home in a little bit and categorize them on Paste.ee so that they have their own tabs, but as far as I can remember the stark majority of the fired events resulting in this issue, regardless of cause, were CALENDAR_UPDATE_EVENT. (Perhaps the seemingly unrelated actions, such as opening map and vendor windows, were just coincidences and it happened at the same time as me performing these actions, but it happened multiple times so I'm not sure.)

The new version should have bit better handling on CALENDAR_UPDATE_EVENT and CALENDAR_UPDATE_INVITE_LIST which I had completely overlooked when trying to fix this issue since they shouldn't cause the UI to show up, only affect the saved data in background.

commented

I assume GoW uses only those for the events it handles

That's why it's so perplexing to me, because GoW handles both PLAYER and GUILD_EVENT, the only difference is that it uses PLAYER for "team"-based events (when you set specific rosters through the service) so it can automatically invite players on an assigned team to the event.

I know the calendar API is kind of a dinosaur heh, so maybe there's some weird functional difference between the two event types (heck, we were just recently talking in the GoW Discord about the completely unused existence of an eventID parameter that's only returned on Calendar.GetDayEvent but never taken as an arg for anything other than GetEventIndexInfo, which would make lives a lot easier).

If I can get the issue to start happening again, I'll open the event tracer in addition to providing the LOIHCal debug logs just to see if maybe it's some uncaught GoW addon event that's causing issues.

Nonetheless, thanks so much for helping us solve this issue!

commented

I think the issue here is just my addon not having enough safety checks and GoW using API to add/update the event data and the time it takes for the server to handle this causes the client side to fire the events in wrong order, too close to each other it messes up the order or something else in that style.

UI should show itself when event is opened (CALENDAR_OPEN_EVENT) and hide itself when the CalendarFrame is closed (OnHide) and the recently added hiding on close event (CALENDAR_CLOSE_EVENT) doesn't work if events are fired in wrong order.

If you look at the debug messages sent by @Poisonenvy2 you can see that the CALENDAR_CLOSE_EVENT event is fired before the CALENDAR_OPEN_EVENT and earlier I didn't have enough safety checks to cover these special cases and the UI ended showing up.

LOIHCal: CALENDAR_CLOSE_EVENT
LOIHCal: CALENDAR_OPEN_EVENT "GUILD_EVENT"
commented

Starting to run out of ideas where to add additional checks. If the new version doesn't work, I probably have to add small delay between the event firing and checking if the event is really open on your screen and hope it doesn't add too much complications.

commented

I've updated, and had both addons running and had no issues for around 35 minutes then the window popped up again:

LOIHCal: CALENDAR_OPEN_EVENT "GUILD_EVENT"
LOIHCal: - CalendarCreateEventFrame
LOIHCal: - Action Pending...
LOIHCal: >getState
LOIHCal: - Pending Action completed in 175ms.
LOIHCal: >setState
LOIHCal: _updateEventInfo: GUILD_EVENT
LOIHCal: >>> 1: Sepulcher HEROIC-GoW117639, 2: Poisonenvy, 3: 7, 4: 5, 5: 25, 6: 2022, 7: 21, 8: 0
LOIHCal: - 2022 5 25 210 7-Poisonenvy
LOIHCal: - Found DB entry 7-Poisonenvy, updating
LOIHCal: _countSignups
LOIHCal: <<< Tanks: 1
LOIHCal: <<< Healers: 3
LOIHCal: <<< Melee: 2
LOIHCal: <<< Ranged: 4
LOIHCal: _bottomText
LOIHCal: >>> NumInvites: 10, numSignup: 10, notReplied: 0
LOIHCal: MIB Enabled
LOIHCal: Hiding UI with /slash

I've disabled GoW and will see if anything happens.

commented

I ran it for a while tonight and didn't notice the window pop up again, although once, randomly, the debugger showed a message relating to hiding something - only I was in the middle of something at the time and didn't pay attention. I'll try to pay more attention tomorrow :P

Thank you again for all your hard work on this .. it is VERY much appreciated xx

commented

Well I've played several times over the weekend, and no errant window pop-ups .. by george I think you might have nailed it! (although I am wincing even just saying such a thing :-) )

Fingers crossed that fixed it, so I'll go ahead and close this now .. thank you once again :-)