Makar8000 / ACT-Discord-Triggers

An ACT plugin for routing audio to discord
50 stars 14 forks source link

ACT freezes when playing TTS in voice channel #52

Closed PyrZern closed 1 year ago

PyrZern commented 5 years ago

Windows 10 Latest version of Discord Triggers v 1.0.1.2 Latest version of ACT v 3.4.0.260 Not upgrade, newly installed. Did Unblock. Did restart ACT. Load Order

Discord Trigger OverlayPlugin XIV_ACT_Plugin

Makar8000 commented 5 years ago

Hello. Could you try to disable OverlayPlugin & restart ACT just to check if the issue still persists? Just trying to make sure the issue is isolated. I assume you checked to make sure 4.6.2 .NET Framework or later is installed too?

PyrZern commented 5 years ago

Yes, I can confirmed that 4.6.2 .NET Framework is indeed installed. Same result regardless if Overlay Plugin in enabled or disabled. (I did restart after toggling it)

I can test TTS locally just fine, but when it is in a voice channel, testing same TTS would immediately crash ACT.

Makar8000 commented 5 years ago

Okay. Thanks for checking that. Is there anything you notice that pops up in debug log in the UI? I know it crashes, but maybe something appears just before it freezes up?

Lastly, can you check the ACT error logs? I believe they are somewhere in the %APPDATA% folder. It might have some crash information similar to this one https://github.com/Makar8000/ACT-Discord-Triggers/issues/47#issue-450572460

PyrZern commented 5 years ago

So I enabled/disabled OverlayPlugin a few times with restart in between. Then did the same thing again with TTS over discord voice. Seems it freezes right away there's no error log I could see.

Application-Start 2019-07-31T08:53:41 (v3.4.0 Release: 260 | CLR v4.0.30319.42000 | OS Microsoft Windows NT 10.0.17134.0) C6 2019-07-31T08:53:41 - Entering InitACT 2019-07-31T08:53:42 - Entering LoadNewSettings 2019-07-31T08:53:42 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\ACT_Trigger\ACT_DiscordTriggers.dll 2019-07-31T08:53:42 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\ACT_Trigger\ACT_DiscordTriggers.dll 2019-07-31T08:53:42 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\OverlayPlugin\OverlayPlugin.dll 2019-07-31T08:53:42 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\OverlayPlugin\OverlayPlugin.dll 2019-07-31T08:53:43 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\FFXIV_ACT_Plugin.dll 2019-07-31T08:53:43 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\FFXIV_ACT_Plugin.dll 2019-07-31T08:53:43 - LogFileChanged: C:\Users\User\AppData\Roaming\Advanced Combat Tracker\FFXIVLogs\Network_20190731.log - 2019-07-31T08:53:43 - 2019-07-31T08:53:43 - 0 2019-07-31T08:53:43 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\ACT_WebSocket\ACTWebSocket.dll 2019-07-31T08:53:43 - Exiting LoadNewSettings 2019-07-31T08:53:43 - LogFileChanged: C:\Users\User\AppData\Roaming\Advanced Combat Tracker\FFXIVLogs\Network_20190731.log - 2019-07-31T08:53:43 - 2019-07-31T08:53:43 - 0 2019-07-31T08:53:44 - Checking for program updates 2019-07-31T08:53:44 - Exiting InitACT: 2046.85 Application-Close 2019-07-31T08:54:08 2019-07-31T08:54:08 - Entering SaveNewSettings 2019-07-31T08:54:08 - Exiting SaveNewSettings: 76 Application-Start 2019-07-31T08:54:11 (v3.4.0 Release: 260 | CLR v4.0.30319.42000 | OS Microsoft Windows NT 10.0.17134.0) 9B 2019-07-31T08:54:12 - Entering InitACT 2019-07-31T08:54:12 - Entering LoadNewSettings 2019-07-31T08:54:12 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\ACT_Trigger\ACT_DiscordTriggers.dll 2019-07-31T08:54:12 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\ACT_Trigger\ACT_DiscordTriggers.dll 2019-07-31T08:54:13 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\OverlayPlugin\OverlayPlugin.dll 2019-07-31T08:54:13 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\FFXIV_ACT_Plugin.dll 2019-07-31T08:54:13 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\FFXIV_ACT_Plugin.dll 2019-07-31T08:54:13 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\ACT_WebSocket\ACTWebSocket.dll 2019-07-31T08:54:13 - Exiting LoadNewSettings 2019-07-31T08:54:13 - LogFileChanged: C:\Users\User\AppData\Roaming\Advanced Combat Tracker\FFXIVLogs\Network_20190731.log - 2019-07-31T08:53:43 - 2019-07-31T08:54:08 - 579 2019-07-31T08:54:13 - Checking for program updates 2019-07-31T08:54:13 - Exiting InitACT: 827.93 2019-07-31T08:55:36 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\OverlayPlugin\OverlayPlugin.dll Application-Close 2019-07-31T08:55:42 2019-07-31T08:55:42 - Entering SaveNewSettings 2019-07-31T08:55:42 - Exiting SaveNewSettings: 87 Application-Start 2019-07-31T08:55:44 (v3.4.0 Release: 260 | CLR v4.0.30319.42000 | OS Microsoft Windows NT 10.0.17134.0) A9 2019-07-31T08:55:45 - Entering InitACT 2019-07-31T08:55:45 - Entering LoadNewSettings 2019-07-31T08:55:45 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\ACT_Trigger\ACT_DiscordTriggers.dll 2019-07-31T08:55:45 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\ACT_Trigger\ACT_DiscordTriggers.dll 2019-07-31T08:55:45 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\OverlayPlugin\OverlayPlugin.dll 2019-07-31T08:55:45 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\OverlayPlugin\OverlayPlugin.dll 2019-07-31T08:55:46 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\FFXIV_ACT_Plugin.dll 2019-07-31T08:55:46 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\FFXIV_ACT_Plugin.dll 2019-07-31T08:55:46 - Config loading plugin from: C:\Program Files (x86)\Advanced Combat Tracker\ACT_WebSocket\ACTWebSocket.dll 2019-07-31T08:55:46 - Exiting LoadNewSettings 2019-07-31T08:55:46 - LogFileChanged: C:\Users\User\AppData\Roaming\Advanced Combat Tracker\FFXIVLogs\Network_20190731.log - 2019-07-31T08:53:43 - 2019-07-31T08:55:42 - 1158 2019-07-31T08:55:46 - Checking for program updates 2019-07-31T08:55:46 - Exiting InitACT: 1029.36 2019-07-31T08:58:23 - PluginDownload=73; MemCache=False; CacheUsed=False; Application-Close 2019-07-31T08:58:27 2019-07-31T08:58:27 - Entering SaveNewSettings 2019-07-31T08:58:27 - Exiting SaveNewSettings: 108 2019-07-31T08:58:27 - Enabling plugin: C:\Program Files (x86)\Advanced Combat Tracker\FFXIV_ACT_Plugin.dll

Makar8000 commented 5 years ago

One other thing you can try: I've heard of some users having issues with other plugins when the plugin is being loaded from the Program Files folder (due to some kind of permissions issue even when running as admin). Can you try moving the plugin to the APPDATA folder? For you that would probably be C:\Users\User\AppData\Roaming\Advanced Combat Tracker\Plugins.

masamune9144 commented 5 years ago

has any one found a fix for this yet i have done every thing on here and still no joy

Makar8000 commented 5 years ago

For those that are having this issue, could you try running this old version to see if the issue still persists? https://github.com/Makar8000/ACT-Discord-Triggers/releases/tag/v1.0.1.0

You will still need to make sure not to have more than one plugin loaded and that it is at the top of the list in ACT.

Makar8000 commented 5 years ago

Another trouble shooting step I would like for you to try:

  1. Make sure you have the latest version of ACT (released earlier today / last night)
  2. Start ACT. Go to Options -> Sound Settings. You should see 3 radio buttons related to "Use WMP API Sound" or "No internal sound". When you start ACT, "No internal sound" should not be selected.
  3. In the discord plugin tab, make the bot join a channel.
  4. Go back to the sound settings in Step 2. "No internal sound" should be selected. If it is not selected then there is an issue with override ACT's sound when entering a voice channel.
YourFutureHusband commented 5 years ago

following all your steps above, the internal sound options is always NOT selected when entering a voice channel

Makar8000 commented 5 years ago

Okay, that helps. I will try to make a debug build for you after I get off work today. Can you post what is in the Discord Plugin Log after joining a channel? Seems something is going wrong at that point and the crash is just a side affect of the channel join not working correctly. Also, does the crash happen for playing files as well?

YourFutureHusband commented 5 years ago

Where exactly can I find the discord plugin log you are talking about? In my case act completely froze after having the bot join a channel (no files or triggers were playing - i just had it connected the whole day on a channel doing nothing and suddenly act froze) + the sound option bug I mentioned above

Makar8000 commented 5 years ago

It's the log that is visible on the Discord Triggers plugin tab in ACT (near the bottom). If you don't mind, try restarting ACT, making the bot join a channel, and then screenshot or copy the log messages (assuming the freeze isn't immediate after joining a channel).

YourFutureHusband commented 5 years ago

screenshot (edited the screenshot after joining the channel)

Screenshot from Gyazo

Makar8000 commented 5 years ago

Okay, Can you try with this build? http://up.makar.pw/Oh6RUCr8.rar

PyrZern commented 5 years ago

Okay, Can you try with this build? http://up.makar.pw/Oh6RUCr8.rar

ACT still crashes upon playing TTS in discord voice with this new build (and ACT updated to latest version).

Makar8000 commented 5 years ago

After the crash, do you see anything in Windows Event View, Application Logs for ACT? https://www.cyberlink.com/support/faq-content.do?id=10449

PyrZern commented 5 years ago

Event Viewer Log Error image

Makar8000 commented 5 years ago

Weird that the faulting module is a DLL in the OverlayPlugin folder. Are there other errors/information in that event viewer window that may be helpful? I know you said you tried disabling OverlayPlugin already, but can you also try disabling it, moving the OverlayPlugin folder somewhere else (preferably AppData), then restarting ACT? Maybe the error will be different when OverlayPlugin is for sure not present. (As a side note, it is recommended not to include any plugins in the Program Files folder due to permission issues even when running as admin).

Sorry for asking you to do so much testing, but since I can not reproduce the error myself this is the only help I can get 🙂

SolarMisae commented 5 years ago

So I have this issue as well, and it persists in older versions. I don't know if it's the same bug, but it ONLY happens with my unique Ivona TTS voice. If I swap it to Win10 David or Zira, play one trigger with that voice, then switch back to my Ivona TTS voice it's fine; however if I just use my Ivona voice first without playing a trigger with David or Zira it freezes. It's very odd.

Makar8000 commented 5 years ago

@SolarMisae Thanks for the info. Could you maybe provide me a link to install this TTS voice you use so I can test it locally?

@PyrZern Can you confirm if you use any TTS engines that are not the standard David or Zira?

SolarMisae commented 5 years ago

It's a paid ivona voice, but there is a 30 day trial on this site: https://harposoftware.com/en/english-uk/141-emma-british-english-voice.html

Thanks for the response! Love this plugin as does my group. :)

PyrZern commented 5 years ago

I'm not using any extra TTS here, only standard David.

Let me recap things we have done so far...

ayezona commented 5 years ago

yea im getting something similar as well saying that 2 of the .dll are system badimageformat libsodium.dll/opus.dll I 9/13/2019 4:20:59 AM: Info: InitPlugin: PluginDirectory = C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\ACT_DiscordTriggers.dll 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\Discord.Net.Core.dll 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\Discord.Net.Rest.dll 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\Discord.Net.WebSocket.dll 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\DiscordAPI.dll 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\libsodium.dll 9/13/2019 4:20:59 AM: Error: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\libsodium.dll: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\libsodium.dll' or one of its dependencies. The module was expected to contain an assembly manifest. File name: 'file:///C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\libsodium.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at RainbowMage.OverlayPlugin.PluginMain.LoadAddons()

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\NAudio.dll 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\Newtonsoft.Json.dll 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\opus.dll 9/13/2019 4:20:59 AM: Error: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\opus.dll: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\opus.dll' or one of its dependencies. The module was expected to contain an assembly manifest. File name: 'file:///C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\opus.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at RainbowMage.OverlayPlugin.PluginMain.LoadAddons()

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\System.Collections.Immutable.dll 9/13/2019 4:20:59 AM: Info: LoadAddons: C:\Users\young\OneDrive\Desktop\Advanced Combat Tracker\addons\System.Interactive.Async.dll 9/13/2019 4:21:00 AM: Info: InitPlugin: Initialized.

Coggi commented 5 years ago

Hi, I do have the same problem as SolarMisae with the Ivona voice.

It's strange cause it's started doing this since a couple of weeks.

Anyway the workaround of using one of the default TTS before the IVONA voice seems to fix it. What is strange is that this needs to be done even for playing .wav files and not only TTS.

Other random infos : If I trigger something in-game the playing gets logged on the discord plugin log page (Like : "Playing audio ecc ec") but nothing gets actually played. If I use the play button from the ACT page, ACT freezes.

If needed I can help with the troubleshooting

Makar8000 commented 5 years ago

@ayezona can you verify that the 2 dlls that are saying bad image format are not blocked?

DanteMccloud commented 4 years ago

Is there a fix for this yet? I'm having the issue too, all voice modules work fine with triggers until it joins Discord then it stops audio, and if you try to use a "custom trigger" it just freezes.

I can periodically fix it but only temporairly by closing out discord and ACT then getting a new token for the discord bot and basically redoing it and it'll work for the night then break again later on...

Can confirm the issue is NOT related to other plugins as with everything disabled this still happens when you just test a TTS trigger manually.

DanteMccloud commented 4 years ago

I fully redid the trigger bot and it doesn't work at all anymore it seems :(

Makar8000 commented 4 years ago

@DanteMccloud Please share your log, a screenshot of your plugin listing tab, a screenshot of your ACT folder, and a screenshot of the folder the ACT-Discord-Triggers plugin is.

DanteMccloud commented 4 years ago

@Makar8000 Network_2055_20200308.log Capture3 Capture1 Capture2 Capture4

DanteMccloud commented 4 years ago

@Makar8000 I tried several triggers and no audio while it was in discord, works fine outside discord. then when I tried to manually play a trigger from teh "custom triggers" tab it froze and had to force quit ACT. the log above is from when I tried this. If there is a different log other than that one that you need let me know cause I don't see any useful info in that one haha.

SolarMisae commented 4 years ago

This issue is still a thing for me. Also, it was advised to move the plugin to the top of the list when you have a blank channel list (which I get occasionally), but doing this actually breaks not just the plugin itself but it breaks overlayplugin and cactbot as well.

DanteMccloud commented 4 years ago

I fixed it btw, removed all traces of the bot and DLL files. Made a new Bot on Discord app devs site removed all traces and fully cleaned every sign of the plugin. now it's working again. idk what the cause was.

Makar8000 commented 4 years ago

@SolarMisae that advice is old. The current guide / faq says it should be below ngld's overlayplugin.

DanteMccloud commented 4 years ago

@Makar8000 it lasted all of 1 day then auto broke again. Any idea what is causing these? It's really becoming a problem having to troubleshoot it every week.

DanteMccloud commented 4 years ago

@Makar8000 any ideas with the info give? haven't heard anything back yet. Am I doing something wrong, does the trigger plugin need an update for new discord/ACT comparability? Are the Discord Bots getting blacklisted due to the DLL being used or something?

DanteMccloud commented 4 years ago

@Makar8000 any progress on this? Been waiting like 2 weeks for a response...

Makar8000 commented 4 years ago

@Makar8000 any progress on this? Been waiting like 2 weeks for a response...

Sorry, but I don't really have the time / motivation to debug your issue at the moment (due to work & games outside of FFXIV). The only thing I can suggest is to make sure you have a clean install (use AppData instead of Program Files), unblock all DLLs, make sure you have the required software, and try switching voices.

Makar8000 commented 4 years ago

@DanteMccloud can you try using the latest version?

SolarMisae commented 4 years ago

I can confirm the freezing issue still persists in the latest version when using non-default TTS voices such as Ivona voices. It's not a problem if you're just using David or Zira, but my Ivona Emma still freezes the program if I don't play one trigger using David/Zira first.

ChaosLegionaire commented 4 years ago

Am using a CereProc voice and have had this issue too. Have to test with Windows default before using 3rd party.

moskoverk commented 3 years ago

@Makar8000 any ideas with the info give? haven't heard anything back yet. Am I doing something wrong, does the trigger plugin need an update for new discord/ACT comparability? Are the Discord Bots getting blacklisted due to the DLL being used or something? image Try this order of plugins. Overlay 1st Cactbot or trigonometry 2nd/3rd FFXIV them at the bottom ACT DiscordTriggers

Makar8000 commented 1 year ago

I think third party voice might just not be compatibility (maybe due to it being a different format). So I am going to change the scope of this plugin to first-party voices only.

Also, looking back on this issue, it looks like some people had their plugins in the wrong folder (never put plugins in Program Files). Maybe that could contribute to the issue but I have my doubts.

Regardless, I will be closing this issue since I have no plans currently for expanding support or adding features, and I am mostly putting this plugin in "maintenance only" mode due to lack for time/motivation (I don't personally use ACT often)