Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

SETLOCAL not working in BDEBUGGER

Dec
233
2
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.
 
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
 
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.
 
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.
 
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?
 
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.
 
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

Back
Top