winleafs / Winleafs

Winleafs: Windows application for Nanoleaf lights
GNU General Public License v3.0
85 stars 9 forks source link

Winleafs crashes when starting screen mirroring #124

Closed mnl1121 closed 3 years ago

mnl1121 commented 4 years ago

Describe the bug Exactly as title says, I installed version 1.04, paired panels successfully, went straight into options and switched screen mirroring to "Screen Mirror Stretch", then turned on Screen Mirror in home screen and WinLeafs crashes every time. I uninstalled and installed 1.05 and does the same behavior.

To Reproduce Steps to reproduce the behavior:

  1. See description above.

Logs %appdata%\Winleafs\logs See attached log.log

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

StijnOostdam commented 4 years ago

Hey, after reading the logs, it looks like your panels are unavailable on your network or the request fails for another reason but the logs do not show it. Which version of the Aurora software are you running (as displayed in the nanoleaf app)? Maybe Nanoleaf changed something without notifying developers.

Either way, I also updated the 1.0.5 pre-release installer with more logs, to help clarify when Winleafs crashes. Could you try to reproduce the error with the new installer and then give us the new logs?

mnl1121 commented 4 years ago

Sure can, see below, doesn't seem to say much. This time screen mirroring successfully started for about 3 seconds. I started moving the WinLeafs app around the screen and the colors changed for a couple seconds and then it crashed. Originally once I started screen mirroring it crashed.

Firmware is the latest 3.3.4

log.log

StijnOostdam commented 4 years ago

The logs looks good to me as well. As it turns out, I did not write error handling for screen mirror, that is why the application crashes and there are no logs. So I added error handling and also performed another small fix.

Could you try the updated v1.0.5 installer and see what happens? Third time's the charm, I hope.

StijnOostdam commented 4 years ago

Hey, did it work for you?

mnl1121 commented 4 years ago

Sorry been busy with work lately. Haven't had a chance to try it yet.

StijnOostdam commented 4 years ago

Let me know if it works for you, otherwise I will close the bug

ghost commented 4 years ago

I am also having the same problem. I have the latest updates installed

StijnOostdam commented 4 years ago

Hey, @NanoleafsRtight, do you have any logs to help us? They can be found in %appdata%/Winleafs

mike10010100 commented 3 years ago

I know this thread is a bit dead, but here are some logs from my machine with the same issue. log.log

mike10010100 commented 3 years ago

Testing it out a little bit further, and it seems like it only crashes this way when trying to screen mirror the second screen. My primary screen functions as normal.

StijnOostdam commented 3 years ago

@mike10010100 Thanks for the update. That could explain why we can't reproduce the issue. Could you share your monitor details? How the dispalys are displayed/detected in Winleafs and how they are displayed in Windows settings. Are there any differences?

livejamie commented 3 years ago

Happening to me as well but only on my second screen.

log.log

StijnOostdam commented 3 years ago

Hey @livejamie thanks for the logs. They do not show any crashes though. As stated above, could you share your monitor details? How the dispalys are displayed/detected in Winleafs and how they are displayed in Windows settings. Are there any differences?

livejamie commented 3 years ago

The monitors are detected correctly.

Monitor 1: TCL 55S405 Monitor 2 (Primary): Dell AW3418DW

If I select Monitor 1 then Winleafs crashes. If Monitor 2 is selected it works as expected.

Please let me know if there's anything else I can provide or do to troubleshoot.

jazzchng commented 3 years ago

I managed to solve mine when I selected Monitor 2 as well. Also here to provide anything that can help :)

StijnOostdam commented 3 years ago

@livejamie @jazzchng What happens if you set your other monitor as primary and then try to run screen mirror on that? Could you also provide a screenshot of the way the monitors are displayed in Winleafs settings?

livejamie commented 3 years ago

Here are my settings side-by-side currently. The bottom monitor is my primary monitor but I want mirroring to happen on the secondary top monitor.

image

If I set the top monitor as the primary the crash occurs on the bottom monitor if I select it.

So it's only occurring on whatever monitor is not set as primary.

StijnOostdam commented 3 years ago

@livejamie Thank you. I tried to replicate your situation and also got the crash. This means I can now add logging and do some testing to see why the crash occurs. I will start working on a fix when I have some free time. Do not hesitate to remind me if it takes too long.

jazzchng commented 3 years ago

Here's mine if it'd be any help in other possible variations :)

Winleafs Screen mirror Crash

Monitor 3 is my TV(HDMI) which is currently inactive, and will be active if my DisplayPort Monitors are turned off. Same for me it crashes only when I am not mirroring my main monitor.

StijnOostdam commented 3 years ago

@jazzchng @livejamie @mnl1121 I just released a new version that should fix your issue. Download it at https://github.com/winleafs/Winleafs/releases.

Please let me know if this fixes this bug

livejamie commented 3 years ago

Same behavior on my end, crash still occurs.

StijnOostdam commented 3 years ago

@livejamie Thanks for the quick reply, too bad to hear. I discovered that logging somehow was turned off and I made another improved to the memory management. I updated the installer for v1.1.6. Could you try to manually remove Winleafs from your PC, then download the 1.1.6 installer again (https://github.com/winleafs/Winleafs/releases/tag/v1.1.6) and install it? Then run screen mirror and there should be a log in AppData\Roaming\Winleafs\logs\log.log that contains something like:

Unexpected error for screen mirror with algorithm...

Could you give me the logs around that line?

livejamie commented 3 years ago

Doing a clean reinstall fixes the crash but I'm still getting some weirdness with how it works.

I tried to put together a video showcasing what happens:

https://www.youtube.com/watch?v=Ma8oeprRyY0&feature=youtu.be

log.log

Maybe Winleafs is confused by my vertical layout?

StijnOostdam commented 3 years ago

@livejamie Big thanks for the video! One thing I noted is that you did not restart after changing the screen mirror settings, which is required (as you can read in the screen mirror settings tab, but this probably means that text should be more clear). Another thing is that the behavior in the video corresponds to error logs in your log file. I will look into that.

StijnOostdam commented 3 years ago

@livejamie Turns out I implemented a fix for the Stretch and Fit algorithms, but not for the Ambilight algorithm you are using. I have updated the installer again, so please re-download it at https://github.com/winleafs/Winleafs/releases/tag/v1.1.6 and make sure to manually uninstall Winleafs before installing the new installer. Let me know if this fixes the issue

livejamie commented 3 years ago

Everything seems to be working as expected now thank you.

StijnOostdam commented 3 years ago

Great to hear! I am glad it is resolved