NickeManarin / ScreenToGif

🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
http://www.screentogif.com
Microsoft Public License
23.04k stars 2.15k forks source link

[Bug] Can't launch app. #1312

Closed leozzyzheng closed 4 weeks ago

leozzyzheng commented 1 month ago

Describe the bug Application doesn't appear after launched, also not see it in task manager.

To Reproduce Steps to reproduce the behavior:

  1. Just double click exe to launch it.
  2. Nothing happens.

Expected behavior Application should show up.

Screenshots None

Desktop (please complete the following information):

Additional context Attachment is the log file I found. 24_05_31.txt

I can run application a few days ago, and I'm working on developing windows drivers for virtual box, so there might be many .net version installed on my machine, may be that's the root cause, but I'm not familiar with the .net environment, so I need a help, thanks!

pawlos commented 1 month ago

@leozzyzheng From the error log it seems that your settings are corrupted. You could try moving Settings.xaml file (or delete you don't care about it) so that the app won't find those on startup and create a new one. It should be located in the AppData\roaming\ScreenToGif folder.

leozzyzheng commented 1 month ago

@pawlos Thanks for the quick reply. I tried to remove Settings.xaml but still can't launch application, I'm going to build from source to debug it.

pawlos commented 1 month ago

@leozzyzheng do you have the log file from that run too? There are some local settings also - that could be the issue. I don't remember the location - maybe the app folder?

leozzyzheng commented 1 month ago

@pawlos Here is the log 24_05_31.txt

I can run application from visual studio, that's strange that I can't run the standalone one.

leozzyzheng commented 1 month ago

Is there any special steps to pack the standalone file? Providing the pack CLI would be much appreciated.

leozzyzheng commented 4 weeks ago

@pawlos I found the problem is caused by single file mode, will try to finger it out.

leozzyzheng commented 4 weeks ago

After debugging the dotnet, I think it's runtime mismatch, the problem is using the wrong libray(Baml2006) to load GUI, but I can't find why it use wrong host. Now I'm using no-self-contained version and everything works well, if I found the root cause someday, I will post here.