Issue 342: Explorer crash with vdiff command
http://bitbucket.org/tortoisehg/stable/issue/342/explorer-crash-with-vdiff-command

Adrian Buehlmann / abuehl on Mon, 6 Jul 2009 12:04:29 +0200:

Comment:
  I've just pushed 
http://bitbucket.org/abuehl/thg-stable/changeset/cef8817c9f08/ which prints the 
target buffer sizes in debug output.

Some examples below:

{{{
[2800] [THG] CShellExt::GetCommandString: idCmd = 0, uFlags = 4 (GCS_VERBW), 
cchMax = 64
[2800] [THG] CShellExt::GetCommandString: name = "commit"
[2800] [THG] CShellExt::GetCommandString: res = 0, pszName = "commit"
[2800] [THG] CShellExt::GetCommandString: idCmd = 14, uFlags = 4 (GCS_VERBW), 
cchMax = 64
[2800] [THG] CShellExt::GetCommandString: idCmd not found
[2800] [THG] CShellExt::GetCommandString: res = 1, pszName = ""
[2800] [THG] CShellExt::GetCommandString: idCmd = 14, uFlags = 4 (GCS_VERBW), 
cchMax = 64
[2800] [THG] CShellExt::GetCommandString: idCmd not found
[2800] [THG] CShellExt::GetCommandString: res = 1, pszName = ""
[2800] [THG] CShellExt::GetCommandString: idCmd = 0, uFlags = 5 
(GCS_HELPTEXTW), cchMax = 600
[2800] [THG] CShellExt::GetCommandString: name = "commit"
[2800] [THG] CShellExt::GetCommandString: res = 0, pszName = "Commit changes in 
repository"
[2800] [THG] CShellExt::GetCommandString: idCmd = 14, uFlags = 5 
(GCS_HELPTEXTW), cchMax = 600
[2800] [THG] CShellExt::GetCommandString: idCmd not found
[2800] [THG] CShellExt::GetCommandString: res = 1, pszName = ""
[2800] [THG] CShellExt::GetCommandString: idCmd = 14, uFlags = 1 
(GCS_HELPTEXTA), cchMax = 260
[2800] [THG] CShellExt::GetCommandString: idCmd not found
[2800] [THG] CShellExt::GetCommandString: res = 1, pszName = ""
[2800] [THG] CShellExt::GetCommandString: idCmd = 1, uFlags = 5 
(GCS_HELPTEXTW), cchMax = 600
[2800] [THG] CShellExt::GetCommandString: name = "status"
[2800] [THG] CShellExt::GetCommandString: res = 0, pszName = "Repository status 
& changes"
[2800] [THG] CShellExt::GetCommandString: idCmd = 2, uFlags = 5 
(GCS_HELPTEXTW), cchMax = 600
[2800] [THG] CShellExt::GetCommandString: name = "shelve"
[2800] [THG] CShellExt::GetCommandString: res = 0, pszName = "Shelve or 
unshelve file changes"
[2800] [THG] CShellExt::GetCommandString: idCmd = 3, uFlags = 5 
(GCS_HELPTEXTW), cchMax = 600
[2800] [THG] CShellExt::GetCommandString: name = "vdiff"
[2800] [THG] CShellExt::GetCommandString: res = 0, pszName = "View changes 
using GUI diff tool"
[2800] [THG] CShellExt::GetCommandString: idCmd = 4, uFlags = 5 
(GCS_HELPTEXTW), cchMax = 600
[2800] [THG] CShellExt::GetCommandString: name = "log"
[2800] [THG] CShellExt::GetCommandString: res = 0, pszName = "View change 
history in repository"
[2800] [THG] CShellExt::GetCommandString: idCmd = 4, uFlags = 5 
(GCS_HELPTEXTW), cchMax = 600
[2800] [THG] CShellExt::GetCommandString: name = "log"
[2800] [THG] CShellExt::GetCommandString: res = 0, pszName = "View change 
history in repository"
[2800] [THG] CShellExt::GetCommandString: idCmd = 4, uFlags = 4 (GCS_VERBW), 
cchMax = 64
[2800] [THG] CShellExt::GetCommandString: name = "log"
}}}

As you can see in the case for the help texts (GCS_HEPTEXTW), the target buffer 
seems to be always reasonably large (260, 600).

The original (experimental) implementation GetCommandString didn't care for the 
uFlags parameter
and always returned the help text (even if the request was a GCS_VERBW, which 
seems to provide
a shorter target buffer -- 64 in the examples above).


-- 
This is an issue notification from bitbucket.org.
You are receiving this either because you are the
owner of the issue, or you are following the issue.

------------------------------------------------------------------------------
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to