MSEdgeRedirect icon indicating copy to clipboard operation
MSEdgeRedirect copied to clipboard

MSEdgeRedirect terminates UWP processes on first launch.

Open GalaxinTM opened this issue 1 year ago • 5 comments

Preflight Checklist

  • [X] Running microsoft-edge:https://google.com redirects successfully
  • [ ] Microsoft Edge is selected in any "How do you want to open this?" box

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:

  • ShareX
  • EarTrumpet
  • Windows Terminal

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

GalaxinTM avatar Mar 02 '24 11:03 GalaxinTM

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

image

riverar avatar Mar 02 '24 20:03 riverar

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.

rcmaehl avatar Mar 03 '24 03:03 rcmaehl

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

GalaxinTM avatar Mar 03 '24 10:03 GalaxinTM

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

image

rcmaehl avatar Mar 03 '24 17:03 rcmaehl

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

GalaxinTM avatar Mar 04 '24 15:03 GalaxinTM