Announcement

Collapse
No announcement yet.

Intermittently missing dialog box after compilation

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Hi Jesper,

    I've been trying to duplicate your problems. I have a copy of PBCC602 and so far it has worked ok, running compilations from a batch file on my Surface Pro / Windows10 Pro 64 Bit.

    From your descriptions the primary concern is that the batch file intermittently fails to launch PBCC. If it does run and you get errors - that could be any number of things - including memory corruption / out of bounds errors related to the source..

    Do you have a minimal source code that exhibits the problems that you can post here or perhaps a general description of the functions?

    I wonder does you colleague work on the same source code as you or on separate jobs? Does he use Total Commander?

    I don't have Total Commander - so unable to test in that environment. I wonder if there are permissions issues.

    Have you tried running the batch file from within NP++ using the Run menu option or from the File menu - "Open Containing Folder.." either in Explorer or cmd? Is the batch file saved in the same folder as your source code?

    I found that I had success running the batch file from within NP++'s Run option only if NP++ was running 'as administrator' - if NP++ was started normally (not as admin) the compiler would fail to complete (Though it did popup a message warning "Error 496 : Destination file write error").
    Rgds, Dave

    Comment


    • #22
      I am certain pbcc is running - it just exits without any messages.

      We are working on the same source code.

      We both see problems every now and then - with error messages that disappear with a new command prompt.

      Unfortunately I don't have a minimal source code that exhibits this problem.
      The total number of lines from my last successful compilation is 243396.
      Executable stack size is exactly 2^20=1048576

      Checking the %errorlevel% claims 9009 after an unsuccessful compilation without dialog box.
      Then I ran it again and got %errorlevel% -1073741819
      After this the %errorlevel% continuted to be -1073741819.
      Even after adding /D to the .bat file recompiling and getting %errorlevel% 0, removing the /D compiling and getting no dialog box it was still -1073741819.
      After doing some other stuff in the cmd window I experienced an %errorlevel% 255 after compilation until it went back to -1073741819

      I had an instance where pbcc.exe would not finish .. I had time to go to task viewer, find the task and create dump. So I now have a PBCC.DMP file to inspect.

      I believe I have observed the issue when opening a command prompt from windows without being administrator. I will attempt to remember to compile from this kind of cmd from now on..

      Comment


      • #23
        -1073741819 = FFFFFFFFC0000005

        I wonder if the FFFF FFFF is the'minus' and the C000 0005 is the standard code for accessing unowned memory. While the compiler probably does not do that, it sounds like the program itself is being run; that is, this is a "compile and execute" BAT/CMD file. You could easily get "unowned memory" error from partially-compiled program.

        DISCLAIMER: No BAT/CMD files shown. No statement re compile logs shown (even turned on?). Relevant source code not shown. ( = New shooter, coming out!)

        Michael Mattias
        Tal Systems Inc.
        Racine WI USA
        mmattias@talsystems.com
        http://www.talsystems.com

        Comment


        • #24
          Jesper,
          You could make a copy of the compiler, then overwrite the call to MessageBox with
          INT3's. Then each time you run it, you'll know if it reaches the location of the call.
          You'll need to configure a debugger to handle the interrupt. Hopefully, the debugger
          won't somehow interfere with the compiler's behaviour.
          You can find the position to write the INT3's by using OllyDbg. Find the call to MessageBox,
          then copy about ten opcode bytes from the area and search for them in a hex editor
          (the byte-sequence will need to be unique in the file, or you could end up at the wrong
          place). Then you just modify the bytes in the hex editor. You'll also need to either add
          code to balance the stack or balance it manually in the debugger each time.

          Edit
          You'd be better off to overwrite the call with:
          INT3
          POP EAX
          POP EAX
          POP EAX
          POP EAX
          ...and the rest NOPs

          Leaving the instructions preceding the call as they are, will let you verify that the
          parameters are valid.
          Last edited by Tony Burcham; 17 Mar 2017, 05:58 PM.
          TheirCorp's projects at SourceForge

          TheirCorp's website

          sigpic

          Comment


          • #25
            I am certain pbcc is running - it just exits without any messages.
            Sorry Jesper,

            I think I misread post #8 to mean that PBCC didn't show in the task manager at all - as opposed to no old instance of PBCC still active as suggested might be an issue by Bud in post #6.

            You could confirm that pbcc is starting by running Process Explorer in a small window - just showing the active processes for the current user, with a View/Update speed set to .5 sec.
            Process Monitor from the same link as above could be very useful too.



            Rgds, Dave

            Comment


            • #26
              Thanks everyone!

              @Dave:
              You are correct, that's right.

              @Tony:
              Interesting suggestion.
              I don't think it'll be necessary - albeit quite interesting though!

              @Michael:
              Well spotted!

              You are absolutely correct. C0000005 is an "access violation exception".

              The .bat file consists of one line which is (currently)
              C:\PBCC6\PBCC60\bin\pbcc /IC:\PBCC6\PBCC60\WinAPI /L %1
              It doesn't matter if I change it to add " around the paths, the problem still occurs.

              The resulting program is not being run. The errorlevel ( exitcode ) I have read out is from pbcc.exe.

              ( I wonder why I didn't do a search for it myself ).

              I had a look in Windows Event Viewer and see what I found:

              Logged: 17-03-2017 10:27:04
              Source: Application Error
              Event ID: 1000
              Level: Error

              Faulting application name: PBCC.EXE, version: 0.0.0.0, time stamp: 0x7e8d3ee7
              Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
              Exception code: 0xc0000005
              Fault offset: 0x45f6d800
              Faulting process id: 0xcd0
              Faulting application start time: 0x01d29f00a2a8158b
              Faulting application path: C:\PBCC6\PBCC60\bin\PBCC.EXE
              Faulting module path: unknown
              Report Id: b8a75496-db91-4dc1-b28d-ef6ec6b6ef34
              Faulting package full name:
              Faulting package-relative application ID:

              It is not the only intermittent error I experience when compiling, sometimes I get an error message from the compiler.
              And launching a new command prompt and recompiling will often result in no errors.

              Most of the time I (we) can compile without problems .. and although this is a cause of concern we don't experience any problems with the resulting .exe file if the compilation is completed successfully. And my colleague lived with "odd compilation errors" long before I started.

              There are more than 243000 lines being compiled in this project. Over the last two years extensive debug trace output has been added.
              I have a feeling that these debug lines could cause memory issues as they are likely to get expanded to very long lines during compilation.

              Comment

              Working...
              X