Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clink.prompt broken in Windows 10 Technical Preview #253

Closed
MartiUK opened this issue Oct 2, 2014 · 17 comments
Closed

clink.prompt broken in Windows 10 Technical Preview #253

MartiUK opened this issue Oct 2, 2014 · 17 comments

Comments

@MartiUK
Copy link

MartiUK commented Oct 2, 2014

Sorry if this counts as jumping the gun!

https://github.com/bliker/cmder/blob/master/config/prompt.lua
https://github.com/bliker/cmder/blob/master/config/git.lua

See cmderdev/cmder#279.

@mridgers
Copy link
Owner

Thanks! Guess it's time to fire up a VM.

@jprobichaud
Copy link

I have win10 64bit preview installed, if you need a tester, I'm in!

I'm also using clink within ConEmu as well, so I guess there is a lot to test :)

I'm often using msbuild, which tends to stresstest clink as it forks lots of cmd.exe processes in rapid succession, which used to trigger a bug in clink.

@mridgers
Copy link
Owner

A build that includes this fix is available here;

https://www.dropbox.com/sh/hqbrpkf0dpmmizq/AAD2F5WXQKD8mPkQeIeBULJGa/20141015_191f4b

@PxlBuzzard
Copy link

This fixes the issue on my Windows 10 machine, thank you @mridgers. :)

@jprobichaud
Copy link

I confirm that it works for me also!. Thanks for such a great tool and great turnaround time for bugfixes!

@Memphizzz
Copy link

The build that includes the fix does not work for me (Windows 8.1). Any Ideas?

My output:
Clink vDEV [git:191f4b] Copyright (c) 2014 Martin Ridgers
http://mridgers.github.io/clink

C:\Users\USER {git}
{lamb} clink
Clink v0.4.2 [git:1111eb] Copyright (c) 2014 Martin Ridgers
http://mridgers.github.io/clink

Usage: <verb_options>

Verbs:
inject Injects Clink into a process.
autorun Manage Clink's entry in cmd.exe's autorun.
set Adjust Clink's settings.
(' --help' for more details).

C:\Users\USER {git}
{lamb}

@mridgers
Copy link
Owner

Looks like Clink has not managed to install its hooks. Are you using something like BitDefender? Can you paste your clink.log file (found in c:\users[username]\appdata\local\clink) please?

@grigoryvp
Copy link

Sure! Thanks for response, clink is amazing tool!

C:\Users\eye\AppData\Local\clink>cat clink.log
do_inject():190 -- System: ver=6.2 0.0 arch=9 cpus=4 cpu_type=8664 page_size=4096
do_inject():195 -- Version: 0.4.2
do_inject():196 -- DLL: C:\Program Files (x86)\clink\0.4.2\clink_dll_x64.dll
do_inject():198 -- Parent pid: 4504
check_dll_version():50 -- DLL version: 00000004 000236dd
do_inject():268 -- Creating remote thread at 00007FFB0791E5B0 with parameter 000000B2705A0000
set_rl_readline_name():57 -- Setting rl_readline_name to 'cmd.exe'
on_dll_attach():150 -- Shell validation failed.

@mridgers
Copy link
Owner

What arguments were passed when starting cmd.exe? Does it have a "/c" in it somewhere?

@grigoryvp
Copy link

The log above is from starting cmd.exe from conemu via:

cmd /k %userprofile%\.conemurc.bat

While starting "cmd" standalone the error is different:

C:\Users\eye\AppData\Local\clink>more clink.log
do_inject():190 -- System: ver=6.2 0.0 arch=9 cpus=4 cpu_type=8664 page_size=4096
do_inject():195 -- Version: 0.4.2
do_inject():196 -- DLL: C:\Program Files (x86)\clink\0.4.2\clink_dll_x64.dll
do_inject():198 -- Parent pid: 2264
check_dll_version():50 -- DLL version: 00000004 000236dd
do_inject():268 -- Creating remote thread at 00007FFB0791E5B0 with parameter     000000586A890000
set_rl_readline_name():57 -- Setting rl_readline_name to 'cmd.exe'
hook_trap_veh():118 -- VEH hit - caller is 00007FF79B3BAE10.
hook_jmp():364 -- Attemping jump hook.
hook_jmp():365 -- Target is kernelbase.dll, ReadConsoleW @ 00007FFB050A08D0
hook_jmp_impl():277 -- Attempting to hook at 00007FFB050A08D0 with 00007FFAF2225880
hook_jmp_impl():346 -- Unable to match prolog 83485340
hook_jmp():371 -- Jump hook failed.
apply_hook_jmp():73 -- Unable to hook ReadConsoleW in kernelbase.dll
hook_trap_veh():123 -- Hook trap 00007FFAF2225C18 failed.

@mridgers
Copy link
Owner

0.4.2 doesn't support Windows 10. You need to use a newer build - see Dropbox link in an earlier comment in this issue.

@butlersrepos
Copy link

Any help would be greatly apprecated.

I recently came upon this issue while using the Win10 tech preview as well. I took your dropbox link and ran the EXE program only, should that have fixed it?

I'm using a fresh install of Cmder as well.

My cmder window task

cmd /k "%ConEmuDir%\..\init.bat"  -new_console:d:C:\

My clink.log

do_inject():190 -- System: ver=6.2 0.0 arch=9 cpus=4 cpu_type=8664 page_size=4096
do_inject():195 -- Version: 0.0.0
do_inject():196 -- DLL: C:\Program Files (x86)\clink\DEV\clink_dll_x64.dll
do_inject():198 -- Parent pid: 3776
check_dll_version():50 -- DLL version: 00000000 0000460d
do_inject():268 -- Creating remote thread at 00007FFE418EE5B0 with parameter 0000004F85AA0000
set_rl_readline_name():57 -- Setting rl_readline_name to 'cmd.exe'
hook_trap_veh():118 -- VEH hit - caller is 000000007E12D5AB.
hook_jmp():366 -- Attemping jump hook.
hook_jmp():367 -- Target is kernelbase.dll, ReadConsoleW @ 00007FFE3F7008D0
hook_jmp_impl():279 -- Attempting to hook at 00007FFE3F7008D0 with 00007FFE2FD35C10
hook_jmp_impl():316 -- Matched prolog 83485340 (mask = 0000FFFF)
hook_jmp():377 -- Success!
hook_iat():77 -- Attempting to hook IAT for module 00007FFE2FD30000
hook_iat():78 -- Target is (null),ReadConsoleW (by_name=1)
iterate_imports():94 -- Checking imports in 'dbghelp.dll'
iterate_imports():94 -- Checking imports in 'KERNEL32.dll'
hook_iat():104 -- Found import at 00007FFE2FD90200 (value = 000000007E12A310)
hook_iat():77 -- Attempting to hook IAT for module 00007FF71E0B0000
hook_iat():78 -- Target is (null),WriteConsoleW (by_name=1)
iterate_imports():94 -- Checking imports in 'msvcrt.dll'
iterate_imports():94 -- Checking imports in 'ntdll.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-kernel32-legacy-l1-1-1.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-memory-l1-1-2.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-localization-l1-2-1.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-console-l1-1-0.dll'
hook_iat():104 -- Found import at 00007FF71E0D7038 (value = 000000007E11C5B0)
hook_iat():77 -- Attempting to hook IAT for module 00007FFE2FD30000
hook_iat():78 -- Target is (null),WriteConsoleW (by_name=1)
iterate_imports():94 -- Checking imports in 'dbghelp.dll'
iterate_imports():94 -- Checking imports in 'KERNEL32.dll'
hook_iat():104 -- Found import at 00007FFE2FD90178 (value = 000000007E11C5B0)
hook_iat():77 -- Attempting to hook IAT for module 00007FF71E0B0000
hook_iat():78 -- Target is (null),SetEnvironmentVariableW (by_name=1)
iterate_imports():94 -- Checking imports in 'msvcrt.dll'
iterate_imports():94 -- Checking imports in 'ntdll.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-kernel32-legacy-l1-1-1.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-memory-l1-1-2.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-localization-l1-2-1.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-console-l1-1-0.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-libraryloader-l1-2-0.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-file-l1-2-1.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-errorhandling-l1-1-1.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-handle-l1-1-0.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-string-l1-1-0.dll'
iterate_imports():94 -- Checking imports in 'api-ms-win-core-processenvironment-l1-2-0.dll'
hook_iat():104 -- Found import at 00007FF71E0D7370 (value = 00007FFE3F699FB0)
hook_iat():77 -- Attempting to hook IAT for module 00007FFE2FD30000
hook_iat():78 -- Target is (null),SetEnvironmentVariableW (by_name=1)
iterate_imports():94 -- Checking imports in 'dbghelp.dll'
iterate_imports():94 -- Checking imports in 'KERNEL32.dll'
hook_iat():104 -- Found import at 00007FFE2FD90190 (value = 00007FFE418F07D0)
is_clink_present():318 -- Clink already installed in process.

@festum
Copy link

festum commented Jan 5, 2015

Thank you @mridgers it also fix mine in build 9888.

@luisrudge
Copy link

@mridgers dropbox link is 404 :(

@luisrudge
Copy link

Oh, version 0.4.3 fixed the problem. Thanks!

@stephane-r
Copy link

@luisrudge Can you display the link ? ::)

@luisrudge
Copy link

@Leg3ndz ops, sorry! It's on the releases tab
https://github.com/mridgers/clink/releases/tag/0.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants