github / GitPad

Notepad.exe as Git commit editor
MIT License
187 stars 69 forks source link

Gitpad.exe crashes hard when started #12

Closed kib closed 9 years ago

kib commented 11 years ago

Github crashes immediately after starting, drops this message to console:

Unhandled Exception: System.Exception: GetTokenInformation failed
   at Gitpad.Program.IsProcessElevated()
   at Gitpad.Program.Main(String[] args)

When trying to use github for windows and gitpad is evoked this happens in the git bash:

$ git rebase -i HEAD~2

Unhandled Exception: System.Exception: GetTokenInformation failed
   at Gitpad.Program.IsProcessElevated()
   at Gitpad.Program.Main(String[] args)
/libexec/git-core/git-rebase--interactive: line 212:  4620 Signal 67               gitpad "$@"
Could not execute editor

Troubleshooting steps taken: My own user account has full local administrator rights on computer. I started a command prompt as domain administrator (runas /user:domain\admin cmd.exe), started the gitpad.exe I downloaded here manually and same message was dropped.

kib commented 11 years ago

Seems to be the exact same issue as #7 I am running a virtual machine with WIndows XP SP3, local administrator rights and not many policies. I am able to test or troubleshoot.

niik commented 11 years ago

@kibje I actually think that this is fixed and you're still on an old version. I tried to repro this on a Windows XP SP3 VM using the latest build and I was unsuccessful.

The binary linked to from the readme is unfortunately not up to date and still contains the problematic code and since the downloads feature is deprecated we'll have to figure out a new way of distributing new binaries.

Even though GitHub for Windows ships GitPad with its automatic updates, it's unfortunately not automatically updated due to the nature of how GitPad installs itself. I'm hoping to fix that at some point but currently you have two choices. Either locate GitPad.exe in the same folder as (the current) GitHub.exe or download the source from here and build it yourself. Once you have an executable; just run it once and hit ok on the dialog and it will overwrite the currently installed version.

Please let me if it works out!

srinathrajappa commented 9 years ago

Faulting application name: GitHub.exe, version: 2.7.0.24, time stamp: 0x54b6e999 Faulting module name: KERNELBASE.dll, version: 6.2.9200.16864, time stamp: 0x531d2be6 Exception code: 0xe0434352 Fault offset: 0x00010f22 Faulting process id: 0x4f0 Faulting application start time: 0x01d03adac8709060 Faulting application path: C:\Users\Srinath\AppData\Local\Apps\2.0\W3GHEWLQ.YWO\4829OCV8.HYJ\gith..tion_317444273a93ac29_0002.0007_cc7bcd60c65d01d4\GitHub.exe Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll Report Id: 066577be-a6ce-11e4-bfbb-d98e1dcbb30f Faulting package full name: Faulting package-relative application ID:

niik commented 9 years ago

@srinathrajappa That crash dump is for GitHub for Windows, not GitPad. Please reach out to support@github.com and we'll be happy to troubleshoot it for you.

BrainSlugs83 commented 9 years ago

Not using GitHub for windows, so it might be a different bug -- but I've noticed that GitPad.exe does crash if you try to install it on a system that already has it. It just comes up with the windows crash dialog immediately.

shiftkey commented 9 years ago

Anything interesting in Event Viewer?

BrainSlugs83 commented 9 years ago

I'll take a look and see if I can repro again tomorrow (when I'm back at my work computer) now that my environment is more "normal", and I'll check the event log then and get back to you. :-)

BrainSlugs83 commented 9 years ago

Looks like this happens every time for me, very reproducible -- if you just run GitPad.exe twice (downloaded from https://github.com/blog/975-gitpad-write-your-commits-in-notepad, since the link in readme.md is broken), it fails with a System.UnauthorizedAccessException from mscorlib.dll.

"Additional Information: Access to the path 'C:\Users\MyUserName\AppData\Roaming\GitPad\GitPad.exe' is denied."

Perhaps a simple try/catch around the copy/install logic and then displaying a meaningful failure message to the user would be enough?

(The above information is not displayed in the crash window, instead you have to click Debug, and then choose Visual Studio, and Visual Studio then gives you the exception details.)

BrainSlugs83 commented 9 years ago

Note, this happens even if you run it as an administrator.

BrainSlugs83 commented 9 years ago

I'm thinking the stack trace above is probably a bit more useful, but you asked for it, so, from the event viewer, it appears that the "Windows Error Reporting" source logs an "Information" level event:


Fault bucket 94590851957, type 5 Event Name: CLR20r3 Response: Not available Cab Id: 0

Problem signature: P1: gitpad.exe P2: 1.3.0.0 P3: 4f79e0ee P4: mscorlib P5: 2.0.0.0 P6: 53a120d7 P7: 34ad P8: 1f7 P9: System.UnauthorizedAccess P10:

Attached files: C:\Users\MyUserName\AppData\Local\Temp\WER3DC2.tmp.WERInternalMetadata.xml

These files may be available here: C:\Users\MyUserName\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_gitpad.exe_fe9421c6c18378be429fa3ad51d22e44daa3df9e_00000000_00a37ea3

Analysis symbol: Rechecking for solution: 0 Report Id: 40208c8f-0ef5-11e5-82a7-54271ebdcaad Report Status: 0 Hashed bucket: 59120f0747e2e881847cb8549153ca51


From the Report.wer file (at the location specified above):


Version=1 EventType=CLR20r3 EventTime=130783618220319503 ReportType=2 Consent=1 UploadTime=130783618220944474 ReportIdentifier=40208c8f-0ef5-11e5-82a7-54271ebdcaad Response.BucketId=59120f0747e2e881847cb8549153ca51 Response.BucketTable=5 Response.LegacyBucketId=94590851957 Response.type=4 Sig[0].Name=Problem Signature 01 Sig[0].Value=gitpad.exe Sig[1].Name=Problem Signature 02 Sig[1].Value=1.3.0.0 Sig[2].Name=Problem Signature 03 Sig[2].Value=4f79e0ee Sig[3].Name=Problem Signature 04 Sig[3].Value=mscorlib Sig[4].Name=Problem Signature 05 Sig[4].Value=2.0.0.0 Sig[5].Name=Problem Signature 06 Sig[5].Value=53a120d7 Sig[6].Name=Problem Signature 07 Sig[6].Value=34ad Sig[7].Name=Problem Signature 08 Sig[7].Value=1f7 Sig[8].Name=Problem Signature 09 Sig[8].Value=System.UnauthorizedAccess DynamicSig[1].Name=OS Version DynamicSig[1].Value=6.3.9600.2.0.0.256.4 DynamicSig[2].Name=Locale ID DynamicSig[2].Value=1033 UI[2]=C:\Downloads\Gitpad.exe UI[3]=Gitpad has stopped working UI[4]=Windows can check online for a solution to the problem. UI[5]=Check online for a solution and close the program UI[6]=Check online for a solution later and close the program UI[7]=Close the program LoadedModule[0]=C:\Downloads\Gitpad.exe LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll LoadedModule[2]=C:\Windows\SYSTEM32\MSCOREE.DLL LoadedModule[3]=C:\Windows\system32\KERNEL32.dll LoadedModule[4]=C:\Windows\system32\KERNELBASE.dll LoadedModule[5]=C:\Windows\system32\apphelp.dll LoadedModule[6]=C:\Windows\system32\ADVAPI32.dll LoadedModule[7]=C:\Windows\system32\msvcrt.dll LoadedModule[8]=C:\Windows\SYSTEM32\sechost.dll LoadedModule[9]=C:\Windows\system32\RPCRT4.dll LoadedModule[10]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll LoadedModule[11]=C:\Windows\system32\SHLWAPI.dll LoadedModule[12]=C:\Windows\SYSTEM32\combase.dll LoadedModule[13]=C:\Windows\system32\USER32.dll LoadedModule[14]=C:\Windows\system32\GDI32.dll LoadedModule[15]=C:\Windows\system32\IMM32.DLL LoadedModule[16]=C:\Windows\system32\MSCTF.dll LoadedModule[17]=C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll LoadedModule[18]=C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.8428_none_88dcdb0b2fb19957\MSVCR80.dll LoadedModule[19]=C:\Windows\system32\shell32.dll LoadedModule[20]=C:\Windows\SYSTEM32\SHCORE.dll LoadedModule[21]=C:\Windows\SYSTEM32\profapi.dll LoadedModule[22]=C:\Windows\assembly\NativeImages_v2.0.50727_64\mscorlib\6227ee011c9930128c5ad76841ecf2ee\mscorlib.ni.dll LoadedModule[23]=C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorsec.dll LoadedModule[24]=C:\Windows\system32\WINTRUST.dll LoadedModule[25]=C:\Windows\system32\CRYPT32.dll LoadedModule[26]=C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9600.17415_none_34aa3313958e7a52\COMCTL32.dll LoadedModule[27]=C:\Windows\system32\MSASN1.dll LoadedModule[28]=C:\Windows\system32\CRYPTSP.dll LoadedModule[29]=C:\Windows\system32\rsaenh.dll LoadedModule[30]=C:\Windows\SYSTEM32\bcrypt.dll LoadedModule[31]=C:\Windows\SYSTEM32\CRYPTBASE.dll LoadedModule[32]=C:\Windows\SYSTEM32\bcryptPrimitives.dll LoadedModule[33]=C:\Windows\system32\imagehlp.dll LoadedModule[34]=C:\Windows\system32\ncrypt.dll LoadedModule[35]=C:\Windows\system32\NTASN1.dll LoadedModule[36]=C:\Windows\SYSTEM32\gpapi.dll LoadedModule[37]=C:\Windows\System32\cryptnet.dll LoadedModule[38]=C:\Windows\system32\WLDAP32.dll LoadedModule[39]=C:\Windows\SYSTEM32\IPHLPAPI.DLL LoadedModule[40]=C:\Windows\system32\NSI.dll LoadedModule[41]=C:\Windows\SYSTEM32\WINNSI.DLL LoadedModule[42]=C:\Windows\system32\ole32.dll LoadedModule[43]=C:\Windows\SYSTEM32\kernel.appcore.dll LoadedModule[44]=C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorjit.dll LoadedModule[45]=C:\Windows\assembly\NativeImages_v2.0.50727_64\System\eaa20bd3bf0cb4085563a53ce2344adc\System.ni.dll LoadedModule[46]=C:\Windows\assembly\NativeImages_v2.0.50727_64\System.Drawing\ca43a3085d56bbbeb9920035e37bab68\System.Drawing.ni.dll LoadedModule[47]=C:\Windows\assembly\NativeImages_v2.0.50727_64\System.Windows.Forms\bfc65bbcd57339e25ac320d50859e32d\System.Windows.Forms.ni.dll LoadedModule[48]=C:\Windows\system32\uxtheme.dll LoadedModule[49]=C:\Program Files (x86)\Dexpot\hooxpot64.dll LoadedModule[50]=C:\Windows\system32\dwmapi.dll LoadedModule[51]=C:\Windows\SYSTEM32\VERSION.dll State[0].Key=Transport.DoneStage1 State[0].Value=1 FriendlyEventName=Stopped working ConsentKey=CLR20r3 AppName=Gitpad AppPath=C:\Downloads\Gitpad.exe ReportDescription=Stopped working ApplicationIdentity=00000000000000000000000000000000

shiftkey commented 9 years ago

@kib just tried the same steps (non-elevated) and the thing didn't raise any errors (I was just prompted to confirm Notepad as my default text editor twice). Hrm. Windows 8.1, 64-bit.

BrainSlugs83 commented 9 years ago

Hmmm... it was from the version on the page I linked, or was it the latest version? (Maybe it's fixed in latest?)

I would give it a try from the version I linked to confirm that you can reproduce the failure in that version, then if you don't see the same failure in the latest version, you know that this has already been fixed.