Author Topic: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).  (Read 3707 times)

Offline balrugh

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
Hello again,  i achieve to update the driver to fluffos 2.21-ds01 and are now trying to update to 2.23. The driver throws me a Segmentation Fault so i compile a debug version (i learn to do it yesterday) and the error change to Illegal variable access:

Code: [Select]
Initializing internal tables....
----------------------------------------------------------------------------
TDM (FluffOS v2.23) starting up on Linux - Wed Aug 31 16:28:41 2011


Connected to address server on localhost port 8099
******** FATAL ERROR: Illegal variable access 1349(10).

FluffOS driver attempting to exit gracefully.
(current object was /secure/master)
--- trace ---
Object: /secure/master, Program: /secure/master.c
   in epilog() at /secure/master/preload.c:75
arguments were ()
locals were: 0
'    load_object' in '/     secure/master.c' ('/       secure/master') /secure/master/preload.c:65
arguments were ()
--- end trace ---
crash() in master called successfully.  Aborting.
Aborted


I try to find the problem with this data.

My lib is a frmudlib derivative and i use the local_options.fr to compile with some changes:

Code: [Select]

#define CFG_MAX_GLOBAL_VARIABLES         500


If i define CFG_MAX_GLOBAL_VARIABLES with 256 it does not give me seg error, but the users can't enter (The player file have more than 256 globals), ¿there are any other solution?

Again, thanks for reading and sorry for my English.

Offline wodan

  • BFF
  • ***
  • Posts: 434
  • Drink and code, you know you want to!
    • View Profile
I wonder if you're still have some objects compiled with the old settings..
try
make clean
in the fluffos source directory and then try building the driver again

Offline balrugh

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #2 on: September 01, 2011, 09:42:08 AM »
Nope, i do 'make clean' and 'make distclean' in every compilation (over 15). Result always the same. I do a little patch in icode.c and interpret.h:

Changed '#if CFG_MAX_GLOBAL_VARIABLES <= 256' to '#if CFG_MAX_GLOBAL_VARIABLES <= 500' and it goes OK. I don't think that this is a good idea so  i will change to the 2.21 driver while found any other solution to the error.

Thank you for your response.

Offline quixadhal

  • BFF
  • ***
  • Posts: 642
    • View Profile
    • WileyMUD
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #3 on: September 02, 2011, 03:57:47 AM »
Are you sure the data type for the global variable counter is at least 16 bits?  256 is a magic number, in that it's the largest unsigned char, so if you're going to arbitrarily allow larger values, you might want to make sure it's not STILL an unsigned char.

Offline balrugh

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #4 on: September 02, 2011, 05:29:11 AM »
If i compile the driver without my mods (fatal error) it assign a short value to control globals (as i understand it, i am not an expert) but with the mods (Without error ) it is a unsigned char and it can have unexpected results.

I try to find if the bug is in my mudlib downloading the dead souls mudlib (http://dead-souls.net/code/dead_souls.zip) and compiling the driver with the unique change of CFG_MAX_GLOBAL_VARIABLES to 500, the result is the same that my library:

Code: [Select]
using config file: mudos.cfg
Initializing internal tables....
----------------------------------------------------------------------------
DeadSoulsNew (FluffOS v2.23-ds01) starting up on Linux - Fri Sep  2 12:08:00 2011


******** FATAL ERROR: Illegal variable access 2117(47).

FluffOS driver attempting to exit gracefully.
(current object was /secure/sefun/sefun)
--- trace ---
'  #global_init#' in '/secure/sefun/sefun.c' ('/  secure/sefun/sefun') /secure/sefun/strings.c:11
--- end trace ---
crash() in master called successfully.  Aborting.
Aborted

I think that the error can be in mudos.cfg (Anything that i have to change, but i not found any) or a bug in the driver that crash with an option of >256 variables.

Any idea?

Thank you for your approach.

Offline wodan

  • BFF
  • ***
  • Posts: 434
  • Drink and code, you know you want to!
    • View Profile
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #5 on: September 02, 2011, 01:49:40 PM »
discworld has it at over 65000, but i'm not sure anything actually uses more than 256 globals, but then dead soul probably doesn't either. What compiler/cpu are you using?

Offline balrugh

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #6 on: September 02, 2011, 06:53:29 PM »
discworld has it at over 65000, but i'm not sure anything actually uses more than 256 globals, but then dead soul probably doesn't either. What compiler/cpu are you using?

I don't think in this. I recompile in a laptop and it seems to function ok. Now i do a gcc -v and found that the server is an ARM processor. This can be the problem them.

gcc -v
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --disable-sjlj-exceptions --with-arch=armv5t --with-tune=cortex-a8 --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

I suppose that the only solution is wait for a x86 or x64 server while i use the  fluffos 21 driver.

Thanks to all responses and sorry for my fault

Offline balrugh

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #7 on: September 02, 2011, 06:54:49 PM »
POST repeated sorry
« Last Edit: September 02, 2011, 07:07:26 PM by balrugh »

Offline wodan

  • BFF
  • ***
  • Posts: 434
  • Drink and code, you know you want to!
    • View Profile
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #8 on: September 03, 2011, 08:11:04 AM »
Should work, it's just never been tried, I'll see if I can get it to run on one of the embedded arm boards at work (32MB ram, yay!)

Offline sojan

  • Acquaintance
  • *
  • Posts: 35
    • View Profile
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #9 on: September 07, 2011, 04:33:32 PM »
I've happily compiled it for my N900, which is an arm board, and booted up the dwlib on it.  I'll check the options because I'm pretty sure I used the DW defaults when compiling.

Offline balrugh

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
Re: Fluffos 2.22 - 2-23 ******** FATAL ERROR: Illegal variable access 1349(10).
« Reply #10 on: September 10, 2011, 04:53:34 AM »
I will try to reduce the variables to <256. It seems to be ok.

Thank you for your responses.