Go Back   WowAce Forums > Addon Chat > AddOn HELP!
AddOn HELP! Requests for assistance and misc bug reports go here.

Reply
 
Thread Tools
Old 02-16-2011   #11
Farmbuyer
Amazing Member
 
Farmbuyer's Avatar
 
Join Date: Feb 2005
Posts: 1,110
Default Re: tracking ChatFrame on Event error

Quote:
Originally Posted by essmene View Post
Sorry for being stupid and trusting Windows.
<rant on>

You'd think "search contents of files" would search the contents of ALL files, but no, in fact, the default setting under Winblows is only to search the content of .txt, .html, and the magic Microsoft-specified file formats, like .doc/.docx and whatnot. It doesn't matter if the file is just plain fucking text (like, say, XML and Lua), if the file extension isn't one of the ones handled by the Office suite, it's silently skipped.

There's some registry twiddling that can be done to override this retarded assumption, but it's shit like that which makes Windows a permanently last-choice platform for programmers.

When I say "search files", any behavior which silently skips files and also doesn't give me a visible way of changing that behavior is wrong, broken, unforgivable, and fucking stupid, full stop, no discussion.
<rant off>
Farmbuyer is offline   Reply With Quote
Old 02-16-2011   #12
Phanx
Seal Cub Clubbing Club
 
Phanx's Avatar
 
Join Date: May 2005
Location: United States
Posts: 8,104
Default Re: tracking ChatFrame on Event error

Windows Grep doesn't require Cygwin. Googling for "windows grep" brings up a few other options, but I haven't tried any of them aside from Bare Grep, which I don't recommend as it's extremely obnoxious if you don't register it (eg. opening your browser and loading web pages asking you to register).

I'd never use the Windows search "feature" to search in files, even if it included all file types, simply because it doesn't actually show any contents in the search results for context.
__________________
Author/maintainer of Grid, PhanxChat, and many more. | PM me on CurseForge
Troubleshoot an addon | Turn any code into an addon | More addon resources
Need help with your code? Attach or paste your whole, real files.
Please don't PM me about addon bugs, requests, or code help. Post a comment, ticket, or thread instead!
Phanx is offline   Reply With Quote
Old 02-16-2011   #13
essmene
Senior Member
 
Join Date: May 2008
Posts: 399
Default Re: tracking ChatFrame on Event error

So Servers are up.

I did disable both addons where Grep found ChatFrame_MessageEventHandler, alas Chatter and Badboy_levels.

Yet the error stays. 1x upon login and another when i start moving.

Code:
[ blade ] # ls -1d * > directory.txt
!BugGrabber/
!Swatter/
+Wowhead_Looter/
AHsearch/
Ace3/
AceGUI-3.0-SharedMediaWidgets/
AckisRecipeList/
AlchemyStats/
Altoholic/
Altoholic_Achievements/
Altoholic_Characters/
Altoholic_Guild/
Altoholic_Search/
Archy/
Arh/
AtlasLoot/
AtlasLootReverse/
AtlasLoot_BurningCrusade/
AtlasLoot_Cataclysm/
AtlasLoot_ClassicWoW/
AtlasLoot_Crafting/
AtlasLoot_WorldEvents/
AtlasLoot_WrathoftheLichKing/
Auc-Advanced/
Auc-Filter-Basic/
Auc-ScanData/
Auc-Stat-Histogram/
Auc-Stat-Purchased/
Auc-Stat-Simple/
Auc-Stat-StdDev/
Auc-Stat-iLevel/
Auc-Util-FixAH/
AuctionProfitMaster/
Auditor2/
Babel/
BabyWigs/
BabyWigs_Deadmines/
BadBoy/
BadBoy_CCleaner/
BadBoy_Levels/
BankStack/
Bartender4/
BeanCounter/
BetterBindingFrame/
BigWigs/
BigWigs_AQ20/
BigWigs_AQ40/
BigWigs_Azeroth/
BigWigs_BWL/
BigWigs_Baradin/
BigWigs_Bastion/
BigWigs_BlackTemple/
BigWigs_Blackwing/
BigWigs_Citadel/
BigWigs_Coliseum/
BigWigs_Core/
BigWigs_Foreign/
BigWigs_Hyjal/
BigWigs_Karazhan/
BigWigs_MC/
BigWigs_Naxxramas/
BigWigs_Northrend/
BigWigs_Options/
BigWigs_Outland/
BigWigs_Plugins/
BigWigs_SSC/
BigWigs_Sunwell/
BigWigs_TheEye/
BigWigs_Throne/
BigWigs_Ulduar/
BigWigs_ZG/
BigWigs_ZulAman/
Bimbo/
Blizz_GuildUI_Status/
Blizzard_AchievementUI/
Blizzard_ArchaeologyUI/
Blizzard_ArenaUI/
Blizzard_AuctionUI/
Blizzard_BarbershopUI/
Blizzard_BattlefieldMinimap/
Blizzard_BindingUI/
Blizzard_Calendar/
Blizzard_CombatLog/
Blizzard_CombatText/
Blizzard_CompactRaidFrames/
Blizzard_DebugTools/
Blizzard_GMChatUI/
Blizzard_GMSurveyUI/
Blizzard_GlyphUI/
Blizzard_GuildBankUI/
Blizzard_GuildControlUI/
Blizzard_GuildUI/
Blizzard_InspectUI/
Blizzard_ItemSocketingUI/
Blizzard_MacroUI/
Blizzard_RaidUI/
Blizzard_ReforgingUI/
Blizzard_TalentUI/
Blizzard_TimeManager/
Blizzard_TokenUI/
Blizzard_TradeSkillUI/
Blizzard_TrainerUI/
Bookworm/
Broker_Auditor/
Broker_CPU/
Broker_Calendar/
Broker_Currency/
Broker_HitCrit/
Broker_LFD/
Broker_LootType/
Broker_Switcher/
Broker_TradeCooldowns/
Broker_uClock/
Buffet/
BugSack/
BulkMail2/
BulkMail2Inbox/
ButtonFacade/
ButtonFacade_Caith/
ButtonFacade_Elegance/
ButtonFacade_Serenity/
ButtonFacade_Sleek/
ButtonFacade_Tones/
CallbackHandler-1.0/
Capping/
Chatter/
ChocolateBar/
ChocolateBar_Options/
ClearFont2/
Clique/
Collectinator/
Combuctor/
Combuctor_Config/
Combuctor_Sets/
Cromulent/
CustomFlightMap/
DXE/
DXE_Citadel/
DXE_Coliseum/
DXE_Kalimdor/
DXE_Loader/
DXE_Naxxramas/
DXE_Northrend/
DXE_Options/
DXE_Ulduar/
DataStore/
DataStore_Achievements/
DataStore_Auctions/
DataStore_Characters/
DataStore_Containers/
DataStore_Crafts/
DataStore_Currencies/
DataStore_Inventory/
DataStore_Mails/
DataStore_Pets/
DataStore_Quests/
DataStore_Reputations/
DataStore_Spells/
DataStore_Stats/
DataStore_Talents/
DewdropLib/
DrDamage/
DropTheCheapestThing/
DungeonSpeedRunner/
EggTimer/
Ellipsis/
Ellipsis_Options/
Enchantrix-Barker/
Enchantrix/
EnsidiaFails/
FeedIt/
FishingBuddy/
FluidFrames/
FlyoutButtonCustom/
FreeRefills/
FriendColor/
FriendNotes/
FriendsWithBenefits/
Fux/
GTFO/
GatherMate2/
GatherMate2_Data/
GnomishVendorShrinker/
GoldenTicket/
GreedBeacon/
Grid/
GridIndicatorSideIcons/
GridIndicatorText3/
GridStatusAFK/
GridStatusAurasExt/
GridStatusDungeonRole/
GridStatusHots/
GridStatusMTs/
GridStatusParty/
GridStatusRD_BC/
GridStatusRD_Cata/
GridStatusRD_Dungeon/
GridStatusRD_WotLK/
GridStatusRaidDebuff/
GridStatusRaidIcons/
GridStatusRes/
GridStatusShield/
GridStatusWeakenedSoul/
Guild_Log/
HandyNotes/
HandyNotes_Guild/
HeadCount2/
Hear Kitty/
HunterStableInfo/
IHML/
InFlight/
InFlight_Load/
Informant/
InlineAura/
InlineAura_Config/
InlineAura_Defaults/
LibAboutPanel/
LibBabble-Boss-3.0/
LibBabble-Class-3.0/
LibBabble-CreatureType-3.0/
LibBabble-Faction-3.0/
LibBabble-Inventory-3.0/
LibBabble-Zone-3.0/
LibBetterBlizzOptions-1.0/
LibBossIDs-1.0/
LibGuildPositions-1.0/
LibSharedMedia-3.0/
LibStub/
LibWho-2.0/
LightHeaded/
LightHeaded_Data_A/
LightHeaded_Data_B/
LightHeaded_Data_C/
LightHeaded_Data_D/
LightHeaded_Data_E/
LightHeaded_Data_NPC/
LightHeaded_Data_QIDNames/
LilSparkysWorkshop/
LinkmateQuests/
LittleWigs/
LittleWigs_Auchindoun/
LittleWigs_BRC/
LittleWigs_CoT/
LittleWigs_Coilfang/
LittleWigs_Coldarra/
LittleWigs_Dalaran/
LittleWigs_Deadmines/
LittleWigs_Dragonblight/
LittleWigs_Frozen_Halls/
LittleWigs_GrimBatol/
LittleWigs_HellfireCitadel/
LittleWigs_Howling_Fjord/
LittleWigs_Icecrown/
LittleWigs_LK/
LittleWigs_LostCity/
LittleWigs_MagistersTerrace/
LittleWigs_Origination/
LittleWigs_Shadowfang/
LittleWigs_Stonecore/
LittleWigs_Storm_Peaks/
LittleWigs_Stratholme/
LittleWigs_TBC/
LittleWigs_TempestKeep/
LittleWigs_ThroneTides/
LittleWigs_VortexPinnacle/
LittleWigs_Zul'Drak/
LoggerHead/
MSBTOptions/
MagicMarker/
Mapster/
MikScrollingBattleText/
MobInfo2/
MobSpells/
Mounted/
NeedToKnow/
Ogri'Lazy/
Omen/
OmniCC/
OmniCC_Config/
OmniCC_Options/
Outfitter/
Overachiever/
Overachiever_Tabs/
Overachiever_Trade/
PallyPower/
Panda/
PetLeash/
PhanxBuffs/
PhanxChat/
PitBull4/
PitBull4_Aggro/
PitBull4_AltPowerBar/
PitBull4_Aura/
PitBull4_Background/
PitBull4_BlankSpace/
PitBull4_Border/
PitBull4_CastBar/
PitBull4_CastBarLatency/
PitBull4_CombatFader/
PitBull4_CombatIcon/
PitBull4_CombatText/
PitBull4_ComboPoints/
PitBull4_DogTagTexts/
PitBull4_DruidManaBar/
PitBull4_Eclipse/
PitBull4_ExperienceBar/
PitBull4_HappinessIcon/
PitBull4_HealthBar/
PitBull4_HideBlizzard/
PitBull4_Highlight/
PitBull4_HolyPower/
PitBull4_HostilityFader/
PitBull4_LeaderIcon/
PitBull4_LuaTexts/
PitBull4_ManaSpark/
PitBull4_MasterLooterIcon/
PitBull4_PhaseIcon/
PitBull4_Portrait/
PitBull4_PowerBar/
PitBull4_PvPIcon/
PitBull4_QuestIcon/
PitBull4_RaidTargetIcon/
PitBull4_RangeFader/
PitBull4_ReadyCheckIcon/
PitBull4_ReputationBar/
PitBull4_RestIcon/
PitBull4_RoleIcon/
PitBull4_Runes/
PitBull4_SoulShards/
PitBull4_Sounds/
PitBull4_ThreatBar/
PitBull4_Totems/
PitBull4_VisualHeal/
PitBull4_VisualHeal4/
PitBull4_VisualHeal5/
PitBull4_VoiceIcon/
Portfolio/
PortfolioDocs/
PowerAuras/
Quartz/
RSA/
RSA_DeathKnight/
RSA_Druid/
RSA_Mage/
RSA_Options/
RSA_Paladin/
RSA_Priest/
RSA_Reminders/
RSA_Rogue/
RSA_Shaman/
RSA_Warlock/
RSA_Warrior/
RaidAchievement/
RaidAchievement_AchieveReminder/
RaidAchievement_CataHeroics/
RaidAchievement_CataRaids/
RaidAchievement_Icecrown/
RaidAchievement_Naxxramas/
RaidAchievement_Ulduar/
RaidAchievement_WotlkHeroics/
RaidBuffStatus/
RantTooltip/
RantTooltip_Classic/
ReadyCheckAnnouncer/
ReadySetDing/
RealIDToons/
RepTracker/
RepairBroker/
ResetEcho/
Revelation/
RoleCheck/
ScrollMaster/
SexyMap/
SharedMedia-Blizzard/
SharedMedia/
SharedMediaAdditionalFonts/
SickOfClickingDailies/
SickOfClickingDailies_AltTracking/
SilentRespec/
SilverDragon/
SilverDragon_Data/
SimpleBossWhisperer/
SimpleMD/
SimpleMD_Options/
SimpleRaidTargetIcons/
Skada/
SkadaAbsorbs/
SkadaCC/
SkadaDamage/
SkadaDamageTaken/
SkadaDeaths/
SkadaDebuffs/
SkadaDispels/
SkadaEnemies/
SkadaFailbot/
SkadaHealing/
SkadaPower/
SkadaThreat/
Skinner/
SlideBar/
SlyProfits/
SmartBuff/
SmartRes2/
SorhaQuestLog/
Spamalyzer/
SpellLight/
StatBlockCore/
Stubby/
TabletLib/
Talented/
Talented_Inspect/
TomTom/
TotemTimers/
TourGuide/
TourGuide_LunarFestival/
TourGuide_MidsummerFestival/
TradeSkillMaster/
TradeSkillMaster_AuctionDB/
TradeSkillMaster_Auctioning/
TradeSkillMaster_Crafting/
TradeSkillMaster_Gathering/
TradeSkillMaster_Mailing/
TradeSkillMaster_Shopping/
TweakWoW/
VendorBait/
Volumizer/
WhisperN00bMSBT/
WhisperWhisper/
_NPCScan.Overlay.Broker/
_NPCScan.Overlay/
_NPCScan/
bags_and_merchants/
bash.exe.stackdump*
directory.txt
epgp_lootmaster/
epgp_lootmaster_ml/
fontain/
idTip/
libdatabroker-1-1/
oRA3/
picoFriends/
picoGuild/
shPerformance/
teksLoot/
totemguru/
zRaid/
Now somebody is gonna slap me...

But i didn't know how to dump a list of the enabled addons.
essmene is offline   Reply With Quote
Old 02-17-2011   #14
Xinhuan
Asian Sheep Lover
 
Xinhuan's Avatar
 
Join Date: Aug 2007
Location: Singapore
Posts: 4,033
Default Re: tracking ChatFrame on Event error

List of enabled addons is in AddOns.txt in your WTF folder for your specific character.

Also, the error means that some addon supplied a bad function to ChatFrame_AddMessageEventFilter(event, filterfunc), it usually has nothing to do with hooking ChatFrame_AddMessageEventFilter() itself, although that can be a potential source for the error.

What happens is that whenever a chat message is received, it is handled by ChatFrame_MessageEventHandler. This function calls every registered filter function added by ChatFrame_AddMessageEventFilter(event, filterfunc). If filterFunc(self, event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) returns true, then that means the message should be filtered and not displayed at all, and ChatFrame_MessageEventHandler returns immediately and does nothing further.

Otherwise, arg1 thru arg15 are assigned the return values of the 2nd-16th return of filterfunc() and the next filter function is called until all are called.

To make it simple to debug and find the culprit, find any addon that is calling ChatFrame_AddMessageEventFilter() and check the function that is being passed in the 2nd argument. It is returning non-valid arg4 in its 5th return value because filterfunc() is supposed to have the following signature and usage in the default UI:

Code:
                filter, newarg1, newarg2, newarg3, newarg4, newarg5, newarg6, newarg7, newarg8, newarg9, newarg10, newarg11, newarg12, newarg13, newarg14, newarg15 = filterFunc(self, event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
                if ( filter ) then
                    return true;
                elseif ( newarg1 ) then
                    arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15 = newarg1, newarg2, newarg3, newarg4, newarg5, newarg6, newarg7, newarg8, newarg9, newarg10, newarg11, newarg12, newarg13, newarg14, newarg15;
                end
The error complains about error on running hooks because something is hooking ChatFrame_OnEvent and something errored in the original call following the hook call - That is, the hook function didn't error, the error occurred in the call to the original function being hooked after the hook function completed.

You have merely misinterpreted the error.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others.

Last edited by Xinhuan; 02-17-2011 at 06:31 PM.
Xinhuan is offline   Reply With Quote
Old 02-19-2011   #15
essmene
Senior Member
 
Join Date: May 2008
Posts: 399
Default Re: tracking ChatFrame on Event error

Thank you Xinhuan.

I got two things. First while looking for the error I ran across FrameXML.log which had some errors (filed "some" bug reports...).

going out tonight, will have a look tomorrow. too bad one can't just iterate through all hooks and test if there is a faulty one, or that the stacktrace doesn't say, who caused it.

Code:
[ blade ] # grep -r ChatFrame_AddMessageEventFilter *
Auc-Advanced/Modules/Auc-Util-AskPrice/AskPrice.lua:            ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", filter); 
Auc-Advanced/Modules/Auc-Util-AskPrice/AskPrice.lua:            ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_WHISPER_INFORM", filter);
BadBoy/BadBoy.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", filter)
BadBoy/BadBoy.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_SAY", filter)
BadBoy/BadBoy.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", filter)
BadBoy/BadBoy.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", filter)
BadBoy/BadBoy.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_EMOTE", filter)
BadBoy/BadBoy.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_DND", filter)
BadBoy/BadBoy.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_AFK", filter)
BadBoy/BadBoy.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", function(_, _, msg)
BadBoy_CCleaner/BadBoy_CCleaner.lua:    ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", filter)
BadBoy_CCleaner/BadBoy_CCleaner.lua:    ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", filter)
BadBoy_Levels/BadBoy_Levels.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", function(_,_,msg)
BadBoy_Levels/BadBoy_Levels.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", function(...)
BadBoy_Levels/BadBoy_Levels.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", function(_,_,msg,player)
BigWigs_Core/BossPrototype.lua: ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", filter)
BigWigs_Core/BossPrototype.lua: ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", filter)
BigWigs_Plugins/BossBlock.lua:  ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", filter)
BigWigs_Plugins/BossBlock.lua:  ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID", filter)
BigWigs_Plugins/BossBlock.lua:  ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_WARNING", filter)
BigWigs_Plugins/BossBlock.lua:  ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_LEADER", filter)
Chatter/Modules/UrlCopy.lua:                    ChatFrame_AddMessageEventFilter(event, self.filterFunc)
DXE/Core.lua:   ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", OTHER_BOSS_MOD_FILTER)
DXE/Core.lua:   ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID", OTHER_BOSS_MOD_FILTER)
DXE/Core.lua:   ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_WARNING", OTHER_BOSS_MOD_FILTER)
DXE/Core.lua:   ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_LEADER", OTHER_BOSS_MOD_FILTER)
DXE/Core.lua:   ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_BOSS_EMOTE",RAID_BOSS_FILTER)
DXE/Core.lua:   ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_BOSS_WHISPER",RAID_BOSS_FILTER)
GreedBeacon/changelog.txt:    Change to use ChatFrame_AddMessageEventFilter instead of hooking
GreedBeacon/GreedBeacon.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_LOOT", function(self, event, msg)
HeadCount2/RaidTracker.lua:     ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", Tracker.CHAT_MSG_WHISPER_FILTER)                    -- enable received whisper event tracking
HeadCount2/RaidTracker.lua:     ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", Tracker.CHAT_MSG_WHISPER_INFORM_FILTER)      -- enable sent whisper event tracking
LinkmateQuests/core.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", filter)
LinkmateQuests/core.lua.old:ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", filter)
PhanxChat/Modules/HideNotices.lua:                      ChatFrame_AddMessageEventFilter(event, HideNotices)
PhanxChat/Modules/HideRepeats.lua:                      ChatFrame_AddMessageEventFilter(event, HideRepeats)
PhanxChat/Modules/LinkURLs.lua:                 ChatFrame_AddMessageEventFilter(event, LinkURLs)
RealIDToons/Core.lua:ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_INLINE_TOAST_ALERT", function(self, event, msg, author, ...)
SilentRespec/SilentRespec.lua:          ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", TalentSpam);
SimpleBossWhisperer/SimpleBossWhisperer.lua:                    ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", function(self, event, msg)
SlyProfits/SlyProfits.lua:  ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", function(...)
epgp_lootmaster/lootmaster_core.lua:    ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM",    LootMaster.ChatFrameFilter)
epgp_lootmaster/lootmaster_core.lua:    ChatFrame_AddMessageEventFilter("CHAT_MSG_PARTY",             LootMaster.ChatFrameFilter)
epgp_lootmaster/lootmaster_core.lua:    ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID",              LootMaster.ChatFrameFilter)
epgp_lootmaster/lootmaster_core.lua:    ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID_LEADER",       LootMaster.ChatFrameFilter)
epgp_lootmaster_ml/lootmaster_ml.lua:    ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER",            LootMasterML.ChatFrameFilter)
epgp_lootmaster_ml/lootmaster_ml.lua:   ChatFrame_AddMessageEventFilter("CHAT_MSG_RAID",        LootMasterML.ChatFrameFilter)
essmene is offline   Reply With Quote
Old 02-19-2011   #16
Xinhuan
Asian Sheep Lover
 
Xinhuan's Avatar
 
Join Date: Aug 2007
Location: Singapore
Posts: 4,033
Default Re: tracking ChatFrame on Event error

The stacktrace doesn't say which filter function caused the error because the filterfunc didn't cause any error. It is the return values after the function ran that are causing errors. As you can see, as long as newarg1 returned non-nil, it assigned newarg1-newarg15 to be the new values of arg1-arg15.

You will need to check the code in each addon to see if the filterfunc returned more than just 1 value.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others.
Xinhuan is offline   Reply With Quote
Old 02-20-2011   #17
essmene
Senior Member
 
Join Date: May 2008
Posts: 399
Default Re: tracking ChatFrame on Event error

think i found it:
Code:
[...]
     ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", TalentSpam);

[...]
function TalentSpam(self, event, ...)
    local msg = ...;
    -- If System Chat Message is "You have Learned..."
    if strfind(msg, learnspellmsg) or strfind(msg, learnabilitymsg) then
        -- If option for hiding "Learned" messages is set for dual or respec and if for dual spec player is changing between dual specs.
        if (hidelearndual and changingspec) or (hidelearnrespec and not changingspec) then
            return true
        else        
            return false, args
        end
args is not defined. If i replace args with msg (which is ...) things are fine?
essmene is offline   Reply With Quote
Old 02-20-2011   #18
Xinhuan
Asian Sheep Lover
 
Xinhuan's Avatar
 
Join Date: Aug 2007
Location: Singapore
Posts: 4,033
Default Re: tracking ChatFrame on Event error

Quote:
Originally Posted by essmene View Post
think i found it:
Code:
[...]
     ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", TalentSpam);

[...]
function TalentSpam(self, event, ...)
    local msg = ...;
    -- If System Chat Message is "You have Learned..."
    if strfind(msg, learnspellmsg) or strfind(msg, learnabilitymsg) then
        -- If option for hiding "Learned" messages is set for dual or respec and if for dual spec player is changing between dual specs.
        if (hidelearndual and changingspec) or (hidelearnrespec and not changingspec) then
            return true
        else        
            return false, args
        end
args is not defined. If i replace args with msg (which is ...) things are fine?
Incorrect.

local msg = ...

merely assigns the first item in the entire list (... is a list) on the right hand side to the 1 variable on the left hand side of the assignment statement. Any excess items in the list on the right hand side are discarded. Likewise,

local a, b, c = ...

would assign the first 3 items in the ... list to a, b, and c. If the right hand side list has less than 3 items, then nils get padded on the right hand side to be assigned to the left hand side.

So if you changed "return false, args" to "return false, msg", you would be returning 2 items, and the calling function that is expecting 16 return values will assign nils to the last 14.

To fix the problem, the correct statement should be "return false, ..."

"return false" by itself will also works since the default UI's code checks to see if the 2nd return value exists. Since it doesn't if you only returned 1 value, it doesn't overwrite the 15 arguments. (See the default UI's code in reply #14 a few posts up.)
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others.

Last edited by Xinhuan; 02-20-2011 at 06:02 PM.
Xinhuan is offline   Reply With Quote
Old 02-21-2011   #19
Phanx
Seal Cub Clubbing Club
 
Phanx's Avatar
 
Join Date: May 2005
Location: United States
Posts: 8,104
Default Re: tracking ChatFrame on Event error

You don't even have to return false. If you don't return anything, it works the same way, with less code. You only need to explicitly return false if you're also returning changed values from the original ones.

Code:
function TalentSpam(self, event, ...)
    local msg = ...;
    -- If System Chat Message is "You have Learned..."
    if strfind(msg, learnspellmsg) or strfind(msg, learnabilitymsg) then
        -- If option for hiding "Learned" messages is set for dual or respec and if for dual spec player is changing between dual specs.
        if (hidelearndual and changingspec) or (hidelearnrespec and not changingspec) then
            return true
        end
__________________
Author/maintainer of Grid, PhanxChat, and many more. | PM me on CurseForge
Troubleshoot an addon | Turn any code into an addon | More addon resources
Need help with your code? Attach or paste your whole, real files.
Please don't PM me about addon bugs, requests, or code help. Post a comment, ticket, or thread instead!
Phanx is offline   Reply With Quote
Old 07-23-2011   #20
sylvanaar
Legendary Member
 
Join Date: Nov 2006
Posts: 2,873
Default Re: tracking ChatFrame on Event error

I'm bored, so I thought I would necro.

The SYSTEM event for level up should not be passed to CF_MEH, in fact, CF_MEH, should not process it at all. It gets turned into an addmessage.and is printed by the system message event handelr
__________________
sylvanaar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:54 PM.