1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sharing violation in IDE

Discussion in 'Support' started by vefatica, Dec 29, 2009.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    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
    ---------------------------
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    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.
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    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
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    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
     
  5. TEA-Time

    Joined:
    Jun 2, 2008
    Messages:
    282
    Likes Received:
    1
    Same here on XP SP2.
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    Already fixed in build 38, which will be uploaded a day or two after the web
    site is moved.

    Rex Conn
    JP Software
     
  7. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    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
     
  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    Will that happen any time soon?
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    As soon as it's uploaded!
     

Share This Page