Menu

Segmentation fault

Help
TommyB
2008-12-23
2013-04-23
  • TommyB

    TommyB - 2008-12-23

    Hi!

    My system is Fedora Core 10 with the latest kernel running on an i686, 2GB memory, plenty of disk.
    I was able to compile and install bwbasic-2.30 OK.

    Just entering bwbasic on the command line produces the seg fault.

    Is there something I can do differently to get this working?
    I'm willing to provide additional info as needed and to help in any way I can.

     
    • Richard Narron

      Richard Narron - 2009-01-12

      I found a bug in bwb_var.c where function var_islocal( buffer ) tries to use a table index that is -1 and invalid.

      To fix the problem I test the index and return NULL if it is -1.

      Here is a diff for patching file bwb_var.c

      --- bwb_var.c.original  2006-10-24 16:18:46.000000000 -0700
      +++ bwb_var.c   2009-01-11 22:06:15.000000000 -0800
      @@ -2515,6 +2515,9 @@ var_islocal( buffer )

          /* run through the local variable list and try to find a match */

      +   if ( CURTASK exsc < 0 )
      +      return NULL;
      +
          for ( v = CURTASK excs[ CURTASK exsc ].local_variable; v != NULL; v = v->next )
             {

      Or simply edit bwb_var.c at line 2517 and insert the 3 lines that start with the "+" character.

       
      • TommyB

        TommyB - 2009-01-12

        Excellent work.

        That did the trick.

        Thanks for taking the time to respond.

         
    • Paul Edwards

      Paul Edwards - 2009-06-07

      Sorry for not replying to you earlier, but I wasn't
      aware of these forums. I work with Ted.

      A bug fix similar to this was made in version 2.40,
      and is obviously part of the recently-released 2.50
      as well.

      BFN.  Paul.

       

Log in to post a comment.