Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Thurbo
14 discussion posts
I have added sound effects for most events on my computer, partially for flair and partially so I notice when something happens on my desktop while I'm VR (such as a window opening).

This is the very straightforward script I use for each of the rules (Open, Close, Minimize, Maximize Window):

Code

using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Trigger target when run by a Trigger rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // your code goes here
        BFS.Audio.PlayWAV("C:\\Users\\Thurbo\\Documents\\Sounds\\Fluent and Xbox SFX\\Close Window.wav");
        return;
    }
}


This works as expected on every rule except for the close window trigger where instead of playing the sound once, it will instead spam the sound so often it slows the PC down to a crawl. You can watch the system tray get spammed with DisplayFusion sound icons and the sound repeat itself about 100 times per second, overlapping itself.

I don't know anything about C# and coding in general. I have no idea why this is happening. Any help is much appreciated!
Jan 3, 2021 (modified Jan 3, 2021)  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Would you be able to send a debug log for this issue?

  • On the DisplayFusion Settings > Troubleshooting tab, change the Logging drop-down to "L1: Log Minimal" and click Apply
  • Reproduce the issue and note the time so we'll know where to check in the log file
  • Click the "Export Info to File" button on the Settings > Troubleshooting tab
  • Reply with the file attached
  • Disable debug logging after sending the log

Thanks!
Jan 6, 2021  • #2
User Image
Thurbo
14 discussion posts
What I did is activate the task, then close an explorer window to reproduce the issue. I closed it exactly at 00:27:02. The function is called "Close Window SFX"
• Attachment [protected]: DisplayFusionDebugInfo.zip [509,334 bytes]
Jan 7, 2021  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! Sorry for the delay on this, we'll check it out and do some further testing and keep you posted on what we find out :)
Jan 12, 2021  • #4
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Just a quick update, I can see in the log where the Trigger is firing many times after you close the window. I'm working on reproducing the issue here so that we can troubleshoot further.

Thanks!
Jan 13, 2021  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, we think we have an idea on how to resolve this. We'll let you know when there's a new beta out with the attempted fix :)

Thanks!
Jan 15, 2021  • #6
Keith Lammers (BFS)'s profile on WallpaperFusion.com
We've released 9.7.2 Beta 4 last week. Could you give it a try and let us know how it works out?

Thanks!
Jan 27, 2021  • #7
User Image
Thurbo
14 discussion posts
Hi, I installed version 9.7.2 Beta 4 but unfortunately the issue is not resolved.
Feb 2, 2021  • #8
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, would you be able to send over a new debug build from Beta 4?
Feb 2, 2021  • #9
User Image
Thurbo
14 discussion posts
Here's the debug info. Issue reproduction at 04:04:50, give or take.
• Attachment [protected]: DisplayFusionDebugInfo.zip [275,190 bytes]
Feb 6, 2021  • #10
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! Did this happen when closing Firefox? And did the Trigger run twice?
Feb 10, 2021  • #11
User Image
Thurbo
14 discussion posts
Strange to see Firefox as I didn't do anything with it at the relevant point in time. To reproduce the issue, I enabled the trigger rule, saved, and closed an Explorer window, which should play the sound once, but instead spams it ad infinitum. I let it go for a bit, then disabled the rule and saved again to stop the system slowdown and sound file spam.

So I took a look at the debug file myself and the first time I see "Close Window SFX" is at 04:05:53. I said 04:04:50 because that was the time displayed in Windows when I enabled the rule and closed the Explorer window, so I'm not sure if there's a mismatch with my Windows clock and DF's logging, or if logging took a while due to the system slowdown.
Feb 11, 2021  • #12
Keith Lammers (BFS)'s profile on WallpaperFusion.com
My bad, I think I may have had the wrong log file open when I last looked!

I can see where it's running a ton of times here. Can you attach a backup of your DisplayFusion settings (Settings > Options > Export) so that I can do some further testing here?
Feb 12, 2021  • #13
User Image
Thurbo
14 discussion posts
Certainly, here it is.
• Attachment [protected]: DisplayFusion Backup (2021-02-13 @ 22-19, 9.7.1.104, ALAM0, SettingsWindow).reg [1,260,100 bytes]
Feb 13, 2021  • #14
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! I'm a bit behind on my testing queue but I'm planning to give this a go early next week.
Feb 19, 2021  • #15
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I had a chance to test this out and was able to confirm the issue still. We're looking into it further and we'll keep you posted.

Thanks!
Feb 24, 2021  • #16
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

This issue should be fixed up in the latest beta, available here: https://www.displayfusion.com/Download/Beta. Please let me know if you still run into any trouble after updating.

Thanks!
Mar 17, 2021  • #17
User Image
Thurbo
14 discussion posts
Hi,

thanks for your response. I updated to beta 7 but unfortunately the issue is still the same.

Is it really not the code I use that's causing the problem?
Mar 17, 2021  • #18
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I don't think the script code itself is an issue, no, but let's try to confirm. Could you edit your script to run this line instead of playing a sound file:

BFS.General.LogText("Debug: Script Executed");


And then capture a new debug log (only open then close File Explorer once while debug logging is enabled) and send it over? I'd like to see if that line shows up multiple times as well.
Mar 18, 2021  • #19
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)