JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.42k stars 2.39k forks source link

Cause Win10 Dev 21322 green screen(Attach dump log) #464

Closed DustinWin closed 3 years ago

DustinWin commented 3 years ago

Prerequisites

Description

After opening PowerShell and loading oh-my-posh, the computer will have a green screen.

Environment

Steps to Reproduce

  1. Install Windows 10 Dev 21322;
  2. Install Git(v2.30.1);
  3. Run PowerShell as an administrator, and run the following commands in sequence: Set-ExecutionPolicy RemoteSigned Install-Module posh-git Install-Module oh-my-posh
  4. Run the following commands again in sequence Import-Module posh-git Import-Module oh-my-posh Set-PoshPrompt -Theme PowerLine
  5. Create a new "WindowsPowerShell" folder in the "C:\Users\ [Your name] \Documents" directory, and create a new text document. Edit the following content: Import-Module posh-git Import-Module oh-my-posh Set-PoshPrompt -Theme PowerLine Save as "Microsoft.PowerShell_profile.ps1".
  6. Restart the computer, run PowerShell again as an administrator.

Expected behavior: Oh-my-posh can be loaded normally, the computer will not have a green screen.

Actual behavior: The computer will have a green screen.

Attach dump log: dump log.zip

JanDeDobbeleer commented 3 years ago

@DustinWin what's a green screen? Also, the dump directs to a file on localhost (at least in the mobile app).

DustinWin commented 3 years ago

@DustinWin what's a green screen? Also, the dump directs to a file on localhost (at least in the mobile app). Thank you for your reply. My problem has been solved. This is a permission problem. You need to grant local user permissions in PowerShell.

JanDeDobbeleer commented 3 years ago

@DustinWin I'm still curious about the green screen though.

DustinWin commented 3 years ago

@DustinWin I'm still curious about the green screen though.

It means "Blue Screen of Death". And I found that this is not a green screen caused by permission issues. The specific reason can only be viewed in the dump log.

DustinWin commented 3 years ago

dump log.zip @JanDeDobbeleer Sorry, the log is attached here. Oh-My-Posh v2 is normal, but v3 will cause the system to green screen.

DustinWin commented 3 years ago

@JanDeDobbeleer I analyzed the dump log a little bit. Possible causes of green screen: hardware_ram ( PAGE_NOT_ZERO ) Analysis: UNEXPECTED_KERNEL_MODE_TRAP_M (1000007f) This means a trap occurred in kernel mode, and it's a trap of a kind that the kernel isn't allowed to have/catch (bound trap) or that is always instant death (double fault). The first number in the bugcheck params is the number of the trap (8 = double fault, etc) Consult an Intel x86 family manual to learn more about what these traps are. Here is a portion of those codes: If kv shows a taskGate use .tss on the part before the colon, then kv. Else if kv shows a trapframe use .trap on that value Else .trap on the appropriate frame will show where the trap was taken (on x86, this will be the ebp that goes with the procedure KiTrap) Endif kb will then show the corrected stack. Arguments: Arg1: 0000000000000008, EXCEPTION_DOUBLE_FAULT Arg2: ffffc201691efe70 Arg3: ffffdf888d977000 Arg4: fffff8072ec83125

LAST_CONTROL_TRANSFER: from 0000000000000000 to fffff8072ec83125

BUGCHECK_STR: 0x7f_8

STACK_TEXT:
ffffdf888d977000 0000000000000000 : fffff8072ec82a8b fffff8072ea00000 fffff8072ec80e18 ffffdf888d9775b0 : nt+0x283125

Hope to help you!

JanDeDobbeleer commented 3 years ago

@DustinWin can you try a two step approach? Remove the root segment and see if that resolves it, if that doesn't work, remove the session segment and see if that resolves it. If you would be so kind to let me know which one is troublesome, greatly appreciated. What I can see is that fetching your user information causes a panic (which is more a Windows bug than oh-my-posh).

DustinWin commented 3 years ago

@DustinWin can you try a two step approach? Remove the root segment and see if that resolves it, if that doesn't work, remove the session segment and see if that resolves it. If you would be so kind to let me know which one is troublesome, greatly appreciated. What I can see is that fetching your user information causes a panic (which is more a Windows bug than oh-my-posh).

@JanDeDobbeleer Sorry to inform again. I newly installed Dev 21327 today, but the green screen still occurs. After I opened VS Code, the green screen appeared, and its dump log was exactly the same as before. I found the problem: VS Code enabled the "PowerShell Preview" terminal. In other words, it is a green screen event caused by PowerShell Preview.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.