TobiasChe / conemu-maximus5

Automatically exported from code.google.com/p/conemu-maximus5
0 stars 0 forks source link

ConEmu fails to duplicate root when cmd.exe was catched as default terminal by hook #1516

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Required information!
OS version: Win7/Ultimate/64bit/german
ConEmu version: 140310

*Bug description*
ConEmu shows error message if I try to duplicate root of a cmd.exe that was 
automatically catched before (by hook). This error message does *not* appear if 
cmd.exe is simply started by run dialog (e.g. start menu). It must be started 
by additional application that is registered for hook. This issue even occurs 
when using ConEmu with default configuration (at least hook must be enabled for 
2nd application).

*Steps to reproduction*
1. Enable "Force ConEmu as default terminal" in settings
2. Add taskmgr.exe to list of hooked executables
3. Start task-manager by pressing CTRL+SHIFT+ESC
4. Select "File/New Task" from menu and launch cmd.exe
5. Console should be automatically catched by ConEmu
5. Right-Click on console tab and select "Duplicate Root"

-> Error message appears

Original issue reported on code.google.com by pfeif...@tzi.de on 19 Mar 2014 at 1:06

Attachments:

GoogleCodeExporter commented 9 years ago
Log Files are attached in Issue.zip.

Original comment by pfeif...@tzi.de on 19 Mar 2014 at 1:06

GoogleCodeExporter commented 9 years ago
When you choose option "Don't use ConEmuHk.dll in started console" you get 
obvious result...

Original comment by ConEmu.Maximus5 on 19 Mar 2014 at 1:11

GoogleCodeExporter commented 9 years ago
In Screenshot-1 you can see the configuration and "Don't use ConEmuHk.dll in 
started console" is unchecked. 

I can reproduce that error on all my three different Win7 systems here in my 
office even with ConEmu in default configuration. It's vitally important to 
start the cmd.exe by an other application (e.g. taskmgr.exe) and let ConEmu 
catch the console by hook. If the console is started by startup menu everything 
works fine.

Can you reproduce it on your system?

Original comment by pfeif...@tzi.de on 19 Mar 2014 at 1:16

Attachments:

GoogleCodeExporter commented 9 years ago
Create MiniDump (not full) if cmd started from taskmgr and attach it here.

Original comment by ConEmu.Maximus5 on 19 Mar 2014 at 1:20

GoogleCodeExporter commented 9 years ago
I've checked it from explorer.exe in my Win8. Working properly. Going to find 
Win7.

Original comment by ConEmu.Maximus5 on 19 Mar 2014 at 1:22

GoogleCodeExporter commented 9 years ago
Ok, which process?

ConEmu64.exe
ConEmuC64.exe
conhost.exe
cmd.exe

Original comment by pfeif...@tzi.de on 19 Mar 2014 at 1:26

GoogleCodeExporter commented 9 years ago
Launching from Explorer.exe works fine here too! Launching from Taskmgr.exe 
does *not*!

Original comment by pfeif...@tzi.de on 19 Mar 2014 at 1:27

GoogleCodeExporter commented 9 years ago
I uploaded a memory dump of ConEmuC64.exe taken after launched from taskmgr.exe 
but before trying to duplicate root.

https://dl.dropboxusercontent.com/u/66494316/ConEmuC64-Dump.zip

Original comment by pfeif...@tzi.de on 19 Mar 2014 at 2:07

GoogleCodeExporter commented 9 years ago

Original comment by ConEmu.Maximus5 on 19 Mar 2014 at 4:39

GoogleCodeExporter commented 9 years ago
140327

Original comment by ConEmu.Maximus5 on 28 Mar 2014 at 8:52

GoogleCodeExporter commented 9 years ago
Just tried the new version and the issue is fixed for consoles that were 
launched by taskmgr.exe but unfortunately it still occurs for consoles launched 
by other prorams (like dopus.exe).

BTW: I noticed that I can duplicate the tab (of such an dopus launched console) 
by macro Shell("new_console:I") but in this case the current path from the 
source console is not applied to the new console. In other words the source 
console is in "D:\" and the new console (duplicated by macro) is placed in 
"C:\Program Files\ConEmu\ConEmu>". This effect only happens for consoles that 
can not be duplicated by context menu. May be this helps?

Original comment by pfeif...@tzi.de on 28 Mar 2014 at 9:51

Attachments:

GoogleCodeExporter commented 9 years ago
Do you need process dump for analysis?

Original comment by pfeif...@tzi.de on 1 Apr 2014 at 8:31

GoogleCodeExporter commented 9 years ago

Original comment by ConEmu.Maximus5 on 1 Apr 2014 at 8:41

GoogleCodeExporter commented 9 years ago
Do you need process dump of the newest ConEmu version for analysis?

Original comment by pfeif...@tzi.de on 24 Apr 2014 at 8:10

GoogleCodeExporter commented 9 years ago
No. I need time to install and test dopus...

Original comment by ConEmu.Maximus5 on 24 Apr 2014 at 8:17

GoogleCodeExporter commented 9 years ago
There is no need to install DOpus. Just try any other application to start 
cmd.exe instead of taskmgr.exe (which works perfect now).

For example I tried notepad.exe to start cmd.exe and it even raises the same 
error. Check the screenshots attached.

Original comment by pfeif...@tzi.de on 25 Apr 2014 at 3:12

Attachments:

GoogleCodeExporter commented 9 years ago
140428

Original comment by ConEmu.Maximus5 on 28 Apr 2014 at 11:56

GoogleCodeExporter commented 9 years ago
Thank you very much! Works very well now (even when cmd.exe is launched from 
DOpus). 

The only point I can report is that the first duplication is a little bit slow 
(took around 1-2 seconds for the 2nd tab to appear).

Original comment by pfeif...@tzi.de on 30 Apr 2014 at 9:00