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.
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.
Excellent work.
That did the trick.
Thanks for taking the time to respond.
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.
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.
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.
Excellent work.
That did the trick.
Thanks for taking the time to respond.
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.