SETLOCAL not working in BDEBUGGER

Dec 2, 2008
224
2
Canada
I created a simple Batch file with just:

SETLOCAL
ECHO 1

and stepped past the "SETLOCAL" in the debugger and BDEBUGGER crashed in V26 but not in V22.
 
Dec 2, 2008
224
2
Canada
Process Monitor shows the following just after executing the SETLOCAL:

1:34:52.9666881 PM IDE.EXE 23028 RegQueryKey HKCU SUCCESS Query: HandleTags, HandleTags: 0x0
1:34:52.9667141 PM IDE.EXE 23028 RegOpenKey HKCU\AppEvents\Schemes\ SUCCESS Desired Access: Query Value
1:34:52.9667553 PM IDE.EXE 23028 RegQueryValue HKCU\AppEvents\Schemes\(Default) SUCCESS Type: REG_SZ, Length: 18, Data: .Default
1:34:52.9667978 PM IDE.EXE 23028 RegCloseKey HKCU\AppEvents\Schemes SUCCESS
1:34:52.9668287 PM IDE.EXE 23028 RegOpenKey HKCU SUCCESS Desired Access: Query Value
1:34:52.9668544 PM IDE.EXE 23028 RegQueryKey HKCU SUCCESS Query: HandleTags, HandleTags: 0x0
1:34:52.9668839 PM IDE.EXE 23028 RegOpenKey HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current SUCCESS Desired Access: Query Value
1:34:52.9669340 PM IDE.EXE 23028 RegQueryValue HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current\(Default) SUCCESS Type: REG_SZ, Length: 2, Data:
1:34:52.9669678 PM IDE.EXE 23028 RegCloseKey HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current SUCCESS
1:34:52.9669846 PM IDE.EXE 23028 RegCloseKey HKCU SUCCESS
1:34:52.9670002 PM IDE.EXE 23028 RegQueryKey HKCU SUCCESS Query: HandleTags, HandleTags: 0x0
1:34:52.9670156 PM IDE.EXE 23028 RegOpenKey HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current SUCCESS Desired Access: Query Value
1:34:52.9670472 PM IDE.EXE 23028 RegQueryValue HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current\Default Flags NAME NOT FOUND Length: 16
1:34:52.9670652 PM IDE.EXE 23028 RegCloseKey HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current SUCCESS
1:34:52.9670875 PM IDE.EXE 23028 RegOpenKey HKCU SUCCESS Desired Access: Query Value
1:34:52.9671065 PM IDE.EXE 23028 RegQueryValue HKCU\(Default) NAME NOT FOUND Length: 144
1:34:52.9671205 PM IDE.EXE 23028 RegCloseKey HKCU SUCCESS
1:34:52.9671358 PM IDE.EXE 23028 RegQueryKey HKLM SUCCESS Query: HandleTags, HandleTags: 0x0
1:34:52.9671498 PM IDE.EXE 23028 RegOpenKey HKLM\Software\Microsoft\Windows\CurrentVersion SUCCESS Desired Access: Query Value
1:34:52.9671806 PM IDE.EXE 23028 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MediaPath NAME NOT FOUND Length: 144
1:34:52.9671961 PM IDE.EXE 23028 RegCloseKey HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion SUCCESS
1:34:52.9717514 PM IDE.EXE 23028 CreateFile C:\JPSoft\Batches SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
1:34:52.9718042 PM IDE.EXE 23028 QueryBasicInformationFile C:\JPSoft\Batches SUCCESS CreationTime: 2018-03-16 10:25:24 PM, LastAccessTime: 2020-06-27 1:34:00 PM, LastWriteTime: 2020-06-27 1:33:57 PM, ChangeTime: 2020-06-27 1:33:57 PM, FileAttributes: D
1:34:52.9718370 PM IDE.EXE 23028 CloseFile C:\JPSoft\Batches SUCCESS
1:34:53.4100079 PM IDE.EXE 23028 QueryNameInformationFile C:\Program Files\JPSoft\TCMD26\ide.exe SUCCESS Name: \Program Files\JPSoft\TCMD26\ide.exe
1:34:53.8140340 PM IDE.EXE 23028 Process Create C:\WINDOWS\system32\WerFault.exe SUCCESS PID: 5356, Command line: C:\WINDOWS\system32\WerFault.exe -u -p 23028 -s 2532
1:35:02.0129187 PM IDE.EXE 23028 Thread Exit SUCCESS Thread ID: 3108, User Time: 0.0000000, Kernel Time: 0.0000000
1:35:02.0129210 PM IDE.EXE 23028 Thread Exit SUCCESS Thread ID: 22320, User Time: 0.0000000, Kernel Time: 0.0000000
1:35:02.0129225 PM IDE.EXE 23028 Thread Exit SUCCESS Thread ID: 23388, User Time: 0.0000000, Kernel Time: 0.0000000
1:35:02.0129230 PM IDE.EXE 23028 Thread Exit SUCCESS Thread ID: 23596, User Time: 0.0000000, Kernel Time: 0.0000000
1:35:02.0129239 PM IDE.EXE 23028 Thread Exit SUCCESS Thread ID: 22700, User Time: 0.0000000, Kernel Time: 0.0156250
1:35:02.0129388 PM IDE.EXE 23028 Thread Exit SUCCESS Thread ID: 10720, User Time: 0.0000000, Kernel Time: 0.0000000
1:35:02.0129459 PM IDE.EXE 23028 Thread Exit SUCCESS Thread ID: 13476, User Time: 0.5156250, Kernel Time: 1.1406250
1:35:02.0129682 PM IDE.EXE 23028 Thread Exit SUCCESS Thread ID: 18088, User Time: 0.0000000, Kernel Time: 0.2187500

The error results in the above are:

1:34:52.9670472 PM IDE.EXE 23028 RegQueryValue HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current\Default Flags NAME NOT FOUND Length: 16
1:34:52.9671065 PM IDE.EXE 23028 RegQueryValue HKCU\(Default) NAME NOT FOUND Length: 144
1:34:52.9671806 PM IDE.EXE 23028 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MediaPath NAME NOT FOUND Length: 144
 
May 20, 2008
11,400
99
Syracuse, NY, USA
As reported here quite a while back, IDE/BDEBUGGER often crashes (i.e., disappears) when I just start it or start debugging. It has happened 5-6 times in the last few minutes but I only have two new entries in "C:\ProgramData\JP Software\Take Command 26\ide.exception.log"

[2020/06/27 14:42:30.247] D:\TakeCommand26\Debugger\Debugger.cpp:364 CDebuggerApp::InitInstance() SEH Exception: 0x00007FF6B6412CEA - ACCESS_VIOLATION
[2020/06/27 14:56:42.929] D:\TakeCommand26\Debugger\Debugger.cpp:364 CDebuggerApp::InitInstance() SEH Exception: 0x00007FF6B61EA09D - ACCESS_VIOLATION

And I'm seeing something new. Twice (so far, today) I'll start debugging, get a few lines of output, then, for no apparent reason, get the "cancel batch" prompt in the console.
 
Dec 2, 2008
224
2
Canada
I set "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MediaPath" to the same as "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MediaPathUnexpanded" which was "%SystemRoot%\Media", and it now works.
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
The error results in the above are:

1:34:52.9670472 PM IDE.EXE 23028 RegQueryValue HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current\Default Flags NAME NOT FOUND Length: 16
1:34:52.9671065 PM IDE.EXE 23028 RegQueryValue HKCU\(Default) NAME NOT FOUND Length: 144
1:34:52.9671806 PM IDE.EXE 23028 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MediaPath NAME NOT FOUND Length: 144

Nothing in the IDE or TCC queries those registry keys. You've got something else that's being pulled in - what does Process Explorer report for the loaded dll's?
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
As reported here quite a while back, IDE/BDEBUGGER often crashes (i.e., disappears) when I just start it or start debugging. It has happened 5-6 times in the last few minutes but I only have two new entries in "C:\ProgramData\JP Software\Take Command 26\ide.exception.log"

[2020/06/27 14:42:30.247] D:\TakeCommand26\Debugger\Debugger.cpp:364 CDebuggerApp::InitInstance() SEH Exception: 0x00007FF6B6412CEA - ACCESS_VIOLATION

That line means something *not* in IDE.EXE or TakeCmd.dll threw an unhandled exception.
 
Dec 2, 2008
224
2
Canada
I think I may have found the problem, I found a IDE.EXE in a suspended state and there are only a few reasons for that to happen. I have had a program call Process Lasso (Bitsum. Real-time CPU Optimization and Automation) running on my PCs for probable 10+ year. I have been using it mostly to throttle high I/O apps. It appears that it has been messing with IDE.EXE for some reason, even suspending it. I shut it down and things seem to be working. I'll probably talk to the author of Process Lasso about the issue. I may tell Process Lasso to ignore all Take Command Processes or since I have an i7-7700HQ Processor with 24 Gb of memory, throttle I/O bound processes may not be a good enough reason to keep on the computer.

There is a strange thing, I didn't seem to have the problem in V22 of Take Command.
 
Similar threads
Thread starter Title Forum Replies Date
FreezerBurnt "Missing SETLOCAL" when initializing Visual Studio Command Prompt. Support 9
K seems to have no effec tin CMDebug: SETLOCAL EnableDelayedExpansion Support 1
Joe Caverly How to? SETLOCAL Level Support 16
Joe Caverly SETLOCAL removes Aliases and Functions Support 3
vefatica SETLOCAL ... ALIAS ... pipes Support 2
rps WAD Setlocal issue Support 4
Charles Dye Read-only environment variables wiped by SETLOCAL / ENDLOCAL Support 5
T Documentation SETARRAY & SETLOCAL/ENDLOCAL Support 8
vefatica Command line SETLOCAL? Support 11
Charles Dye Fixed GPF in SETLOCAL Support 16
M How to? Does the "Do" command effectively do a "SetLocal/EndLocal"??? Support 2
H Help for SETLOCAL in TCMD11 Support 0
twaterloo FolderMonitor for the 1st time not working Support 5
Tim Rowe NTFS Descriptions not working Support 13
J Batcomp still not working for me in TCMD27 Support 1
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
M Why did BEEP just quit working? Support 12
nickles ANSI Colors Windows 7 no longer working Support 6
K ANSI Not Working Support 8
thorntonpg option /u not working The directory name is invalid Support 5
Charles Dye Is the "File Associations" installer dialog working? Support 4
H @ceiling @floor @int not working version 21.01.63 Support 9
K Command Line Selection Not Working Support 12
G Extended directory search not working Support 4
B %@fileseek is not working ? Support 2
C "Take Command has stopped working" Support 1
H New command not working well in Windows 7 Support 4
C "TakeCommand has stopped working" Support 3
N ping DNS lookup not working Support 1
N Updater/silentall not working? Support 1
K Help Not Working Support 11
R Fixed set /r has stopped working in build 35 Support 4
U Keys and IDX not working Support 11
Jesse Heines How to? Everything Tool Not Working After Version 20 Installation Support 8
WavSlave Fixed LIST /U not working in TCC v19 Support 5
Jay Sage %_selected no longer working Support 15
S iftp copying pgp files from ftp is not working Support 11
fishman@panix.com Extended Directory Searches are not working for me in CDD Support 9
J How to set working directory Support 10
vefatica Fixed LEAVE N not working Support 7
P %date5 not working Support 6
M WAD PDir not working correctly... Support 5
Detlef Fixed ParameterChar in TCMD.INI no longer working Support 35
Jay Sage WAD Variable _LOGFILE Not Working Support 2
I v16 - Shortcuts not working Support 6
rps Fixed Win "set /p" not working in V17 build 53 Support 3
Jay Sage Toolbar Update to INI File Not Working Support 10
Jay Sage Ctrl-C Not Working Reliably to Copy Screen Content Support 4
Jay Sage Unknown_CMD Not Working Support 4
fromano Fixed /E not working in TCMD 17.0.40 while doing one way synch Support 1

Similar threads