Announcement

Collapse
No announcement yet.

global and local errortrap

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

  • global and local errortrap

    Hello people,

    i seem to have some problems with getting errortrapping to work.
    i have a program of about 8000 lines of code that does not want to do
    any errortrapping. if i take the same errortrap setup to a smaller
    test program, things work fine, so i'm doing something wrong in the
    big program. my question is this:
    what are the most obvious reasons for errortrapping not working?
    does program size have anything to do with that?
    just in case i did something stupid in the meta's i'll include them;
    these are the first statements in my code. anything in there that
    might interfere with errortrapping? thanx for anything on this.

    the meta's:

    $COMPILE EXE
    $CPU 80386
    $DEBUG MAP ON
    $DEBUG PBDEBUG ON
    $DEBUG PATH ON
    $DIM ALL
    $STACK 4096
    $ERROR ALL ON
    $EVENT ON
    $LIB ALL OFF
    $OPTIMIZE SPEED
    $OPTION CNTLBREAK ON
    $OPTION GOSUB ON


    ------------------
    [URL=http://www.DiyDataRecovery.nl]
    [URL=http://www.DiyDataRecovery.nl]

  • #2
    > if i take the same errortrap setup to a smaller
    >test program, things work fine, so i'm doing something wrong in the
    >big program.

    Maybe not....

    When you compile, check the sizes of the code segments.

    Over the years I have observed 'flaky' things happening when the segments get "close to" the 64 Kb limit without actually going over (which is reported as a compile-time error). No, this was never confirmed as an official "issue." But I believe it is/was nonetheless.

    If any segment looks "close" to 64Kb, break it up into two segments using a $SEGMENT directive and try again.


    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      It's an oft-touted suggestion but interestingly there are almost no confirmed reports that it fixes any specific problems.

      I'd be inclined to try compiling on another box or under another OS to eliminate the XMS/EMS drivers as a cause of the problems.

      That said, we don't know what else might be in those 80,000 lines of code that could cause problems. For example, it could be a memory corruption issue from some inline asm or bad pointer use that trashes the code at runtime.

      To be any more specific, Tech Support would need to compile the source code and investigate from there.

      ------------------
      Lance
      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      Lance
      mailto:[email protected]

      Comment

      Working...
      X