Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2015
    Posts
    19

    Default Error after many command line compares

    Hello,

    i'm using BC(4.1.4) to compare files via script. This script is called via a Program in a loop to get many compare results.
    Normally it works well, but sometimes it throws an error. I think this error only occurs if the script is executed very often by the Program-Loop (~2000-3000 times).

    the exception message: "Access violation at address 00000000013AC326 in module 'BCompare.exe'. Read of address 0000000000000084."

    Question: What could be the problem? Maybe too much RAM is reserved and blocked?

    I can't send the whole bug report its too long for the forum and the size of the txt is too big for the limited attachment size.

    Just a cutout:
    -------------------------------------------------------------------------------------------------------------------------------------------------------
    date/time : 2016-07-03, 21:31:40, 868ms
    operating system : Windows 7 x64 Service Pack 1 build 7601
    system language : German
    system up time : 37 days 7 hours
    program up time : 2 seconds
    processors : 2x AMD Opteron(tm) Processor 6174
    physical memory : 903/2048 MB (free/total)
    free disk space : (C 27,85 GB
    display mode : 1024x768, 32 bit
    process id : $4368
    allocated memory : 37,21 MB
    largest free block : 7166,00 GB
    command line : "C:\Program Files\Beyond Compare 4\BComp.com" /silent "@C:\Program Files\Beyond Compare 4\report_test\skripts\datei_vgl.txt" "C:\Program Files\Beyond Compare 4\report_test\muster\171.prt" "C:\Program Files\Beyond Compare 4\report_test\aktuell\171.prt" "C:\Program Files\Beyond Compare 4\report_test\ergebnis\171.xml" "C:\Program Files\Beyond Compare 4\report_test\logs\171.prt" /BCompWnd=$075003FE
    executable : BCompare.exe
    exec. date/time : 2015-12-16 15:15
    version : 4.1.3.20814
    compiled with : Delphi XE7
    madExcept version : 4.0.11
    Pro edition : True
    subversion revision : 20814
    callstack crc : $1a9dc26e, $b03b081d, $ecfaa6f5
    exception number : 1
    exception class : EAccessViolation
    exception message : Access violation at address 00000000013AC326 in module 'BCompare.exe'. Read of address 0000000000000084.

    thread $3cec:
    013ac326 +c6 BCompare.exe BcJobs 4113 +18 TJobWorkerThread.Execute
    00628064 +24 BCompare.exe madExcept 17185 +3 HookedTThreadExecute
    0053df10 +40 BCompare.exe System.Classes ThreadProc
    00412488 +38 BCompare.exe System ThreadWrapper
    00627f39 +49 BCompare.exe madExcept 17166 +7 ThreadExceptFrame
    76e159bb +0b kernel32.dll BaseThreadInitThunk

    main thread ($364c): <suspended>
    7fefcff1 +000 KERNELBASE.dll WaitForMultipleObjectsEx
    76e216ce +0ae kernel32.dll WaitForMultipleObjectsEx
    76d162c9 +029 USER32.dll MsgWaitForMultipleObjectsEx
    76d162fb +01b USER32.dll MsgWaitForMultipleObjects
    013ab149 +0e9 BCompare.exe BcJobs 3740 +15 TJobThreadPool.Destroy
    0040f175 +015 BCompare.exe System TObject.Free
    013ac706 +036 BCompare.exe BcJobs 4214 +3 TJobManager.Destroy
    0040f175 +015 BCompare.exe System TObject.Free
    013ae6ab +00b BCompare.exe BcJobs 4846 +3 ShutdownJobManager
    01392b44 +074 BCompare.exe BcStartup 1372 +11 BcFinalize
    01c02ba3 +103 BCompare.exe BCompare 992 +58 initialization
    76e159bb +00b kernel32.dll BaseThreadInitThunk

    thread $4074:
    76e159bb +b kernel32.dll BaseThreadInitThunk

    thread $4324:
    76e159bb +b kernel32.dll BaseThreadInitThunk

    thread $366c:
    7fefcff1 +00 KERNELBASE.dll WaitForMultipleObjectsEx
    76e216ce +ae kernel32.dll WaitForMultipleObjectsEx
    76d162c9 +29 USER32.dll MsgWaitForMultipleObjectsEx
    76d162fb +1b USER32.dll MsgWaitForMultipleObjects
    00627f39 +49 BCompare.exe madExcept 17166 +7 ThreadExceptFrame
    76e159bb +0b kernel32.dll BaseThreadInitThunk

    thread $410c:
    76e159bb +b kernel32.dll BaseThreadInitThunk


    cpu registers:
    rax = 0000000000000000
    rbx = 0000000000cc2408
    rcx = 0000000076f6bf1a
    rdx = 0000000000000000
    rsi = 0000000004f1fc10
    rdi = 000000000595fe88
    rip = 00000000013ac326
    rsp = 000000000595fcf0
    rbp = 000000000595fcf0
    r8 = 000000000595fc88
    r9 = 000000000595fcf0
    r10 = 0000000000000000
    r11 = 0000000000000206
    r12 = 0000000000000000
    r13 = 0000000000000000
    r14 = 0000000000000000
    r15 = 0000000000000000

    stack dump:
    0595fcf0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
    0595fd00 11 88 1d 00 00 00 00 00 - d0 ab ef 02 00 00 00 00 ................
    0595fd10 00 00 00 00 00 00 00 00 - a0 3b ea 04 00 00 00 00 .........;......
    0595fd20 10 03 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
    0595fd30 10 fc f1 04 00 00 00 00 - 88 fe 95 05 00 00 00 00 ................
    0595fd40 50 fd 95 05 00 00 00 00 - d0 80 62 00 00 00 00 00 P.........b.....
    0595fd50 00 ab ef 02 00 00 00 00 - 50 d3 ff 02 00 00 00 00 ........P.......
    0595fd60 26 c3 3a 01 00 00 00 00 - 01 00 00 00 00 00 00 00 &.:.............
    0595fd70 f0 fc 95 05 00 00 00 00 - f0 fc 95 05 00 00 00 00 ................
    0595fd80 18 19 1d 00 00 00 00 00 - 11 00 00 00 00 00 00 00 ................
    0595fd90 d0 ab ef 02 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
    0595fda0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
    0595fdb0 00 00 00 00 00 00 00 00 - 50 fd 95 05 00 00 00 00 ........P.......
    0595fdc0 00 00 00 00 00 00 00 00 - a8 1f 3a 01 00 00 00 00 ..........:.....
    0595fdd0 e0 fd 95 05 00 00 00 00 - 13 df 53 00 00 00 00 00 ..........S.....
    0595fde0 d0 ab ef 02 00 00 00 00 - 60 c2 3a 01 00 00 00 00 ........`.:.....
    0595fdf0 00 00 00 00 00 00 00 00 - 10 fc f1 04 00 00 00 00 ................
    0595fe00 40 fe 95 05 00 00 00 00 - e0 fd 95 05 00 00 00 00 @...............
    0595fe10 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
    0595fe20 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................

    disassembling:
    [...]
    013ac2fa test al, al
    013ac2fc jnz loc_13ac390
    013ac302 4110 xor rcx, rcx
    013ac305 call -$96744a ($a44ec0) ; SsPowerMgmt.SsPowerKeepAwake
    013ac30a mov [rbp+$38], rax
    013ac30e 4112 mov rax, [rbp+$60]
    013ac312 mov rcx, [rax+$78]
    013ac316 call -$d2620b ($686110) ; System.SyncObjs.TEvent.ResetEvent
    013ac31b 4113 mov rax, [rbp+$60]
    013ac31f mov rax, [rax+$88]
    013ac326 > cmp dword ptr [rax+$84], 3
    013ac32d jnz loc_13ac362
    013ac32f nop
    013ac330 4117 mov rax, [rbp+$60]
    013ac334 mov rax, [rax+$88]
    013ac33b mov rcx, rax
    013ac33e mov rbx, [rax]
    013ac341 call qword ptr [rbx+$50]
    013ac344 jmp loc_13ac362
    013ac362 4121 mov rax, [rbp+$60]
    013ac366 mov rcx, [rax+$90]
    [...]

    -------------------------------------------------------------------------------------------------------------------------------------------------------


    Thanks for your answer!

    greetings,
    phil

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,901

    Default

    Hello,

    You can email the entire bug report to support@scootersoftware.com, along with a link back to this forum thread.

    Is your automated task triggering multiple times a second, or overlapping calls multiple times? What Program is generating the calls?

    It looks like your script might be using bcomp.exe. For @scriptfile.txt, you can use bcompare.exe. bcomp.exe and bcomp.com are for version control integration or automated solutions that need to check the %errorlevel% (such as /qc).
    Aaron P Scooter Software

  3. #3
    Join Date
    Mar 2015
    Posts
    19

    Default

    Hello,

    I sent you the whole bug report via E-Mail.
    the automated task is running an in-house application, which triggers Beyond Compare multiple times, the delay is really short (just as you thought).
    I'm using bcomp.com, didn't know that there is a difference. So the bcompare.exe is faster than bcomp.exe and bcomp.com because there is no error-handling?

    Another question - Could you give my an example of using the %errorlevel% with the BC-Skript(file is named datei_vgl.txt) below?

    # log compare
    log verbose append:"%4_%date%.txt"

    # Compare the text contents of the files.
    criteria rules-based ignore-unimportant

    text-report layout:xml &
    options:display-mismatches &
    output-to:"%3" "%1" "%2"

    regards,
    phil

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,901

    Default

    Hello,

    ErrorLevel has a return value for script success or failure, but does not return a value dependent on the script actions. It is used in conjunction with /quickcompare, documented in the Help file -> Command Line Reference section.

    BComp.com will run as a console program and wait for the compare to complete before returning, which is useful in a variety of command line scenarios. If you configure your automation to wait based on this, then bcomp.com could be useful. BComp.exe also supports waiting, but is intended for graphical diff tool configuration with vcs; it does not wait from the console or batch file. bcompare.exe does not wait, and exits immediately. Which to use depends on your software, but incorporating a wait with bcomp.com might help.

    Another strategy might be to use /solo, which will trigger every call into its own process.
    Aaron P Scooter Software

  5. #5
    Join Date
    Mar 2015
    Posts
    19

    Default

    Hello,

    thanks for the detailed information. I think "/solo" will be useful to reduce the error rate and maybe also to improve the performance.

    regards,
    phil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •