Announcement

Collapse
No announcement yet.

Bizarre behavior

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

  • Bizarre behavior

    Hi -

    I'm having intermittent problems getting programs to run.

    This happens with new programs I'm developing. The behavior is simply that the program crashes. An "Informing Microsoft" window pops up.

    The solution seems to be to add a check point of the form, CON.PRINT X where X can be almost any variable, followed by SS = CON.WAITKEY$ where SS is DIM'd as WSTRING.

    Worse, once I find the failure/fix point, the program runs perfectly (well, as perfectly as the code permits), even when the statements are removed.

    Once I hit the problem, I can exit PBCC, reopen, and the situation persists.

    The issue is fairly rare, but it's a real pain when it does.

    So, I'm pretty much stuck, and am entirely open to suggestions

  • #2
    sfc /scannow
    chkdsk /f
    Look in virus settings/protection history if any programs are blocked.
    Might exclude your PowerBASIC folders.

    #DEBUG ERROR ON
    https://forum.powerbasic.com/forum/u...defined-arrays
    The world is full of apathy, but who cares?

    Comment


    • #3
      Can you post the compiler metastatements that appear at the top of your program? That will tell us a lot.
      "Not my circus, not my monkeys."

      Comment


      • #4
        Do you have simple (compilable) sample?
        Curious sounding line -
        Once I hit the problem, I can exit PBCC, reopen, and the situation persists.
        You do know that once the source is compiled to .EXE you don't need PBCC to run that program . . . right?

        Cheers,
        Dale

        Comment


        • #5
          Try using Error Display mode by adding the metastatement

          #DEBUG DISPLAY ON

          To the top of your source code.

          Rgds, Dave

          Comment


          • #6
            Mike - no programs blocked

            Eric - #COMPILE EXE
            #DIM ALL

            Dale - Yes, I'm aware of that. This occurs during development/debug. I use the Compile and Execute button. When (not if) it fails, I make changes and try again.
            At present I don't have any examples which show the bug. I've found the place to add the magic statements, fixed the problem, and then removed the fixers.
            When using the IDE, it saves the current state of the environment. If I'm having this problem, I can exit PBCC entirely. Then I rerun PBCC and the program menu bar is
            restored, as is the code I was working on. At this point, the problem recurs. Until it stops - for good, as far as I can tell.

            Comment


            • #7
              I had a program i was having problem with
              if you run there is a certain code that comes up and nothing wrong .
              I think it told me i was running csed ide at the time

              Comment


              • #8
                98% a typical example of out of range for pointer or dimension and access to ...
                1% something between table and sky
                the rest is something new

                my last story was
                lWide = @BtnPtr[lId].lRight - lLeft + 1

                lId was 0 and it was expected from 1 to n

                Comment

                Working...
                X