Welcome!

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

SignUp Now!

Sharing violation in IDE

May
12,846
164
Try this.

TOUCH /C test.bat
BDEBUGGER test.bat

In the IDE,

add the line ECHO foo
press the "start" button
press the "stop" button
edit the line (say, ECHO bar)
press the "start" button

---------------------------
IDE 11.0
---------------------------
Encountered a sharing violation while accessing v:\test.bat.
---------------------------
OK
---------------------------
 
There has been no response so let me try again.

Open any .BAT file with BDEBUGGGER. Click "Start", click "Stop", click "Save" ... sharing violation. The same applies to the sequence Start, Stop, Edit, Start. That makes it pretty hard to edit and debug BAT files.
 
vefatica wrote:
| There has been no response so let me try again.
|
| Open any .BAT file with BDEBUGGGER. Click "Start", click "Stop",
| click "Save" ... sharing violation. The same applies to the
| sequence Start, Stop, Edit, Start. That makes it pretty hard to
| edit and debug BAT files.

I have only .BTM files, no .BAT files. I tried the first sequence (without
Edit) above, both without actually executing any commands and also by
executing the first command before I clicked "Stop debugging" (which I am
sure is what you meant by Stop"). No violations. Maybe it is particular to
.BAT files, which must be executed by reading each line from disk to
execute, as .BAT files are permitted to modify themselves, and which may
force the IDE to read and close the file once for displaying and editing,
and separately for execution, and have it already open to read the next line
at the time you select "Save", resulting in the sharing violation. However,
all this is just speculation on my part. Have you tried .BTM files?
--
Steve
 
On Sat, 02 Jan 2010 13:59:15 -0600, Steve Fábián <> wrote:

|vefatica wrote:
|| There has been no response so let me try again.
||
|| Open any .BAT file with BDEBUGGGER. Click "Start", click "Stop",
|| click "Save" ... sharing violation. The same applies to the
|| sequence Start, Stop, Edit, Start. That makes it pretty hard to
|| edit and debug BAT files.
|
|I have only .BTM files, no .BAT files. I tried the first sequence (without
|Edit) above, both without actually executing any commands and also by
|executing the first command before I clicked "Stop debugging" (which I am
|sure is what you meant by Stop"). No violations. Maybe it is particular to
|.BAT files, which must be executed by reading each line from disk to
|execute, as .BAT files are permitted to modify themselves, and which may
|force the IDE to read and close the file once for displaying and editing,
|and separately for execution, and have it already open to read the next line
|at the time you select "Save", resulting in the sharing violation. However,
|all this is just speculation on my part. Have you tried .BTM files?

It doesn't happen with BTM files. I usually use "BAT". In any case, "Stop
debugging" should leave the file editable.
--
- Vince
 
Try this.

TOUCH /C test.bat
BDEBUGGER test.bat

In the IDE,

add the line ECHO foo
press the "start" button
press the "stop" button
edit the line (say, ECHO bar)
press the "start" button

---------------------------
IDE 11.0
---------------------------
Encountered a sharing violation while accessing v:\test.bat.
---------------------------
OK
---------------------------

There has been no response so let me try again.

Open any .BAT file with BDEBUGGGER. Click "Start", click "Stop", click "Save" ... sharing violation. The same applies to the sequence Start, Stop, Edit, Start. That makes it pretty hard to edit and debug BAT files.

Same here on XP SP2.
 
TCC 11.00.37 Windows XP [Version 5.1.2600]

Tried your test with both a .BTM and a .BAT file. The sharing violation is
unique to the .BAT file. The same actions are OK with a .BTM file!

My earlier post postulated that the problem may be unique to .BAT files.
Alas, my test shows that the problem also exists for .CMD files. The same
explanation, of course, applies to .CMD files as well.

For my test I used a single file, using hard links, so it could be tested as
.BTM, .BAT, and .CMD.

Vince, why do you still use .BAT files? I have none!

Rex, when I edited the file in BDEBUGGER / IDE, the edited file was saved as
a new file with the old name. The hard links were not preserved. Why did
this occur? Note that I have no editor linked to the IDE, it uses the
default editor.

Good luck migrating the webserver!
--
Steve
 

Similar threads

Back
Top