rcmaehl / MSEdgeRedirect

A Tool to Redirect News, Search, Widgets, Weather and More to Your Default Browser
https://MSEdgeRedirect.com
GNU Lesser General Public License v3.0
3.93k stars 92 forks source link

MSEdgeRedirect terminates UWP processes on first launch. #395

Open GalaxinTM opened 4 months ago

GalaxinTM commented 4 months ago

Preflight Checklist

Install Type

Manual Update

Install Mode

Service Mode

Steps to reproduce

This isn't a bug report about the functionality of MSEdgeRedirect, but more of an odd bug I've noticed when using this program. Whenever I launch my computer, I have a few apps set to run at startup, and some of them get terminated shortly after being launched. I launched MSEdgeRedirect manually while writing this post, which terminated some processes.

Programs that are affected:

I'm running version 0.7.5.3 in Service Mode.

✔️ Expected Behavior

MSEdgeRedirect will start with other start-up programs with no issues.

❌ Actual Behavior

Some processes get terminated shortly after MSEdgeRedirect's process is started.

Microsoft Windows version

23H2 Build 22631.3155

Other Software

ShareX 15.0 Windows Terminal 1.19.10573.0 EarTrumpet 2.3.0.0

riverar commented 4 months ago

EarTrumpet dev here, can't reproduce this here. Do you have any of these selected?

image

rcmaehl commented 4 months ago

EarTrumpet dev here, can't reproduce this here. Do you have any of these selected?

-snip-

Not sure how they have the processes running at startup but they're likely spawning via SIHost and that's likely the issue. It's an issue of a race condition that I probably wouldn't have if I wasn't using an interpreted language.

One day I'll figure out how exactly a C# app should have it's files laid out, how to make a proper csproj file, and the whole shebang that goes with C# coding that isn't coding itself and most if not all of service mode's issues will go away.

Regardless 334780c seems to work. I'll have to test the patch on a slower system for its reliability, and see if it handles anything unsafely.

GalaxinTM commented 4 months ago

EarTrumpet dev here, can't reproduce this here. Do you have any of these selected?

-image1-

I currently have these options selected. image

Not sure how they have the processes running at startup but they're likely spawning via SIHost and that's likely the issue.

The same issue happens as well when I launch MSEdgeRedirect manually. It seems like it doesn't have anything to do with the start-up process. Upon further analysis on trying to reproduce this bug, I've found that any UWP program will get terminated if MSEdgeRedirect launches for the first time. Once MSEdgeRedirect launches for the first time, it terminates all UWP programs present, and other subsequent launches of MSEdgeRedirect won't terminate UWP programs.

Below I've attached a video of said issue happening, and a screenshot of my Task Manager's start-up list.

image

https://github.com/rcmaehl/MSEdgeRedirect/assets/50661916/5fa14a07-90cb-44e5-9800-426205031d02

rcmaehl commented 4 months ago

If you could, launch ProcessExplorer instead of ProcessHacker and ensure it's in Treeview

image

GalaxinTM commented 4 months ago

I'm able to provide both before and after snapshots of ProcessExplorer (same setup, didn't change anything) I noticed that the entire sihost.exe tree got terminated with its child processes. Secure System.txt Secure System_old.txt